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

Cannot read property 'toFixed' of undefined #1202

Closed
3 of 4 tasks
rafa8626 opened this issue Jun 11, 2017 · 10 comments
Closed
3 of 4 tasks

Cannot read property 'toFixed' of undefined #1202

rafa8626 opened this issue Jun 11, 2017 · 10 comments

Comments

@rafa8626
Copy link
Contributor

Environment
Steps to reproduce

Just used this with MediaElement.js latest version

Expected behavior

It should play media correctly

Actual behavior

Nothing gets played

Console output
[log] > detachMedia  hls.min.js:7:20814
[log] > media source detaching  hls.min.js:7:20814
[log] > loadSource:https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8  hls.min.js:7:20814
[log] > trigger BUFFER_RESET  hls.min.js:7:20814
[log] > attachMedia  hls.min.js:7:20814
[log] > media source opened  hls.min.js:7:20814
[log] > manifest loaded,6 level(s) found, first bitrate:628000  hls.min.js:7:20814
[log] > 2 sourceBuffer(s) expected  hls.min.js:7:20814
[log] > audio tracks updated  hls.min.js:7:20814
[log] > no default audio track defined, use first audio track as default  hls.min.js:7:20814
[log] > switching to audioTrack 0  hls.min.js:7:20814
[log] > audio stream:STOPPED->IDLE  hls.min.js:7:20814
[log] > audio stream:IDLE->PAUSED  hls.min.js:7:20814
[log] > audio stream:PAUSED->IDLE  hls.min.js:7:20814
[log] > audio stream:IDLE->WAITING_TRACK  hls.min.js:7:20814
[log] > (re)loading playlist for audioTrack 0  hls.min.js:7:20814
[log] > loading playlist for audioTrack 0  hls.min.js:7:20814
[log] > subtitle tracks updated  hls.min.js:7:20814
[log] > track 0 loaded [0,53],duration:211.42700000000013  hls.min.js:7:20814
[log] > audio stream:WAITING_TRACK->IDLE  hls.min.js:7:20814
[error] > internal error happened while processing hlsAudioTrackLoaded:d is undefined  hls.min.js:7:20814
	n/< https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:7:20814
	value https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:5:15129
	value https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:5:14805
	[1]</i.prototype.emit https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:1:1906
	e/s.trigger https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:5:23386
	value https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:6:11739
	value https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.min.js:8:1254
hlsError Object { type: "otherError", details: "internalException", fatal: false, event: "hlsAudioTrackLoaded", err: TypeError }  mediaelement-and-player.js:6114:6
[log] > audioTrack 0 loaded
@benjamingr
Copy link
Contributor

This report is confusing, the error in the code and the error "cannot read property toFixed of undefined" look different - the error I see in the pasted code is:

[error] > internal error happened while processing hlsAudioTrackLoaded:d is undefined hls.min.js:7:20814

Can you please clarify when this happens, and run this against the non minified build of hls.js? (you can do that by removing the .min part of the file name)

@rafa8626
Copy link
Contributor Author

I did a test using the uncompressed file and this is the error I got:

Cannot read property 'toFixed' of undefined at AudioStreamController.doTick (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:1415:193) 
at AudioStreamController.tick (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:1232:14) 
at AudioStreamController.onAudioTrackLoaded (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:1636:12) 
at AudioStreamController.onEventGeneric (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:9650:49) 
at AudioStreamController.onEvent (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:9637:12) 
at EventEmitter.emit (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:97:20) 
at EventEmitter.trigger (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:10224:21) 
at PlaylistLoader.loadsuccess (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:11431:21) 
at XhrLoader.readystatechange (https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.9/hls.js:15805:28)

@rafa8626
Copy link
Contributor Author

Any updates on this?

@rafa8626
Copy link
Contributor Author

I have noticed that if I set autoplay the issue is gone. In my code I use startLoad to play and stopLoad to pause, and autoStartLoad setup by default as false for performance, but when autoplay is enabled, I'm pretty much using the same setup you guys use in your demo file. Just FYI

mangui added a commit that referenced this issue Jun 21, 2017
mangui added a commit that referenced this issue Jun 21, 2017
related to #1202
@mangui
Copy link
Member

mangui commented Jun 21, 2017

@rafa8626 thanks for reporting, it should be fixed now

@rafa8626
Copy link
Contributor Author

Thanks @mangui for your help; last question: when would you be releasing this change?

@radiantmediaplayer
Copy link
Collaborator

@rafa8626 you really do not need to wait for a release to start using the patch. When you see a

update dist

commit that means the files in the dist/ folder are fresh with the latest changes on master. Just git clone https://github.com/video-dev/hls.js.git or pull the latest changes from your local repo and you are good to go with the files in the dist/ folder.

@rafa8626
Copy link
Contributor Author

Yeah it's just that in my case, I rely on calling a CDN (jsDelivr, CDNJS) with the latest version of HLS.js that's why I'm asking

@mangui
Copy link
Member

mangui commented Jun 22, 2017

It Should be released later this week

@rafa8626
Copy link
Contributor Author

Thanks I appreciate it

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

4 participants