var player = videojs('video-player', {plugins: {videoJsResolutionSwitcher: {default: 'high'}}}, function(){
var player = this;
player.on('resolutionchange', function(){
// console.info('Source changed to %s', player.src());
// console.log(player.currentResolution());
})
});
var trackLikesArray = [];
player.markers({
markerStyle: {'width':'7px', 'height':'9px', 'margin-bottom':'6px', 'background-color': '#ca588a' },
markerTip:{display: true, text: function(marker) {
return marker.text;
}
},
breakOverlay:{
display: true,
displayTime: 1000,
text: function(marker) {return marker.overlayText;}
}
, markers: [
{time: 0, text: "", overlayText: "Track information"}
,
{time: 5, text: "Architectural - Strain Tensor", overlayText: " Track (01): Architectural - Strain Tensor"}
,
{time: 260, text: "Rodriguez Jr. - 2 Miles Away", overlayText: "
Track (02): Rodriguez Jr. - 2 Miles Away"}
,
{time: 462, text: "Marvin and Guy feat. Fantastic Twins - The Train Of Fantastic", overlayText: "
Track (03): Marvin and Guy feat. Fantastic Twins - The Train Of Fantastic"}
,
{time: 814, text: "not identified - yet", overlayText: " Track (04): not identified - yet"}
,
{time: 1307, text: "Marvin and Guy - Arpadia", overlayText: "
Track (05): Marvin and Guy - Arpadia"}
,
{time: 1508, text: "Ming - Escape", overlayText: "
Track (06): Ming - Escape"}
,
{time: 1849, text: "Elis M. Feeling - Digital Boy", overlayText: "
Track (07): Elis M. Feeling - Digital Boy"}
,
{time: 2104, text: "not identified - yet", overlayText: " Track (08): not identified - yet"}
,
{time: 2400, text: "Francesco Chiocci and Black Soda - Black Sunrise (Olderic Remix)", overlayText: "
Track (09): Francesco Chiocci and Black Soda - Black Sunrise (Olderic Remix)"}
,
{time: 2769, text: "Henrik Schwarz and Ame and Dixon feat. Derrick L. Carter - Where We At (Version 1)", overlayText: "
Track (10): Henrik Schwarz and Ame and Dixon feat. Derrick L. Carter - Where We At (Version 1)"}
,
{time: 3066, text: "not identified - yet", overlayText: " Track (11): not identified - yet"}
]
});
var positionTrackButtons = function(el, trackbuttons) {
var pos = $(el).offset();
var eWidth = $(el).outerWidth();
if (!eWidth) {setTimeout( function(){ positionTrackButtons(el, trackbuttons) }, 1000 );}
else {
var mWidth = $(trackbuttons).outerWidth();
var left = 1 + "px";
var width = eWidth -2 + "px";
var top = -14 + "px";
$(trackbuttons).css( {
opacity: '1',
position: 'absolute',
zIndex: 150000,
width: width,
left: left,
top: top
} );
$(trackbuttons).fadeIn();
}
};
setTimeout( function(){
$('.vjs-break-overlay').wrap('