BigVideo.js
BigVideo.js copied to clipboard
First, Awesome Code! / Issues with the new Chrome version 66 / Video auto play without sound not working
Description
Briefly describe the issue. Hi, Thank for creating such an awesome piece of code. I have been rocking it on all our sites for over a year with zero issues. More recently with chromes anti-auto play stuff, it seems like this code may have gotten caught in the crossfire.
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
- Go to https://www.nioralsurgery.com/
- Just watch the video load and pause on the first frame
You can see the same result on a few of our sites. Built the same way. They all stopped working together. https://amarillooralsurgery.com https://www.mtstateoms.com/ https://nalortho.com/
Results
Expected
The video to keep playing over and over
Actual
Currently, it's just passing on the first frame. You can see what I want it to look like if you click on any page off the homepage then click the homepage link to get back to the homepage.
Error output
video.min.js?ver=5.0.2:16 Uncaught (in promise) DOMException: The play() request was interrupted by a new load request.
This seems to be acting as though my video has audio when it does not.
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
what version of videojs does this occur with? 5.0.2
browsers
Chrome
OSes
Current version os OSX
plugins
Nope
Ok fixed it by adding muted="muted" to the video element and it fixed the issue =D.
Hi @gera3d, Could you elaborate: where do you add this parameter to fix the issue? I have the same problem. Thanks.
FWIW, I fixed this by editing bigvideo.js and changing line 264 from
player = $('<video id="'+vidEl.substr(1)+'" class="video-js vjs-default-skin" height="1" width="1" preload="auto" data-setup="{}" '+autoPlayString+' webkit-playsinline></video>');
to
player = $('<video id="'+vidEl.substr(1)+'" muted="muted" class="video-js vjs-default-skin" height="1" width="1" preload="auto" data-setup="{}" '+autoPlayString+' webkit-playsinline></video>');
(which is what I think @gera3d was referring to)