benjipott / video.js-chromecast

Use chromecast with videojs html5 player
Other
207 stars 86 forks source link

Error on ending cast #60

Open sdahdaah opened 6 years ago

sdahdaah commented 6 years ago

Hello,

When ending cast we have an error no media found.

We are casting using HLS stream.

player erro player.error()r
MediaError {code: 4, message: "No compatible source was found for this media."} code : 4 message : "No compatible source was found for this media." proto : Object

Regards,

amohiy commented 6 years ago

I have the same issue did you find any solution?

sdahdaah commented 6 years ago

Hi,

i started using another plugin that solved the issue.

amohiy commented 6 years ago

a plugin working with video.js

sdahdaah commented 6 years ago

yes the one of silverline

amohiy commented 6 years ago

thanks a lot.

SondreBakken commented 6 years ago

I am having the same issue. And I think the reason is that inonStopAppSuccess() this.src(this.player_.options_['sources']);

this.player.options['sources'] is an empty array. If changing this line to

this.src(this.cache_.src);

it works, but this is a bit of a workaround, and Id like to understand why this happens.

So on loadTech it passes in this.loadTech_('Chromecast', { type: 'cast', apiMedia: media, apiSession: this.apiSession, });

and

loadTech_(techName, source) so the source is never passed in through the constructor for the Tech when loaded. Instead its passed to the chromecast in a success callback

const source = this.cache_.src; this.mediaInfo = new chrome.cast.media.MediaInfo(source, type); this.loadRequest = new chrome.cast.media.LoadRequest(this.mediaInfo);

Could this be why the source played is not set to options_.source and then not passed back when ending the cast session?