add playbackRate to video elements
This commit is contained in:
parent
da08120ff4
commit
f2e7c75d2c
5 changed files with 32 additions and 3 deletions
|
|
@ -47,6 +47,7 @@ Ox.VideoPlayer <f> Generic Video Player
|
|||
loop <b|false> If true, video loops
|
||||
muted <b|false> If true, video is muted
|
||||
paused <b|false> If true, video is paused
|
||||
playbackRate: <n|1> playback rate
|
||||
playInToOut <b|false> If true, video plays only from in to out
|
||||
position <n|0> Initial position (sec)
|
||||
poster <s|''> Poster URL
|
||||
|
|
@ -148,6 +149,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
loop: false,
|
||||
muted: false,
|
||||
paused: false,
|
||||
playbackRate: 1,
|
||||
playInToOut: false,
|
||||
position: 0,
|
||||
poster: '',
|
||||
|
|
@ -207,6 +209,11 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.options.paused = !self.options.paused;
|
||||
togglePaused();
|
||||
},
|
||||
playbackRate: function() {
|
||||
self.$video.options({
|
||||
playbackRate: self.options.playbackRate
|
||||
});
|
||||
},
|
||||
position: function() {
|
||||
setPosition(self.options.position);
|
||||
},
|
||||
|
|
@ -430,7 +437,8 @@ Ox.VideoPlayer = function(options, self) {
|
|||
});
|
||||
|
||||
self.$video = Ox.VideoElement({
|
||||
items: self.video
|
||||
items: self.video,
|
||||
playbackRate: self.options.playbackRate
|
||||
})
|
||||
.bindEvent(Ox.extend({
|
||||
durationchange: durationchange,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue