~cadence/tube-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH cloudtube] Fix #14 implement video autoplay with URL parameter

~lomanic
Details
Message ID
<161946323921.12406.3818970425398904821-0@git.sr.ht>
DKIM signature
missing
Download raw message
Patch: +3 -2
From: Lomanic <lomanic@hotmail.fr>

Fixes https://todo.sr.ht/~cadence/tube/14
---
 api/video.js  | 3 ++-
 pug/video.pug | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/api/video.js b/api/video.js
index ad82499..5651248 100644
--- a/api/video.js
+++ b/api/video.js
@@ -190,6 +190,7 @@ module.exports = [

			// Continuous mode
			const continuous = url.searchParams.get("continuous") === "1"
			const autoplay = url.searchParams.get("autoplay") === "1"
			const swp = url.searchParams.get("session-watched")
			const sessionWatched = swp ? swp.split(" ") : []
			const sessionWatchedNext = sessionWatched.concat([id]).join("+")
@@ -210,7 +211,7 @@ module.exports = [
			return renderVideo(video, {
				user, settings, id, instanceOrigin
			}, {
				mediaFragment, continuous, sessionWatched, sessionWatchedNext
				mediaFragment, autoplay, continuous, sessionWatched, sessionWatchedNext
			})
		}
	}
diff --git a/pug/video.pug b/pug/video.pug
index bfdd301..df3e00d 100644
--- a/pug/video.pug
+++ b/pug/video.pug
@@ -24,7 +24,7 @@ block content
        .video-container
          - const format = formats[0]
          if format
            video(controls preload="auto" width=format.second__width height=format.second__height data-itag=format.itag autoplay=continuous)#video.video
            video(controls preload="auto" width=format.second__width height=format.second__height data-itag=format.itag autoplay=continuous||autoplay)#video.video
              source(src=format.url+mediaFragment type=format.type)
              each t in video.captions
                track(label=t.label kind="subtitles" srclang=t.languageCode src=t.url)
-- 
2.30.2
Details
Message ID
<20210428000311.310b4cdd5477879a9bd61262@disroot.org>
In-Reply-To
<161946323921.12406.3818970425398904821-0@git.sr.ht> (view parent)
DKIM signature
pass
Download raw message
Patch applied - but note that autoplay does not work with DASH
playback, at least not at the moment. I'd prefer to fix DASH rather
than having autoplay restrict the quality selection like continuous
mode does.
Reply to thread Export thread (mbox)