Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization not working for HLS VOD content #977

Open
3 tasks done
forbjok opened this issue Oct 14, 2023 · 1 comment
Open
3 tasks done

Synchronization not working for HLS VOD content #977

forbjok opened this issue Oct 14, 2023 · 1 comment

Comments

@forbjok
Copy link

forbjok commented Oct 14, 2023

Please fill out the templates below to the best of your ability, based on whether your problem is with using the website or with running your own server.

Website Problem

Please confirm whether you've tried the following debugging steps:

  • Clearing cache and refreshing the page (On Firefox, press Ctrl+F5. On Chrome, press F12, then right click the refresh button and click "Empty Cache and Hard Reload")
  • Disabling all browser extensions
  • Using a clean channel with no customizations

Description of the Problem

Using a HLS-encoded VOD video (.m3u8 manifest pointing to either fragmented mp4 segments or single file w/ byte ranges), the stream does not synchronize between users. Pausing/unpausing or seeking as leader does not cause other users' state/position to be updated, and refreshing will always cause the video to restart from the beginning instead of synchronizing to the leader's position.

I would expect this to synchronize like any other video file. I know for a fact that this is possible, as I have implemented the same functionality myself in a personal project using the same player component (video.js) as cytube uses.

Here's an example video that reproduces this issue: https://junk.forbstuff.net/t3mp/cytube-hlsvod-repro/master.m3u8

I suspect a possible cause is that cytube is coded to always consider HLS links as a livestream (It says "Currently Playing: Livestream" over the video), which would not be controllable, however if this is the case, it's not a sound assumption, as HLS can also be used for non-live pre-encoded, fully seekable video (VOD), as is the case here.

System Information

OS: Windows 11
Web Browsers tested: Chrome, Brave, Firefox, Edge

There are no relevant error messages, and nothing new shows up in the console when pausing/unpausing or seeking on either the leader or the viewer browsers.

@calzoneman
Copy link
Owner

All directly added m3u8s are treated as livestreams and are therefore not synced.

See #767 -- someone contributed support for HLS VODs via the custom-media target (therefore relying on the JSON manifest to specify whether it is live or not), but it was not implemented for directly adding m3u8s (see #767 (comment) for why -- it's difficult to programmatically decide whether a given m3u8 link represents a livestream or a VOD because the format itself is designed for livestreaming).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants