silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

HLS Live playback pauses after 45 seconds when casting. #28

Closed daveferrara1 closed 6 years ago

daveferrara1 commented 6 years ago

Got the plugin working great. Our live linear channels however error after what seems like exactly 45 seconds. If we use default receiver, same result.

daveferrara1 commented 6 years ago

isolated my playback issues with this call to triggerReady(). If comment it out, I get uninterrupted playback, however the player itself I can no longer click any controls. Only the chrome browser plugin can pause and adjust volume.

 if (!this._hasPlayedAnyItem) {
               // `triggerReady` is required here to notify the Video.js player that the
               // Tech has been initialized and is ready.
               this.triggerReady();
            }
daveferrara1 commented 6 years ago

Looking for advice. Something about the the Queue work inside that call is not good for my use case. Maybe other people as well. This guy here: No call to triggerReady(), but haven't made a plugin out of they're work yet. https://eyecatchup.github.io/hlscast/

jthomerson commented 6 years ago

@daveferrara1 is it possible for you to provide a minimal, complete, verifiable example? Since we're also working on HLS support recently and have not hit this problem, it's hard to know exactly what differences you have from what we have. For example, you didn't mention what version of VideoJS you're using with the plugin, what other plugins you have, etc. Sometimes just by creating a MCVE you will actually discover the source of the problem yourself - or at least more details to help us reproduce it.

daveferrara1 commented 6 years ago

Give this a go: https://dev.pac-12.com/live/pac-12-live-press-conferences

daveferrara1 commented 6 years ago

Possible one of my plugins is the culprit after that triggerReady() is called. Thanks for at least thinking about my problem.

jthomerson commented 6 years ago

@daveferrara1 Sorry, but pointing to your dev site isn't a MCVE at all. The point of an MCVE is to provide a minimal reproducible testcase. Think "code pen". If you want some good examples of MCVE's, see a couple of issues that we have posted elsewhere, e.g:

All of that detail is really important in getting help - especially on an open source plugin where people are donating their time. We still don't even know what version of VideoJS you're using, or what other plugins you're using with it.

Please create a codepen that demonstrates this problem, with as few plugins as possible. My guess is that you'll find that it's the combination of more than one plugin that's causing the problem. In other words, the problem might not actually be in this codebase at all (if it is, we're happy to look into it).

daveferrara1 commented 6 years ago

Thanks. I certainly set myself up for that response. Looks like first glance nothing jumped out at you. I'll follow up.

daveferrara1 commented 6 years ago

The issue arises when we initialize the errors plugin: https://github.com/brightcove/videojs-errors

If this plugin is initialized there is a timeout that is not satisfied when we cast.

Just initializing it with:

plugins: {
 errors: {}
}

This will cause the error. Its 45 seconds because the videojs("pac12-vjs-player").errors.timeout() is set for for the 45 by default.

jthomerson commented 6 years ago

Great. Closing this since I assume you need to work out the issue with the errors plugin. Feel free to re-open this if you pinpoint that there's actually a change needed here.

daveferrara1 commented 6 years ago

You may want to add a known issue to the readme listing the fact that this plugin doesn't work with the errors plugin out of the box now that I have notified you.

I suggest maybe adding a list of what plugins your testing with. If everything is only working on your simplified MCVE you'l likely see more issues opened in the future. Demo version even better. The a basic videojs.getAllPlayers() from the console can answer a lot of questions for folks about what your testing around.

jthomerson commented 6 years ago

Sorry @daveferrara1, but I don't feel we need a list of plugins that we are or aren't compatible with at this time. Right now we still don't have an MCVE that even demonstrates the error you're reporting, so it's not possible for us to verify the assertion. Also, there are so many factors that go into a "compatibility" list: what version of this plugin, of video.js, of the other plugin(s), settings, configuration, HLS vs VOD, etc, etc. Plus, say that they fix the bug that's causing the incompatibility - then do we need to update our docs?

I appreciate the thought you put into it, but I'm hoping that Google / GitHub searches and this issue will be sufficient for if someone else encounters this error. If you find any other issues, let us know.