video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.59k stars 2.55k forks source link

Video stops playing after increasing the volume in demo app #5712

Open vit-salomon-deltatre opened 1 year ago

vit-salomon-deltatre commented 1 year ago

What version of Hls.js are you using?

v1.4.10

What browser (including version) are you using?

Safari 16.5.2

What OS (including version) are you using?

macOS 13.5

Test stream

Default Big Buck Bunny - adaptive qualities

Configuration

{
  "debug": true,
  "enableWorker": true,
  "lowLatencyMode": true,
  "backBufferLength": 90
}

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Make sure that you have default "Stop media with sound" setting for hls.js demo page set in Safari preferences.
  2. Mute the demo player
  3. Refresh the demo page (video should now autoplay muted)
  4. Increase the volume by hovering volume icon and dragging the volume slider up

It is important to use the dragging motion and not click into the volume slider.

Expected behaviour

Video continues playing and the volume increases.

What actually happened?

Video stops playback until you drag the volume down to mute.

Probably related to this issue in webkit: https://bugs.webkit.org/show_bug.cgi?id=259681

Console output

0.015 | Loading https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8
0.018 | Loading manifest and attaching video element...
0.022 | 5 quality levels found
0.024 | Manifest successfully loaded
0.039 | Media element attached

Chrome media internals output

No response

robwalch commented 1 year ago

This is a browser issue and not a bug in HLS.js.

Thank you for linking the WebKit issue.

You could try adding a mousedown or touchstart listener and calling video.play(). If there is a valid user interaction event that is still propagated from the interaction with the slider, calling play might dismiss the autoplay policy that halts playback with sound.