set inital volume

This commit is contained in:
j 2021-08-04 14:17:27 +02:00
parent 1e0537c95f
commit fa93686845
2 changed files with 5 additions and 3 deletions

View file

@ -32,7 +32,8 @@ Ox.VideoElement = function(options, self) {
autoplay: false,
loop: false,
playbackRate: 1,
items: []
items: [],
volume: 1
})
.options(options || {})
.update({
@ -101,7 +102,7 @@ Ox.VideoElement = function(options, self) {
self.$videos = [getVideo(), getVideo()];
self.$video = self.$videos[self.currentVideo];
self.video = self.$video[0];
self.volume = 1;
self.volume = self.options.volume;
self.$brightness = $('<div>').css({
width: '100%',
height: '100%',

View file

@ -444,7 +444,8 @@ Ox.VideoPlayer = function(options, self) {
self.$video = Ox.VideoElement({
items: self.video,
loop: self.options.loop,
playbackRate: self.options.playbackRate
playbackRate: self.options.playbackRate,
volume: self.options.volume
})
.bindEvent(Ox.extend({
durationchange: durationchange,