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: 0, text: "not identified - yet", overlayText: " Track (01): not identified - yet"} , {time: 3, text: "Dj Deeon, Lee Walker - Freak Like Me (Sonny Fodera Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (02): Dj Deeon, Lee Walker - Freak Like Me (Sonny Fodera Remix)"} , {time: 150, text: "Made By Pete - Sign Of The Times", overlayText: "Buy on iTunesBuy on Beatport Track (03): Made By Pete - Sign Of The Times"} , {time: 373, text: "Todd Terry & Limelife - Baby Can You Reach (Rogers & Denis Quin Tribute to the Maestro Mix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (04): Todd Terry & Limelife - Baby Can You Reach (Rogers & Denis Quin Tribute to the Maestro Mix)"} , {time: 563, text: "Waitz - THPS", overlayText: "Buy on iTunesBuy on Beatport Track (05): Waitz - THPS"} , {time: 802, text: "Soul Vision - Don't Stop (Dario D'Attis Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (06): Soul Vision - Don't Stop (Dario D'Attis Remix)"} , {time: 979, text: "Ron Carroll - The Sermon (Tobi Kramer Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (07): Ron Carroll - The Sermon (Tobi Kramer Remix)"} , {time: 1162, text: "Dennis Ferrer - Hey Hey (DF's Attention Vocal Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (08): Dennis Ferrer - Hey Hey (DF's Attention Vocal Mix)"} , {time: 1412, text: "Copyright Feat. Song Williamson - He Is (Ferrer & Sydenham Vocal Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (09): Copyright Feat. Song Williamson - He Is (Ferrer & Sydenham Vocal Mix)"} , {time: 1717, text: "Dj Le Roi - I Get Deep Feat. Roland Clark (Late Nite Tuff Guy Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (10): Dj Le Roi - I Get Deep Feat. Roland Clark (Late Nite Tuff Guy Remix)"} , {time: 2035, text: "Sam Divine, Curtis Gabriel, Nat Conway - Confessions (Waiting Mix)", overlayText: "Buy on Beatport Track (11): Sam Divine, Curtis Gabriel, Nat Conway - Confessions (Waiting Mix)"} , {time: 2261, text: "K & K - Peaceful Crowd", overlayText: "Buy on iTunesBuy on Beatport Track (12): K & K - Peaceful Crowd"} , {time: 2522, text: "Harry Romero - Tania (Riva Starr Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (13): Harry Romero - Tania (Riva Starr Remix)"} , {time: 2783, text: "Adrian Hour - That's It", overlayText: "Buy on iTunesBuy on Beatport Track (14): Adrian Hour - That's It"} , {time: 3030, text: "Groove Armada - Love Sweet Sound (Kolsch Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (15): Groove Armada - Love Sweet Sound (Kolsch Remix)"} ] }); 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): not identified - yet
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),7736)}, 4000 );