silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

VideoJS 7 + HLS Support #37

Closed advanced4 closed 5 years ago

advanced4 commented 5 years ago

It appears that HLS streams do not work correctly when coupled with VideoJS 7. The chromecast icon appears on the chromecast device, the progress bar shows briefly, then disappears, and then nothing happens.

You [should] be able reproduce with the included HTML. I'm not familiar with Chromecast development, so I'm not sure where to look for debug information. I see nothing of importance in Chrome's dev console. MPEG-DASH seems to work fine FWIW.

The HTML should be just a simple modification of your provided test file, with the changes being: VideoJS version and the source video file.

Let me know if there's any information I can provide, or anything I can do to help! I will look into Chromecast debugging in the meantime. Given that HLS streams works w/o Chromecast, and similar segmented streams (MPEG-DASH) work w/ & w/o Chromecast, I suspect it's some trivial error.

test_vjs7_hls.zip

advanced4 commented 5 years ago

It appears I got unlucky with my choice of stream. HLS streams do work, that particular stream I linked in the attached file does not. It fails with:

[  0.805s] [cast.player.hls.PackedAudioParser] Neither ID3 nor ADTS header was found at 0
[  0.806s] [cast.player.api.Host] error: cast.player.api.ErrorCode.NETWORK/315
[  1.448s] [cast.receiver.MediaManager] Load metadata error: Error
[  0.814s] [cast.player.api.Player] unload
[  0.830s] [cast.player.api.Player] unload
Uncaught TypeError: Cannot read property 'bb' of null
    at $k.h.getStreamCount (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:296)
    at Bm._.g.gm (cast_receiver_framework.js:585)
    at Dh (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:145)
    at S.Mf (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:159)
    at S.ed (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:158)
    at Cc (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:34)
    at jh.Bc.dispatchEvent (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:33)
    at zd (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:55)
    at jh.H.Pl (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:53)
    at jh.H.$j (/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:53)

But that sounds like it's an issue with the stream, rather than your library.

jthomerson commented 5 years ago

Thanks for the feedback. Let us know if you find something else.