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: 3, text: "Roy Davis Jr. - House Inferno", overlayText: "Buy on iTunes Track (01): Roy Davis Jr. - House Inferno"} , {time: 245, text: "DJ Pierre Feat. Felicia - Come Together (What Is House?)", overlayText: "Buy on iTunes Track (02): DJ Pierre Feat. Felicia - Come Together (What Is House?)"} , {time: 474, text: "Phuture - Mental Breakdown (Professor Traxx Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (03): Phuture - Mental Breakdown (Professor Traxx Mix)"} , {time: 619, text: "Todd Terry Presents Sax - Make It Right", overlayText: "Buy on Beatport Track (04): Todd Terry Presents Sax - Make It Right"} , {time: 741, text: "not identified - yet", overlayText: " Track (05): not identified - yet"} , {time: 908, text: "Alex AQ - Don't Break It", overlayText: "Buy on Beatport Track (06): Alex AQ - Don't Break It"} , {time: 1030, text: "Beesmunt Soundsystem - Searchin'", overlayText: "Buy on iTunesBuy on Beatport Track (07): Beesmunt Soundsystem - Searchin'"} , {time: 1153, text: "not identified - yet", overlayText: " Track (08): not identified - yet"} , {time: 1441, text: "Delta Funktionen - Tab", overlayText: "Buy on Beatport Track (09): Delta Funktionen - Tab"} , {time: 1594, text: "not identified - yet", overlayText: " Track (10): not identified - yet"} , {time: 1874, text: "not identified - yet", overlayText: " Track (11): not identified - yet"} , {time: 2060, text: "DJ Ford Foster - Clankers", overlayText: " Track (12): DJ Ford Foster - Clankers"} , {time: 2204, text: "not identified - yet", overlayText: " Track (13): not identified - yet"} , {time: 2356, text: "Blake Baxter - Our Luv", overlayText: "Buy on iTunesBuy on Beatport Track (14): Blake Baxter - Our Luv"} , {time: 2478, text: "Joe Lewis - Funky Disco", overlayText: "Buy on iTunesBuy on Beatport Track (15): Joe Lewis - Funky Disco"} , {time: 2675, text: "Mall Grab - I Just Wanna", overlayText: "Buy on Beatport Track (16): Mall Grab - I Just Wanna"} , {time: 2865, text: "Mike Dunn - So Let It Be House!", overlayText: "Buy on iTunesBuy on Beatport Track (17): Mike Dunn - So Let It Be House!"} , {time: 2965, text: "not identified - yet", overlayText: " Track (18): 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('
'); $( ".tracks-nav" ).append( $( '
Track (01): Roy Davis Jr. - House Inferno
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),4141)}, 4000 );