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

Setting liveSyncDuration & liveMaxLatencyDuration breaks player if you Stop then Play #1573

Closed
MasterEvilAce opened this issue Feb 16, 2018 · 2 comments

Comments

@MasterEvilAce
Copy link

MasterEvilAce commented Feb 16, 2018

Browser: Chrome 64.0.3282.167
OS: Windows 10 x64
Clappr Version: 0.2.86

Steps to reproduce:

  • Use a LIVE playlist
  • set liveSyncDuration and liveMaxLatencyDuration values
    Example:
    hlsjsConfig: {
    liveSyncDuration: 8,
    liveMaxLatencyDuration: 18
    },
  • Play the stream (it works fine and as expected with above values)
  • Stop the stream with UI button (at any point)
  • Play the stream again (with UI button)
  • Player breaks with error in console

This issue also happens with the player at http://cdn.clappr.io/ if the above criteria is met.

console error is:
hls.js:15328 Uncaught Error: Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration
at new t (hls.js:15328)
at e._setup (hls.js:152)
at e.play (hls.js:354)
at e.play (container.js:301)
at e.clicked (poster.js:84)
at HTMLDivElement.r.proxy (zepto.js:1616)

I'm assuming Clappr is resetting values for liveSyncDurationCount+liveMaxLatencyDurationCount (notice the COUNT) upon attempting to restart stream, even though they should not be provided when using the NON-count values.

@andrefilimono
Copy link
Contributor

I encountered the same problem.

Comment for devs:
I think that you need to pass a copy of the config to HLS.js as it overrides config with default values:
https://github.com/clappr/clappr/blob/master/src/playbacks/hls/hls.js#L152

Something like this:
this._hls = new HLSJS(Object.assign({}, this.options.playback.hlsjsConfig) || {})

@andrefilimono
Copy link
Contributor

andrefilimono commented Feb 17, 2018

Fixed in #1575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants