@@ -19,6 +19,7 @@ import * as jpeg from 'jpeg-js';
1919import path from 'path' ;
2020import * as png from 'pngjs' ;
2121import { splitErrorMessage } from '../../utils/stackTrace' ;
22+ import { hostPlatform } from '../../utils/registry' ;
2223import { assert , createGuid , debugAssert , headersArrayToObject , headersObjectToArray } from '../../utils/utils' ;
2324import * as accessibility from '../accessibility' ;
2425import * as dialog from '../dialog' ;
@@ -737,7 +738,8 @@ export class WKPage implements PageDelegate {
737738
738739 async _startScreencast ( options : types . PageScreencastOptions ) : Promise < void > {
739740 assert ( ! this . _recordingVideoFile ) ;
740- const { screencastId } = await this . _pageProxySession . send ( 'Screencast.startVideo' , {
741+ const START_VIDEO_PROTOCOL_COMMAND = hostPlatform === 'mac10.14' ? 'Screencast.start' : 'Screencast.startVideo' ;
742+ const { screencastId } = await this . _pageProxySession . send ( START_VIDEO_PROTOCOL_COMMAND as any , {
741743 file : options . outputFile ,
742744 width : options . width ,
743745 height : options . height ,
@@ -749,7 +751,8 @@ export class WKPage implements PageDelegate {
749751 async _stopScreencast ( ) : Promise < void > {
750752 if ( ! this . _recordingVideoFile )
751753 return ;
752- await this . _pageProxySession . sendMayFail ( 'Screencast.stopVideo' ) ;
754+ const STOP_VIDEO_PROTOCOL_COMMAND = hostPlatform === 'mac10.14' ? 'Screencast.stop' : 'Screencast.stopVideo' ;
755+ await this . _pageProxySession . sendMayFail ( STOP_VIDEO_PROTOCOL_COMMAND as any ) ;
753756 this . _recordingVideoFile = null ;
754757 }
755758
0 commit comments