@@ -150,7 +150,6 @@ export interface SessionParams {
150
150
disabledVideoCodecs : string
151
151
getDisplayMediaOverride : string
152
152
getDisplayMediaType : string
153
- getDisplayMediaCrop : string
154
153
localStorage : string
155
154
clearCookies : boolean
156
155
scriptPath : string
@@ -222,7 +221,6 @@ export class Session extends EventEmitter {
222
221
// eslint-disable-next-line @typescript-eslint/no-explicit-any
223
222
private readonly getDisplayMediaOverride : any | null
224
223
private readonly getDisplayMediaType : string
225
- private readonly getDisplayMediaCrop : string | null
226
224
// eslint-disable-next-line @typescript-eslint/no-explicit-any
227
225
private readonly localStorage ?: any
228
226
private readonly clearCookies : boolean
@@ -355,7 +353,6 @@ export class Session extends EventEmitter {
355
353
disabledVideoCodecs,
356
354
getDisplayMediaOverride,
357
355
getDisplayMediaType,
358
- getDisplayMediaCrop,
359
356
localStorage,
360
357
clearCookies,
361
358
scriptPath,
@@ -444,7 +441,6 @@ export class Session extends EventEmitter {
444
441
this . disabledVideoCodecs = [ ]
445
442
}
446
443
this . getDisplayMediaType = getDisplayMediaType
447
- this . getDisplayMediaCrop = getDisplayMediaCrop
448
444
if ( localStorage ) {
449
445
try {
450
446
this . localStorage = JSON5 . parse ( localStorage )
@@ -840,7 +836,8 @@ export class Session extends EventEmitter {
840
836
841
837
// Export config to page.
842
838
let cmd = `\
843
- window.WEBRTC_PERF_START_TIMESTAMP = ${ this . startTimestamp } ;
839
+ webrtcperf = {};
840
+ webrtcperf.elapsedTime = () => Date.now() - ${ this . startTimestamp } ;
844
841
window.WEBRTC_PERF_URL = "${ hideAuth ( url ) } ";
845
842
window.WEBRTC_PERF_SESSION = ${ this . id } ;
846
843
window.WEBRTC_PERF_TAB_INDEX = ${ tabIndex } ;
@@ -854,6 +851,7 @@ window.RANDOM_AUDIO_PERIOD = ${this.randomAudioPeriod};
854
851
try {
855
852
window.PARAMS = JSON.parse('${ JSON . stringify ( this . scriptParams ) } ' || '{}');
856
853
} catch (err) {}
854
+ webrtcperf.GET_DISPLAY_MEDIA_TYPE = "${ this . getDisplayMediaType } ";
857
855
`
858
856
859
857
if ( this . serverPort ) {
@@ -881,11 +879,6 @@ window.SERVER_USE_HTTPS = ${this.serverUseHttps};
881
879
) } ');\n`
882
880
}
883
881
884
- if ( this . getDisplayMediaCrop ) {
885
- log . debug ( 'Using getDisplayMedia crop:' , this . getDisplayMediaCrop )
886
- cmd += `window.GET_DISPLAY_MEDIA_CROP = "${ this . getDisplayMediaCrop } ";\n`
887
- }
888
-
889
882
if ( this . localStorage ) {
890
883
log . debug ( 'Using localStorage:' , this . localStorage )
891
884
Object . entries ( this . localStorage ) . map ( ( [ key , value ] ) => {
0 commit comments