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;
|
2014-01-22 13:56:04 +00:00
|
|
|
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({
|
2014-01-22 13:56:04 +00:00
|
|
|
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,
|
2014-01-22 13:56:04 +00:00
|
|
|
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,
|
2014-01-22 13:56:04 +00:00
|
|
|
externalControls: false
|
2013-03-04 08:44:48 +00:00
|
|
|
// enableTimeline: true
|
2014-01-22 13:56:04 +00:00
|
|
|
})
|
|
|
|
.bindEvent({
|
|
|
|
"position": setPosition,
|
|
|
|
'playing': setPosition
|
2013-03-04 08:44:48 +00:00
|
|
|
});
|
2014-01-22 13:56:04 +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;
|
|
|
|
};
|
|
|
|
|