From 00ac19c80c61d1b7973e664432787e95240b7df8 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Thu, 1 May 2025 05:35:40 -0400 Subject: [PATCH] Fixed broken raw media playback for youtube, added go live button. --- src/get-info.js | 1 + templates/channel.pug | 2 ++ www/js/ui.js | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/src/get-info.js b/src/get-info.js index a623361f..5ab769cf 100644 --- a/src/get-info.js +++ b/src/get-info.js @@ -758,6 +758,7 @@ module.exports = { try{ var video = await YTDLP(id,{ dumpSingleJson: true, + format: "b" } ) diff --git a/templates/channel.pug b/templates/channel.pug index cb2e101b..8c0b4e76 100644 --- a/templates/channel.pug +++ b/templates/channel.pug @@ -131,6 +131,8 @@ html(lang="en") #plcontrol.btn-group button#showmediaurl.btn.btn-sm.btn-default(title="Add video from URL", data-toggle="collapse", data-target="#addfromurl") span.glyphicon.glyphicon-plus + button#golive.btn.btn-sm.btn-danger(title="Go Live") + span.glyphicon.glyphicon-record button#showsearch.btn.btn-sm.btn-default(title="Channel History + Video Search", data-toggle="collapse", data-target="#searchcontrol") span.glyphicon.glyphicon-search button#showplaylistmanager.btn.btn-sm.btn-default(title="Manage playlists", data-toggle="collapse", data-target="#playlistmanager") diff --git a/www/js/ui.js b/www/js/ui.js index ffe587c6..f83844e5 100644 --- a/www/js/ui.js +++ b/www/js/ui.js @@ -777,6 +777,17 @@ $("#queue_end").click(queue.bind(this, "end", "url")); $("#ce_queue_next").click(queue.bind(this, "next", "customembed")); $("#ce_queue_end").click(queue.bind(this, "end", "customembed")); +$("#golive").click(function(ev){ + socket.emit('queue', { + id: "https://stream.ourfore.st", + type: 'hl', + pos: "next", + minDuration: 0, + temp: true, + subtitle: '' + }); +}); + $("#mediaurl").keyup(function(ev) { if (ev.keyCode === 13) { queue("end", "url");