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:
Rafał Dzięgiel
2021-12-10 11:04:51 +01:00
parent 46ce261524
commit 0c561ab4b3

View File

@@ -974,6 +974,12 @@ function checkYouTubeUri(uri)
if (scheme && scheme === 'gtuber')
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();
let videoId = null;