From 0c561ab4b34acbdd0ba22e9fa61b5762fda1e3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 10 Dec 2021 11:04:51 +0100 Subject: [PATCH] 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 --- src/youtube.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/youtube.js b/src/youtube.js index f8b700b2..c6daf949 100644 --- a/src/youtube.js +++ b/src/youtube.js @@ -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;