calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.45k stars 235 forks source link

Tabbing out on mobile pauses video for everyone #948

Closed emicattt closed 2 years ago

emicattt commented 2 years ago

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:

Description of the Problem

System Information

On Firefox, press Ctrl+Shift+K to open the JavaScript console. On Chrome, press Ctrl+Shift+J.

calzoneman commented 2 years ago

I guess my reply didn't go through earlier.

Did you assign leader to yourself when this happened? Ordinarily, the timing of videos is controlled by the server. When you assign leader to yourself, you are basically saying "everyone else's video will follow mine exactly" -- note that CyTube cannot distinguish between a pause you intentionally initiated and a pause caused for technical reasons (e.g. switching tabs, or buffering).

The best course of action is to only assign leader briefly when it is necessary to pause or seek, and to then remove leader to resume server control of the timer.

emicattt commented 2 years ago

I wasn't leader.

Even with pause permission, I don't expect the video to pause even for me when I tab out. I want to listen to the video while looking at another tab.

calzoneman commented 2 years ago

Even with pause permission, I don't expect the video to pause even for me when I tab out. I want to listen to the video while looking at another tab.

This is something you need to bring up with your browser vendor then, or with YouTube if that's what you're using for the content on your playlist. CyTube does not implement any sort of "automatically pause when changing tabs" behavior, but mobile browsers often implement such behavior, and I know that YouTube specifically pauses on mobile when it isn't the active tab even outside of CyTube.

I'm not able to reproduce the situation you described where a non-leader could cause the video to pause for other viewers who are in the same channel at the same time. If you would like, you can reach out to me privately to share the specific channel involved within 48 hours of the last time you experienced the issue, and I can look at the logs to tell you what happened.

calzoneman commented 2 years ago

Closing for inactivity.

calzoneman commented 1 year ago

Are you assigning leader to yourself? This is one of the reasons you should leave the server in charge of the timer and only take leader for brief periods of time when you need to seek or pause. When not actively doing so, remove leader so that the server can keep track of time and not have this sort of thing happen.

On Fri, Jun 24, 2022, 13:31 emicattt @.***> wrote:

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:

  • on mobile
  • no extensions installed
  • no customizations

Description of the Problem

  • What triggers the problem?
  • watching a channel on mobile and switch tabs
  • What happens?
  • video pauses for everyone
  • What do you expect to happen instead?
  • video to not pause for anyone

System Information

  • Operating System: Android
  • Web Browser: Firefox
  • Error Messages Displayed: n/a
  • Screenshot of JavaScript Console: n/a

On Firefox, press Ctrl+Shift+K to open the JavaScript console. On Chrome, press Ctrl+Shift+J.

— Reply to this email directly, view it on GitHub https://github.com/calzoneman/sync/issues/948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC6FCE24S2COO62CARLSPDVQYLKDANCNFSM5ZY5KSUA . You are receiving this because you are subscribed to this thread.Message ID: @.***>