clappr/clappr-chromecast-plugin

HLS-support

Closed this issue ยท 9 comments

Is it possible to add hls-support to the plugin?

@linusanderas I tested it right now and it seems to be working:

  • I used http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8
  • git checkout remotes/origin/standardize-event-api
  • npm install && npm start
  • open your browser and point it to http://localhost:8080/

It was designed to support almost all (if not all) clappr's playback (dash, mp4, rtmp...)

Loads clapper app on the Chromecast but not media.
Console log shows:

clappr.js:2813 [debug][chromecast] init success
clappr.js:2813 [debug][chromecast] receiver found
clappr.js:2813 [debug][chromecast] launch success - session: [session id here]
clappr.js:2813 [debug][chromecast] load media
clappr.js:2813 [debug][chromecast] loading... undefined
clappr.js:2813 [warn][chromecast] media error Object {code: "invalid_parameter", description: "Invalid contentId in MediaInfo.", details: null}
clappr.js:2813 [debug][chromecast] stopped
clappr.js:2813 [debug][chromecast] load media
clappr.js:2813 [debug][chromecast] loading... undefined
clappr.js:2813 [warn][chromecast] media error Object {code: "session_error", description: "No receiver for this session", details: null}
clappr.js:2813 [debug][chromecast] load media
clappr.js:2813 [debug][chromecast] loading... undefined
clappr.js:2813 [warn][chromecast] media error Object {code: "session_error", description: "No receiver for this session", details: null}

And it doesn't gracefully leave chromecast mode, requiring a page reload to resume playback in the player

Update: I just tested http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8 and it didn't work. I should probably admit that I simply checked out the gh-pages branch and threw it up for a quick test.

I must be overlooking something. When I follow your steps, here's my logs:

log.js:67[debug][MediaControl] mediacontrol:notplaying
log.js:67[debug][MediaControl] mediacontrol:rendered
events.js:194Uncaught TypeError: Cannot read property '_listenId' of nullf.(anonymous function) @ events.js:194bindEvents @ clappr-chromecast-plugin.js:669t @ ui_core_plugin.js:9Chromecast @ clappr-chromecast-plugin.js:653(anonymous function) @ core_factory.js:51o.value @ core_factory.js:50o.value @ core_factory.js:39o.value @ player.js:151o.value @ player.js:140t @ player.js:125window.onload @ (index):11
media_control.js:588Uncaught TypeError: Cannot read property 'settings' of null(anonymous function) @ media_control.js:588r.run @ browser.js:64i @ browser.js:34

Alright, looks like there have been a lot of advancements with clappr recently and I'd been dealing with some incompatibilities. Those issues aside, I found this to be the issue with playing hls streams:
var src = this.core.mediaControl.container.playback.src;
That seems to not exist. Instead, I changed it to point to
var src = this.core.mediaControl.container.playback.options.src;
and it seems to work for all cases.

Still working on getting seeking to work properly. It just snaps back to 00:00 (although it does this for mp4s as well so it's not specific to hls)

@ziddey we're working on this I think soon we'll have a production ready version, thanks for the info.

@leandromoreira Any update on progress on this plugin?

Still wondering about this plugin and HLS support. I'm happy to work on some code to get it playibg with the latest versions of Clappr but don't want to repeat work that may have already been done (per @leandromoreira 's comment in January above)

@jlmcdonald @towerz is more able to answer you now :P

๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

[warn][chromecast] media error Object {code: "session_error", description: "LOAD_FAILED", details: Object}

I get this error which makes my HLS Live Stream unplayable on my Chromecast

EDIT: I had to set my CORS header, lol.