Open Dzoge opened 4 years ago
@Dzoge did you ever get this figured out. I'm having what looks to be the same or similar issue:
TypeError: undefined is not an object (evaluating 'a.suppressedTracks')
The error happens when endLinearAdMode
is called for me.
@Dzoge did you ever get this figured out. I'm having what looks to be the same or similar issue:
TypeError: undefined is not an object (evaluating 'a.suppressedTracks')
The error happens when
endLinearAdMode
is called for me.
I ended up using old version of some libraries and managed to make it work. Can’t remember the details though.
Okay great, thanks for the reply.
I get this also. live HLS refuses to return and play back. Stuck in pending on the master playlist.
Has` anyone been able to solve this? I am getting the same issue when attempting to run a preroll video before an hls stream. Here is my markup and code (Codepen eg: https://codepen.io/elkhatibmsi/pen/BaKwVVx).
FYI I am using the boilerplate provided by the videojs-contrib-ads documentation: http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html.
<script src="https://vjs.zencdn.net/7.6.0/video.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-ads/6.7.0/videojs-contrib-ads.js"></script>
<link href="https://vjs.zencdn.net/7.8.4/video-js.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-ads/6.3.0/videojs-contrib-ads.css" rel="stylesheet" type="text/css">
<video id="webcam" class="video-js vjs-default-skin" controls width="640" height="264">
<source src="https://nzp-ms05.si.edu/live_edge_elephant/elephant01_all.smil/playlist.m3u8" type="application/x-mpegurl" />
</video>
<script>
videojs('webcam', {}, function(){
var player = this;
player.ads(); // initialize videojs-contrib-ads
// request ads whenever there's new video content
player.on('contentchanged', function() {
// in a real plugin, you might fetch new ad inventory here
player.trigger('adsready');
});
player.on('readyforpreroll', function() {
player.ads.startLinearAdMode();
// play your linear ad content
// in this example, we use a static mp4
player.src('https://images.all-free-download.com/footage_preview/webm/dragonfly_17.webm');
// send event when ad is playing to remove loading spinner
player.one('adplaying', function() {
player.trigger('ads-ad-started');
});
// resume content when all your linear ads have finished
player.one('adended', function() {
player.ads.endLinearAdMode();
});
});
// in a real plugin, you might fetch ad inventory here
player.trigger('adsready');
});
</script>
Hi everyone, I got this issue only when the main source is live stream and able to fix it by adding liveCuePoints
to ads()
initialization as mentioned in their documentation http://videojs.github.io/videojs-contrib-ads/integrator/options.html
player.ads({
liveCuePoints: false
});
Greetings!
I ran into an issue with HLS live stream not switching back to playback after the ad is finished. The following error is logged:
ERROR: TypeError: Cannot read property 'suppressedTracks' of undefined
referring toplayer.ads.snapshot
object inrestorePlayerSnapshot
function ofvideojs-contrib-ads
plugin.But this happens only on my desktop browsers and does not happen on my iPhone (Safari, Chrome). Unfortunately I do not have aaccess to an Android phone at the moment.
I tested on the latest Chrome and Firefox on desktop:
I found a similar issue #173 but that's closed and looks like this is a different case.
I am using videojsx-vast-plugin for ads with the latest versions of:
I have setup the examples:
This is my setup: