Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.09k stars 1.67k forks source link

Fix disabling of catchup (leave playback rate alone) #2897

Closed difosfor closed 5 years ago

difosfor commented 5 years ago
Environment
Steps to reproduce
  1. Create MediaPlayer: const player = MediaPlayer().create()
  2. Enable low latency: player.setLowLatencyEnabled(true)
  3. Disable catchup: player.setCatchUpPlaybackRate(0)
  4. Initialize, e.g: player.initialize(media, sourceUrl, true)
  5. Change playback rate, e.g: player.setPlaybackRate(1.1)
Observed behaviour

The playback rate is changed back to 1 even though catchup was disabled.

Console output
player.setPlaybackRate(1.1)
undefined
Debug.js:233 [194373][PlaybackController] Native video element event: ratechange:  1.1 
Debug.js:233 [194447][PlaybackController] Native video element event: ratechange:  1
Fix

I've forked dash.js and fixed it here: https://github.com/exmg/dash.js/commit/3397076c10b0669ec5bfad48c791a7a82f260723

If you like I can create a pull request, but I'll have to check if I can sign the Feedback Agreement etc. Please feel free to just copy my fix if that's easier.

epiclabsDASH commented 5 years ago

Hi @difosfor. Thanks for the fix! Unless there is any inconvenient, I always prefer creator of the fix to send the PR (you get the credits of the work you really did). Sending the Feedback Agreement shouldn't take too much time so, if you have that time I invite you to follow that process.

Anyway, if there is any inconvenient or you think following the contribution process will delay the release of this fix, let me know and I will send the PR myself (no problem at all, I can do it quickly).

difosfor commented 5 years ago

Alright, I've sent the agreement over: https://groups.google.com/forum/#!topic/dashjs/2uKAFnV38b4

And created a pull request: https://github.com/Dash-Industry-Forum/dash.js/pull/2899

Looking forward to working together!

epiclabsDASH commented 5 years ago

Many thanks!

difosfor commented 5 years ago

It looks like this issue is back in v3.0.0:

I think this line: https://github.com/Dash-Industry-Forum/dash.js/blob/1cc9d8074bab824f3b3846ad2a543eb42908057f/src/streaming/controllers/PlaybackController.js#L597

Should be: settings.get().streaming.liveCatchUpPlaybackRate > 0

How should I proceed? Create a new issue and PR?