Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Flash Fallback doesn't respond to canplay event with hls #61

Closed
paytonrules opened this issue May 19, 2014 · 16 comments
Closed

Flash Fallback doesn't respond to canplay event with hls #61

paytonrules opened this issue May 19, 2014 · 16 comments

Comments

@paytonrules
Copy link

If you're using the flash fallback and are using hls then the canplay event never fires. It works fine with the HTML5 player.

@gkatsev
Copy link
Member

gkatsev commented May 19, 2014

This probably has to do with the fact that this plugin just sits on top of videojs right now and comes into play if videojs isn't able to play the hls stream another way.
We're working on making it into a videojs "tech", which should fix this problem and others.

@paytonrules
Copy link
Author

Any idea what the time frame is on that? I'm not sure if I should wait for the fix or try to come up with a work around.

@gkatsev
Copy link
Member

gkatsev commented May 19, 2014

Hopefully, some time this week.

@gkatsev
Copy link
Member

gkatsev commented May 20, 2014

The tech is available for playing around in PR #62. Feel free to try it out and let us know if the canplay event fires then.

@paytonrules
Copy link
Author

Please forgive my ignorance - what's the difference between a tech and a
plugin? Do they install the same way?

On Tue, May 20, 2014 at 6:46 PM, Gary Katsevman notifications@github.comwrote:

The tech is available for playing around in PR #62#62.
Feel free to try it out and let us know if the canplay event fires then.


Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-43697353
.

@gkatsev
Copy link
Member

gkatsev commented May 21, 2014

A tech is a different way of doing things behind the scenes. It's a way to abstract out the flash fallback from the videojs api.
Usage is the same, you just include all the javascript files like you did for when it was a plugin.

@dmlap
Copy link
Member

dmlap commented May 23, 2014

There is one difference in how you configure a tech as opposed to a plugin. Instead of calling player.hls(), you'll need to modify the video.js tech order like this:

videojs('myvideo', {
  techOrder: ['html5', 'flash', 'hls'] // note the addition of the new HLS tech!
});

You also need to include the javascript for the HLS tech before you initialize your player. With a plugin, you're free to pull in the js any time before you actually initialize it.

@paytonrules
Copy link
Author

I haven't gotten a chance to work with this yet - but I noticed pull request #62 is merged to master. Just to be sure - can I try the current master and make the changes that dmlap mentions?

@paytonrules
Copy link
Author

I have tried version 0.7.0 and still do not see a canplay event, at least on Chrome.

When I use the developer tools to start the video it stutters and fails, again on Chrome.

@dmlap
Copy link
Member

dmlap commented Jun 9, 2014

Ok, it must be an issue in the video.js SWF then. We'll investigate.

@paytonrules
Copy link
Author

I'm getting some deadline pressure from a client. Is there a way I can help via a test case or .. [ insert thing here ]

@paytonrules
Copy link
Author

Is the problem potentially here:

https://github.com/videojs/video-js-swf/blob/8a989103788b23fd59a847b0389bb261c80aeec1/src/com/videojs/providers/HTTPVideoProvider.as#L526-528

It looks like CAN_PLAY is not being fired until the buffer is full. On an HLS Stream - particularly the EVENT/LIVE streams that we are using the buffer is never truly full because you don't download the entire thing.

@dmlap
Copy link
Member

dmlap commented Jun 11, 2014

@paytonrules: that does look like a bug. If you feel up for making a patch on video-js-swf, I can help you get it merged in.

@paytonrules
Copy link
Author

I'd love to - except I haven't written so much as "hello world" in ActionScript.

@paytonrules
Copy link
Author

It looks like I had operator error.

I was listening for the :canplay event via (psuedocode warning) $("video").on("canplay", function() {blah})

Looking at it I realized that OF COURSE it doesn't work in Chrome since the video element goes away. Sure enough I'm getting the canplay event when I use videojs.on.

@gkatsev
Copy link
Member

gkatsev commented Jun 12, 2014

Cool! Glad you were able to figure it out. Please open up more issues if you find other problems.

@gkatsev gkatsev closed this as completed Jun 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants