forked from 0x2620/pandora
check playback range, save resolution changes
This commit is contained in:
parent
a6c8f68047
commit
63713cf4c9
1 changed files with 18 additions and 11 deletions
|
@ -41,6 +41,7 @@ Ox.load('UI', {
|
||||||
paused: options.paused,
|
paused: options.paused,
|
||||||
position: options['in'],
|
position: options['in'],
|
||||||
poster: '/' + options.item + '/' + '128p' + options['in'] +'.jpg',
|
poster: '/' + options.item + '/' + '128p' + options['in'] +'.jpg',
|
||||||
|
resolution: pandora.user.ui.videoResolution,
|
||||||
showMarkers: false,
|
showMarkers: false,
|
||||||
showMilliseconds: 0,
|
showMilliseconds: 0,
|
||||||
timeline: '/' + options.item + '/' + 'timeline16p.png',
|
timeline: '/' + options.item + '/' + 'timeline16p.png',
|
||||||
|
@ -49,20 +50,26 @@ Ox.load('UI', {
|
||||||
width: document.width
|
width: document.width
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
position: function(data) {
|
playing: checkRange,
|
||||||
if(data.position<options['in']
|
position: checkRange,
|
||||||
|| data.position > options.out) {
|
resolution: function(data) {
|
||||||
if(!pandora.player.options('paused')) {
|
pandora.api.setUI({'videoResolution': data.resolution});
|
||||||
pandora.player.togglePaused();
|
},
|
||||||
}
|
|
||||||
pandora.player.options({
|
|
||||||
position: options['in'],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
Ox.UI.hideLoadingScreen();
|
Ox.UI.hideLoadingScreen();
|
||||||
|
|
||||||
|
function checkRange(data) {
|
||||||
|
if(data.position < options['in']
|
||||||
|
|| data.position > options.out) {
|
||||||
|
if(!pandora.player.options('paused')) {
|
||||||
|
pandora.player.togglePaused();
|
||||||
|
}
|
||||||
|
pandora.player.options({
|
||||||
|
position: options['in'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue