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

hls.js has deprecated code usage in chrome #784

Closed
4 tasks done
vegasmurphy opened this issue Oct 28, 2016 · 2 comments
Closed
4 tasks done

hls.js has deprecated code usage in chrome #784

vegasmurphy opened this issue Oct 28, 2016 · 2 comments
Labels

Comments

@vegasmurphy
Copy link

vegasmurphy commented Oct 28, 2016

Steps to reproduce
  1. Allow stream to play naturally
  2. Eventually it will throw the following message:
    Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration. See https://www.chromestatus.com/features/6107495151960064 for more details.
    Currently this does not affect playback but it will once chrome stops supporting this

It is a hard to reproduce issue, requiring multiple attempts and allowing the media to play for a long duration

Expected behavior

Stream should play correctly without using deprecated code

Actual behavior

Hls.js uses methods that will no longer be available in future versions of chrome

Console output

Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration. See https://www.chromestatus.com/features/6107495151960064 for more details.

The error is thrown by the updateMediaElementDuration function in buffer-controller.js line 331:

if (this._levelDuration > this._msDuration) {
logger.log(Updating mediasource duration to ${this._levelDuration});
=> mediaSource.duration = this._levelDuration;
this._msDuration = this._levelDuration;
}

The mediaSource duration is being set to a lower value, which is deprecated.

@romsil
Copy link
Contributor

romsil commented Oct 31, 2016

I was able to reproduce the above issue on http://dailymotion.github.io/hls.js/demo/ with the following environment:

I have attached the console logs:
Deprecated API in Chrome.txt

mangui added a commit that referenced this issue Nov 2, 2016
…on before updating mediasource duration

related to #784
mangui added a commit that referenced this issue Nov 2, 2016
@mangui
Copy link
Member

mangui commented Nov 2, 2016

Hi @vegasmurphy @romsiltp it should be fixed on hls.js/master, plz recheck

@mangui mangui added the Bug label Nov 2, 2016
mangui added a commit that referenced this issue Nov 2, 2016
@mangui mangui closed this as completed Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants