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

How to sync videos? #6

Open
Semro opened this issue Apr 4, 2020 · 4 comments
Open

How to sync videos? #6

Semro opened this issue Apr 4, 2020 · 4 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Semro
Copy link
Owner

Semro commented Apr 4, 2020

According to statistics, about 25% of users that uninstalled the extension have some problems with synchronization.

The current implementation of defining and syncing videos uses:

  • strict URL comparison of the syncing tab between users in the room. EDIT: fix: drop url strict comparison #47
  • path to the video through iframes and index in the array of videos in current iframe

This is complicated, but I remember why I did it like that.

  1. URL comparison and path to the video allow other users in the room to just open the URL from the popup and what video will play is selected automatically.
  2. If the user has other browser tabs/windows open, then an extension will only sync tab with URL, which shared to the room.

Problems of this implementation:

  1. If one of the users in the room will have a little bit different URL, for example, GET request then synchronization will not work.
  2. If users in the room have a different structure of elements on the page then the video will not synchronize. Other extensions can cause this problem (like AdBlock). So, if one user has AdBlock on and another user hasn't it will not work.
  3. The structure also can change if some additional elements on the page will load dynamically. But I have solved it with MutationObserver. It reassigns path to the video every time if something changed on the page.

Another way to implement video sync?

  • Sync current playing video.
    Each user in the room must choose what tab to sync, then start video which he wants to sync. It adds a lot of manual steps, but guarantee that video will be in sync.

Please give other ideas on how to sync video.

@Semro Semro added help wanted Extra attention is needed question Further information is requested labels Apr 4, 2020
@fabianski7
Copy link

I just found your extension and it works incredibly well, thank you very much for that!
Btw, while testing with my friends, using an ad blocker like uBlock only improved the experience. There was no synchronization problem and no intrusive ads jumped on the screen.

@Semro
Copy link
Owner Author

Semro commented Aug 8, 2020

Yes, using ad-blocking extensions may improve user experience.

@luckydonald
Copy link

Yes. For some sites everyone get's a different url, so the second approach would work there.

@kmacdough
Copy link

I know I'm late to the party, but I have an approach that might be of interest:

Have a tab-specific "sync_tab" variable hooked up to a checkbox. This enables users to manually work around any url differences, and, with some other minor tweaks, could support syncing videos across tabs of the same browser (e.g. for separate commentary on a video).

Could use current logic for determining which tab is selected by default.

This doesn't affect how you choose within a tab.

Could be interested in helping out on this when I have some time. Haven't quite grocked the structure of this repo yet.

Semro pushed a commit that referenced this issue Nov 27, 2022
add lazy nginx.conf copy in Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants