mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
browser(firefox): support start/stop videos for context (#8173)
This commit is contained in:
parent
b4920fe699
commit
dba3c5055f
@ -1,2 +1,2 @@
|
||||
1276
|
||||
Changed: yurys@chromium.org Wed 11 Aug 2021 01:41:01 PM PDT
|
||||
1277
|
||||
Changed: dgozman@gmail.com Thu Aug 12 16:33:32 PDT 2021
|
||||
|
@ -917,11 +917,13 @@ class BrowserContext {
|
||||
|
||||
async setVideoRecordingOptions(options) {
|
||||
this.videoRecordingOptions = options;
|
||||
if (!options)
|
||||
return;
|
||||
const promises = [];
|
||||
for (const page of this.pages)
|
||||
for (const page of this.pages) {
|
||||
if (options)
|
||||
promises.push(page._startVideoRecording(options));
|
||||
else if (page._videoRecordingInfo)
|
||||
promises.push(page._stopVideoRecording());
|
||||
}
|
||||
await Promise.all(promises);
|
||||
}
|
||||
}
|
||||
|
@ -213,8 +213,8 @@ class BrowserHandler {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setForcedColors(nullToUndefined(forcedColors));
|
||||
}
|
||||
|
||||
async ['Browser.setVideoRecordingOptions']({browserContextId, dir, width, height, scale}) {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setVideoRecordingOptions({dir, width, height, scale});
|
||||
async ['Browser.setVideoRecordingOptions']({browserContextId, options}) {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setVideoRecordingOptions(options);
|
||||
}
|
||||
|
||||
async ['Browser.setUserAgentOverride']({browserContextId, userAgent}) {
|
||||
|
@ -453,9 +453,11 @@ const Browser = {
|
||||
'setVideoRecordingOptions': {
|
||||
params: {
|
||||
browserContextId: t.Optional(t.String),
|
||||
options: t.Optional({
|
||||
dir: t.String,
|
||||
width: t.Number,
|
||||
height: t.Number,
|
||||
}),
|
||||
},
|
||||
},
|
||||
'cancelDownload': {
|
||||
|
@ -1,2 +1,2 @@
|
||||
1282
|
||||
Changed: yurys@chromium.org Wed 11 Aug 2021 01:40:40 PM PDT
|
||||
1283
|
||||
Changed: dgozman@gmail.com Thu Aug 12 16:33:32 PDT 2021
|
||||
|
@ -917,11 +917,13 @@ class BrowserContext {
|
||||
|
||||
async setVideoRecordingOptions(options) {
|
||||
this.videoRecordingOptions = options;
|
||||
if (!options)
|
||||
return;
|
||||
const promises = [];
|
||||
for (const page of this.pages)
|
||||
for (const page of this.pages) {
|
||||
if (options)
|
||||
promises.push(page._startVideoRecording(options));
|
||||
else if (page._videoRecordingInfo)
|
||||
promises.push(page._stopVideoRecording());
|
||||
}
|
||||
await Promise.all(promises);
|
||||
}
|
||||
}
|
||||
|
@ -213,8 +213,8 @@ class BrowserHandler {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setForcedColors(nullToUndefined(forcedColors));
|
||||
}
|
||||
|
||||
async ['Browser.setVideoRecordingOptions']({browserContextId, dir, width, height, scale}) {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setVideoRecordingOptions({dir, width, height, scale});
|
||||
async ['Browser.setVideoRecordingOptions']({browserContextId, options}) {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setVideoRecordingOptions(options);
|
||||
}
|
||||
|
||||
async ['Browser.setUserAgentOverride']({browserContextId, userAgent}) {
|
||||
|
@ -453,9 +453,11 @@ const Browser = {
|
||||
'setVideoRecordingOptions': {
|
||||
params: {
|
||||
browserContextId: t.Optional(t.String),
|
||||
options: t.Optional({
|
||||
dir: t.String,
|
||||
width: t.Number,
|
||||
height: t.Number,
|
||||
}),
|
||||
},
|
||||
},
|
||||
'cancelDownload': {
|
||||
|
Loading…
x
Reference in New Issue
Block a user