- YTSearch *videoSource = new YTSearch(params, this);
- videoSource->setAsyncDetails(true);
- emit activated(videoSource);
+ VideoSource *vs = nullptr;
+ if (VideoAPI::impl() == VideoAPI::YT3) {
+ YTSearch *videoSource = new YTSearch(params);
+ videoSource->setAsyncDetails(true);
+ vs = videoSource;
+ } else if (VideoAPI::impl() == VideoAPI::IV) {
+ vs = new IVChannelSource(params);
+ } else if (VideoAPI::impl() == VideoAPI::JS) {
+ vs = new YTJSChannelSource(params);
+ }
+ emit activated(vs);