@mablhq/mabl-cli 1.48.22 → 1.48.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,13 +116,17 @@ class ChromiumPageDelegate {
116
116
  }
117
117
  async enableScreencastMode() {
118
118
  try {
119
- const cdp = this.getCDPSession();
120
- cdp.on('Page.screencastFrame', async (params) => {
121
- await cdp
122
- .send('Page.screencastFrameAck', { sessionId: params.sessionId })
123
- .catch(() => { });
124
- });
125
- await cdp.send('Page.startScreencast', {});
119
+ const cdp = await this.createCDPSession();
120
+ if (cdp) {
121
+ cdp.on('Page.screencastFrame', async (params) => {
122
+ await cdp
123
+ .send('Page.screencastFrameAck', { sessionId: params.sessionId })
124
+ .catch(() => { });
125
+ });
126
+ await cdp.send('Page.startScreencast', {
127
+ everyNthFrame: 100,
128
+ });
129
+ }
126
130
  }
127
131
  catch (e) {
128
132
  (0, logUtils_1.logInternal)(`Unable to enable screencast mode. No CDP session found. Error: ${e}`);