spchuang / videojs-markers

Displays customizable markers upon progress bars of videojs players
http://sampingchuang.com/videojs-markers
MIT License
438 stars 190 forks source link

Problem with Videojs 5.X #74

Open shravanthanvi opened 6 years ago

shravanthanvi commented 6 years ago

hi When i use the marker. Markers are getting displayed. But i am not able to move the cursor on the controls.

Regards

spchuang commented 6 years ago

Do you have an example code I can take a look?

shravanthanvi commented 6 years ago

below is the marker code

var markers = array; var playedfirst = 0;

player.markers({ markerStyle: { 'width':'2px', 'border-radius': '2%', 'background-color': 'red' }, markerTip:{ display: true, text: function(marker) { return "Break: "+ marker.text; }, time: function(marker) { return marker.time; } }, breakOverlay:{ display: false, displayTime: 3, style:{ 'width':'100%', 'height': '20%', 'background-color': 'rgba(0,0,0,0.7)', 'color': 'white', 'font-size': '17px' }, text: function(marker) { return "Break overlay: " + marker.overlayText; } },

onMarkerClick: function(marker) {},
onMarkerReached: function(marker) {

  jQuery.ajax({
  url: 'http://testing.ursadda.in/VideoAPI/VideoWebApi.php?UID=<?echo $UID ?>',
  type: 'get',
  dataType: 'json',
  success:function(data)
  {
        var str = data.DynamicAdURL;
        var URL = str.replace(/`/g, '/');
        player.ima.changeAdTag(URL);

   } 
 });

player.ima.initializeAdDisplayContainer();
player.ima.requestAds();

},

markers: markers, });

for array variable for (var i = 1; i <= totalAds; i++) {

    array.push({
    'time': adpoint
    });
    adpoint+=450;       

    }

player.one('ready', function() {

player.play();

});

this is the video initialization <video id="media-vjs-<?php echo $item->id; ?>" controls preload="none" class="video-js vjs-fill vjs-big-play-centered" width="100%" height="100%" <?php echo $poster ? 'poster="' . $poster . '"' : ''; ?> <?php echo $config->get('media_autoplay') ? 'autoplay="autoplay"' : ''; ?>> <?php if ($sources->get('mp4')) : ?><?php endif; ?> <?php if ($sources->get('webm')) : ?><?php endif; ?> <?php if ($sources->get('ogg')) : ?><?php endif; ?> <?php if ($sources->get('flv')) : ?><?php endif; ?> <?php if (file_exists(JPATH_ROOT . '/images/webvtt/captions-' . $item->id. '.vtt')) : ?><?php endif; ?> <?php if (file_exists(JPATH_ROOT . '/images/webvtt/chapters-' . $item->id. '.vtt')) : ?><?php endif; ?>

spchuang commented 6 years ago

@shravanthanvi, sorry for the late reply. Do you mind creating a jsbin so I can actually debug it online? The code you shared as is isn't easy to replicate locally. Thanks