mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
Update canCompress to check video for srcObject
srcObjects can be defined by webworkers, amazon has pushed support for webworkers setting videos processed by a separate worker thread now that chrome has shipped support in Chrome 108. Compressor still works if video is defined in this way, so we can check for and allow this.
This commit is contained in:
parent
1914b055ce
commit
ead5430684
1 changed files with 5 additions and 3 deletions
|
@ -1600,13 +1600,15 @@ export default class PlayerBase extends Module {
|
||||||
const video = player.mediaSinkManager?.video || player.core?.mediaSinkManager?.video;
|
const video = player.mediaSinkManager?.video || player.core?.mediaSinkManager?.video;
|
||||||
if ( ! video )
|
if ( ! video )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if ( ! video.src && ! video.srcObject )
|
||||||
|
return false;
|
||||||
|
|
||||||
if ( video.src ) {
|
if ( video.src ) {
|
||||||
const url = new URL(video.src);
|
const url = new URL(video.src);
|
||||||
if ( url.protocol !== 'blob:' )
|
if ( url.protocol !== 'blob:' )
|
||||||
return false;
|
return false;
|
||||||
} else
|
}
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2235,4 +2237,4 @@ export default class PlayerBase extends Module {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue