1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +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:
melutzke 2022-12-09 18:23:30 -08:00 committed by GitHub
parent 1914b055ce
commit ead5430684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1601,12 +1601,14 @@ export default class PlayerBase extends Module {
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;
} }