mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
Also allow enabling gtuber code path via env
Having to use "gtuber" URI scheme might be inconvenient, so also allow to whitelist it with "GST_PLUGIN_FEATURE_RANK=gtubersrc:300" env
This commit is contained in:
@@ -974,6 +974,12 @@ function checkYouTubeUri(uri)
|
|||||||
if (scheme && scheme === 'gtuber')
|
if (scheme && scheme === 'gtuber')
|
||||||
return [false, null];
|
return [false, null];
|
||||||
|
|
||||||
|
const gstRegistry = Gst.Registry.get();
|
||||||
|
const feature = gstRegistry.lookup_feature('gtubersrc');
|
||||||
|
|
||||||
|
if (feature && feature.get_rank() >= Gst.Rank.PRIMARY)
|
||||||
|
return [false, null];
|
||||||
|
|
||||||
const host = gstUri.get_host();
|
const host = gstUri.get_host();
|
||||||
let videoId = null;
|
let videoId = null;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user