WofWca / jumpcutter

⏩ Fast-forwards long pauses between sentences — watch lectures ~1.5x faster (browser extension)
https://chrome.google.com/webstore/detail/jump-cutter/lmppdpldfpfdlipofacekcfleacbbncp
GNU Affero General Public License v3.0
358 stars 13 forks source link

Doesn't work with 2 videos on the page: one for presentation slides, other for the video recording #179

Open WofWca opened 2 months ago

WofWca commented 2 months ago

Reported by one of the users in a review. One such site is https://echo360.org.uk/ (there is no free access, unfortunately).

The behavior is: both of the videos (the one with the presentation slides, and the actual video) play, but if you open the popup, it's all red and it doesn't show the blue at all, i.e. the video has no sound. I suspect this is because we attach to the video that is the "slides" video, but since it has no sound, we just keep skipping.

In addition, we don't support playing two videos at the same time anyway, I think, because of AudioContext stuff.

But a good approach would be to not attach to the "slides" video. If the "🔇❌ Don't apply to muted media elements" option is checked, and the video is muted, this should not be happening anyway, but apparently the "slides" video on that site is not muted - it just has no sound...

We also do have code that makes sure that we attach to the video that started playing the last (i.e. the one that the user unpaused last), but this doesn't seem to help. I guess this could be because the "slides" video" gets unpaused after the user unpauses the actual video.

Workaround

  1. Make sure to enable "🔇❌ Don't apply to muted media elements" on the options page.
  2. Paste

    videos = document.querySelectorAll('video')
    videos[0].muted = true

    or

    videos = document.querySelectorAll('video')
    videos[1].muted = true

    in the console. Choose the option that keeps the "main" video unmuted, while muting the one with the slides.

  3. Pause, then unpause the video.

You would have to perform this on every page refresh.