Open shravanthanvi opened 6 years ago
Do you have an example code I can take a look?
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')) : ?>
@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
hi When i use the marker. Markers are getting displayed. But i am not able to move the cursor on the controls.
Regards