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

IE11 API issue #1393

Closed
dsparacio opened this issue May 11, 2016 · 6 comments
Closed

IE11 API issue #1393

dsparacio opened this issue May 11, 2016 · 6 comments
Assignees
Milestone

Comments

@dsparacio
Copy link
Contributor

MediaPlayer has getBufferLength API but it seems to return NaN only on IE11 (win 10 test env), all other browsers the API is correct.

@dsparacio dsparacio self-assigned this May 11, 2016
@dsparacio dsparacio added this to the 2.2.0 milestone May 11, 2016
@JibberJim
Copy link

Not sure it's all others, but Number.MAX_SAFE_INTEGER is used there, should
probably be Number.POSITIVE_INFINITY or some other big number.

On Wed, May 11, 2016 at 6:21 PM, Dan Sparacio notifications@github.com
wrote:

MediaPlayer has getBufferLength API but it seems to return NaN only on
IE11 (win 10 test env), all other browsers the API is correct.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1393

@davemevans
Copy link
Contributor

What @JibberJim said. Number.MAX_SAFE_INTEGER isn't available in IE 😞

@dsparacio
Copy link
Contributor Author

Thanks Guys! - Ill resolve that in a bit.

@davemevans
Copy link
Contributor

I noticed that getBufferLength is actually returning a string. This is due to the .toPrecision(3) once the length has been calculated. I don't think this is correct. The jsdoc also suggests it should be a number, not a string.

The jsdoc could possibly do with some attention since it mentions fragmented text in the beginning but only video and audio for the rest.

What do people think? I have a potential fix at davemevans@91f4a87

@wilaw
Copy link
Member

wilaw commented May 27, 2016

Fix is fine and is an improvement. I originally added the precision to prevent returning buffer length values such as 23.45798467352 which imply a precision that just doesn't exist. I thought a value to milliseconds was reasonable. Should we do things like that (correctly implemented as a Number of course) or allow all returned numbers to have max float precision?

@davemevans
Copy link
Contributor

I've updated the patch - development...bbcrddave:1393

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

No branches or pull requests

4 participants