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

Play button does not hide on autostart and Chrome 35.0.1916.114 m sometimes #1237

Closed
mdempfle opened this issue May 24, 2014 · 12 comments
Closed

Comments

@mdempfle
Copy link

What happened? (actual results)

  • When using autoplay the big play button does not hide sometimes when using

What should have happened? (expected results)

  • Play button should disapear and othe controls available

Video.js version (e.g. v4.3.0)

  • version 4.6.1

Video.js plugins used (e.g. videojs-youtube)

  • demo that comes with the download

Browsers + platforms where this is happening (e.g. Windows XP IE8)

  • win 7 - Chrome 35.0.1916.114
    Browsers + platforms where this is NOT happening (e.g. Mac Chrome 30)
  • win 7 - Firefox 29.0.1

Reduced test case or online example (link)
http://www.tinywebgallery.com/test/video-js/demo2.html
This is the demo from the download with added autoplay.
Press the reload button of the browser sometimes cause that the play button does not disaper anymore. Making a hard reload (Developer tools open clicking "Hard reload") causes to fix this most of the time.
Using the Javascript api to start the player with
https://github.com/videojs/video.js/blob/stable/docs/guides/api.md
does not make a difference. It is even worse:
http://www.tinywebgallery.com/test/video-js/demo3.html
here the play button never disapears.

Best, Michael

@kecksk0enig
Copy link

I experienced something related on chromium.
even without autoplay sometimes the controlbar wont hide. neither in fullscreen nor windowed.

In Chromium one can rightclick into the video and select "show controlbar"
than it will show the native html5 controlbar (behind the Video.js controlbar)
if I disable this setting the html5- controlbar hides, but the video-js bar will never autohide again.

@mmcc mmcc added bug labels May 28, 2014
@mmcc
Copy link
Member

mmcc commented May 28, 2014

@kecksk0enig that sounds like a different issue altogether. If you can reproduce it consistently, please open a new ticket for tracking.

@mdempfle I can confirm this is happening. However, you said performing a hard reload (shift+refresh) fixed it, but I'm seeing the opposite. Just refreshing the page seems to work fine (on the first example), but with a hard refresh I can see this every time.

@umbreak
Copy link

umbreak commented Jun 6, 2014

Same here. In videoJS version 4.5 autoplay hides the play button on start for Chrome (Version 35.0.1916.114).

However, the same for version 4.6 does not hide it (and does not show the control buttons). After clicking several times on the video it eventually shows the controls and hides the play button.

        <video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered"
      controls preload="auto" width="640" height="360"
      poster="whatever.png"
      data-setup='{"autoplay":true'>
     <source src="whatever.mp4" type='video/mp4' />
    </video>    

@sethborg
Copy link
Contributor

Firefox 29, videojs 4.6.1 the issue occurs when you dynamically create the video.

I'm using this to autoplay the video until it's patched:

<video id="video" width="720" height="480" preload="auto" controls="controls"
 class="video-js vjs-default-skin vjs-big-play-centered">
<source src="blah.mp4" type="video/mp4" />
</video>

videojs('video', {}, function() {
    this.play();
    $('.vjs-big-play-button').css('display', 'none');
    $('.vjs-control-bar').css('display', 'block');
});

@heff
Copy link
Member

heff commented Jun 10, 2014

Working on a fix in #1271

@stephen-hill
Copy link

I've just found a workaround which seems to fix the issue for now.

_V_("video-player-id").ready(function()
{
  var player = this;

  player.on("loadedmetadata", function()
  {
    player.play();
  });
});

@sethborg
Copy link
Contributor

They already fixed it in 4.6.2
Also V id depreciated, use videojs('video-player-id')

@stephen-hill
Copy link

@sethborg Thanks for the heads up.

Just as a note to the development team, http://vjs.zencdn.net/4.6/video.js still points to 4.6.1 instead of 4.6.2.

@mmcc
Copy link
Member

mmcc commented Jun 13, 2014

Thanks for the heads up @stephen-hill, Akamai wasn't updating. It's resolved now (to 4.6.3).

@sethborg is correct, this issue was fixed by #1271.

@aproni34f
Copy link

I can still replicate this issue with videojs 7 even in Chrome. Note that I am opening video in fancybox. The only difference is that when I use absolute video url, then the player button remains, while if I use relative url, then it works an intended:

absolute url (play button remain visible): https://interactivepixel.net/tst/2/videojs.html

relative url (works as intended): https://interactivepixel.net/tst/2/videojs_2.html

You can look at the source code. I tried add timeout in fancybox open to init video js with delay but no change. Note however it only happen sin fancybox. If I try adding video to body, then it doesnt happen.

@gkatsev
Copy link
Member

gkatsev commented May 6, 2022

Not sure exactly what the difference is, but it seems like it's fancybox autoplaying manually and Video.js isn't picking it up. In vidoejs.html even if I remove autoplay param from the video element, it still autoplays.

@aproni34f
Copy link

aproni34f commented May 6, 2022

Yes, fancybox does autoplay, but if I turn off autoplay in fancybox and try to play with videojs, the same weird issue with absolute/ relative url (absolute url doesnt want to autoplay)

https://interactivepixel.net/tst/2/videojs3.html

Even if I change the events, like canplay or canplaythrough still no luck.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 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

9 participants