Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flash tech only starts playing when pressing play twice #2203

Closed
geniusdex opened this issue May 27, 2015 · 10 comments
Closed

Flash tech only starts playing when pressing play twice #2203

geniusdex opened this issue May 27, 2015 · 10 comments

Comments

@geniusdex
Copy link

geniusdex commented May 27, 2015

The Flash tech required pressing play twice initially to start playing. To reproduce:

  1. Initialize video.js with the Flash tech (e.g. using techOrder:['flash'])
  2. Click on the poster or the big play button to initiate playback

Expected: The video starts playing after a short delay for buffering

Actual: The video starts buffering, but never starts playing. The play/pause button toggles to the playing-state (with the icon showing the action to pause playback). Clicking on the play/pause button starts playback, and the video plays and pauses normally afterwards.

Tested on Chromium 39.0.2171.65 Ubuntu 14.04 (Flash 16.0.0.235) and IE8/Win7.

The following document is complete test case:

<!DOCTYPE html>
<html>
 <head>
  <link href="//vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
  <script src="//vjs.zencdn.net/4.12/video.js"></script>
 </head>
 <body>
  <video id="example_video_1" class="video-js vjs-default-skin"
         controls preload="auto" width="640" height="264"
         poster="http://video-js.zencoder.com/oceans-clip.png"
         data-setup='{"techOrder":["flash"]}'>
   <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
   <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
   <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
   <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
  </video>
 </body>
</html>
@nsbingham
Copy link

I'm seeing the exact same issue.

@mister-ben
Copy link
Contributor

Reproduced on 4.12, not 4.11.

@heff
Copy link
Member

heff commented May 29, 2015

@bclwhitaker @bc-bbay @dmlap I think is happening because of the videojs-swf 4.7 update. Any thoughts on what it could be?

@bclwhitaker
Copy link
Contributor

@heff There are a few things going on here.

First, the minified version of video.js somehow seems to corrupt the preload property before it gets to the swf. With the compiled version the value is always coming in as "undefined" when the swf sees it.

Second, having an undefined value for preload exposes a bug in the swf where we were just initializing the NetConnection on the first attempt rather than following through to start the stream.

The above example works if pointed at the dev version of the stable branch -- not sure what to do about that.

I've opened a PR in the video-js-swf project which fixes the second issue: videojs/video-js-swf#162

@geniusdex
Copy link
Author

I noticed corruption of the preload property with the HTML5 tech on the stable branch, and reported that as issue #2191. This might be relevant.

@gkatsev
Copy link
Member

gkatsev commented Jul 13, 2015

I believe this has been fixed in a newer version of the swf (4.7.1 and 4.7.2). vjs 4.12.11 should have the latest swf. Can you please retest?

@naorye
Copy link

naorye commented Oct 12, 2015

I am using v5.0.0 and I still get this problem. I have to click play twice.
Any workaround for that?

@gkatsev
Copy link
Member

gkatsev commented Nov 17, 2015

Can you retest with latest v5 of both videojs and the swf?

@wired420
Copy link

Using CDN version. Still having to click play 2 or even 3 times sometimes.

@gkatsev
Copy link
Member

gkatsev commented Jun 12, 2018

This is working for me and a lot of things have changed since. Going to close this. If this is still an problem, please open a new issue.

@gkatsev gkatsev closed this as completed Jun 12, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants