oxspeed/js/ui/videoPlayer.js

44 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2013-03-04 08:44:48 +00:00
pandora.ui.videoPlayer = function(options) {
2013-03-05 11:50:51 +00:00
// var url = options.url;
console.log(options.url);
2013-03-04 08:44:48 +00:00
var timeline = options.timeline || "foo.png"; //FIXME
var that = pandora.$ui.videoPlayer = Ox.VideoPlayer({
video: [options.url],
//video: ["/oxspeed/jaaga.webm"],
2013-03-04 08:44:48 +00:00
controlsTop: ['fullscreen'],
controlsBottom: ['play', 'volume', 'scale', 'timeline', 'position'],
height: 300,
width: 400,
showControlsOnLoad: true,
duration: 35, //FIXME
paused: true,
timeline: options.timeline || 'foo.png', //FIXME
title: options.title,
2013-03-04 08:44:48 +00:00
enableTimeline: true,
enableKeyboard: true,
enableMouse: true,
externalControls: false
2013-03-04 08:44:48 +00:00
// enableTimeline: true
})
.bindEvent({
"position": setPosition,
'playing': setPosition
2013-03-04 08:44:48 +00:00
});
that.seek = function(by) {
var position = that.options("position");
var newPosition = position + by;
that.options("position", newPosition);
//setPosition({'position': newPosition});
};
function setPosition(data) {
//var position = pandora.$ui.videoPlayer.options("position");
pandora.$ui.annotationsPanel.options("position", data.position);
};
2013-03-05 11:50:51 +00:00
//that.videoName = options.name;
2013-03-04 08:44:48 +00:00
return that;
};