Orange-OpenSource / hasplayer.js

Http Adaptive Streaming javascript player based on HTML5 premium extensions (MSE/EME)
Other
197 stars 67 forks source link

Handling of very large offsets in MSS Manifest (>Number.MAX_SAFE_INTEGER) #164

Closed krozalski closed 7 years ago

krozalski commented 7 years ago

We are using live (and post-live VOD with offset) Manifests that have offset exceeding javascript Number.MAX_SAFE_INTEGER. It is the epoch time in microseconds. Because of this hasplayer is calculating the fragment with arithmetic error (e.g. 14942357270000000 + 20053333 = 14942357290053332 instead of 14942357290053333 - precision is lost).

This fixes the problem using goog.math.Long library and passing tManifest as string instead of a number.

bbert commented 7 years ago

Hi, Thanks for this PR. We will have a look at it next week.

bbert commented 7 years ago

Hi, Have you a demo sample for testing this use case?

krozalski commented 7 years ago

I am afraid not public available one. An example of the Manifest you can check: https://dc3livedachdazn-a.akamaihd.net/live/channel/1001/all.ism/Manifest but to play it you will need a laURL of course.

I shared it with you in an email - please check.

bbert commented 7 years ago

Hi, I had a look in your PR and this is not sufficient for handling large timestamps. Especially, you have to consider also timestamps in tfrf boxes for live streams. I have made another PR (#172) for handling large timestamp values. Please check if it works with your streams and let me know.

krozalski commented 7 years ago

Hello - thank you for that. I am checking your PR. So far it does not work - stream does not start loading fragments and last log message is: Select key system, create new MediaKeys. I am investigating to find out what is missing.

krozalski commented 7 years ago

Closing that one since #172 is handling the issue in a better way. Thanks @bbert