Reputation: 145
I'm using the HTML5 Background Video script (https://github.com/Victa/HTML5-Background-Video), and I'd like to be able to add some volume/play controls. I tried integrating solutions I found for other HTML5 video players, to no avail.
Minimally, I'd like a mute/volume control. Play/pause/stop would be optionally cool.
Here's the script calling the video:
var videobackground = new $.backgroundVideo($('#bgVideo'), {
"align" : "centerXY",
"path" : "video/",
"width": 1280,
"height": 720,
"filename" : "cows",
"types" : ["mp4", "webm"]
});
The site where I'm using the video is a Bootstrap template, and is located here: http://harbourcitydevelopment.com/beef/samples/sample-04/
Thanks for any ideas!
Upvotes: 3
Views: 2339
Reputation: 145
In the file 'jquery.backgroundvideo.min.js', I just added muted="true"
and controls="true"
, and it did the trick. Thanks to Atutouato for the suggestion with .play(), .pause(), which put me on the right track!
Upvotes: 1