From b88c367c48da452f0100bd8cffaba5d76cd83f0d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 9 Sep 2021 13:57:31 +0200 Subject: Temporary fix for shitty ffmpeg being unable to play hls streams on peertube --- src/plugins/Peertube.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins/Peertube.cpp') diff --git a/src/plugins/Peertube.cpp b/src/plugins/Peertube.cpp index 2b2d654..df715c1 100644 --- a/src/plugins/Peertube.cpp +++ b/src/plugins/Peertube.cpp @@ -415,7 +415,19 @@ namespace QuickMedia { for(const Json::Value &streaming_playlist_json : streaming_playlists_json) { if(!streaming_playlist_json.isObject()) continue; +#if 0 files_get_sources(streaming_playlist_json["files"], video_sources); +#else + const Json::Value &playlist_url_json = streaming_playlist_json["playlistUrl"]; + if(!playlist_url_json.isString()) + continue; + + PeertubeVideoPage::VideoSource video_source; + video_source.url = playlist_url_json.asString(); + video_source.resolution = 0; + video_sources.push_back(std::move(video_source)); + break; +#endif } if(video_sources.empty()) -- cgit v1.2.3