theonion / videojs-vast-plugin

A VideoJS plugin for VAST
theonion.github.io/videojs-vast-plugin/
MIT License
264 stars 174 forks source link

grabs the first video it can ? Seriously ? #42

Open mohamedpsx opened 10 years ago

mohamedpsx commented 10 years ago

any way to make it work on multiple videos ?

Thank you.

csinchok commented 10 years ago

Please explain what you mean. Are you asking if it supports multiple source formats?

mohamedpsx commented 10 years ago

@csinchok thank you for your fast reply.

ok i want to run the plugin on multiple videos for example if i had 2 videos on a simple web page, the plugin will only work on the first one. any solution to make it run on all the videos on the same page ?

hacfi commented 10 years ago

@mohamedpsx That sounds like an issue with video.js or your javascript rather than with this plugin. How does your code look like?

mohamedpsx commented 10 years ago

hello @hacfi , well this is how i did try it, i started with the example provided with the plugin and i duplicated the video tag so i have this :

<video id="vid1" class="video-js vjs-default-skin" autoplay controls preload="auto"
      poster="http://video-js.zencoder.com/oceans-clip.png"
      data-setup='{}'
      width='640'
      height='400'
      >
    <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4'>
    <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm'>
    <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg'>
    <p>Video Playback Not Supported</p>
  </video>
<video id="vid2" class="video-js vjs-default-skin" autoplay controls preload="auto"
      poster="http://video-js.zencoder.com/oceans-clip.png"
      data-setup='{}'
      width='640'
      height='400'
      >
    <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4'>
    <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm'>
    <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg'>
    <p>Video Playback Not Supported</p>
  </video>

and the javascript :

 var vid1 = videojs('vid1');

    vid1.ads();
    vid1.vast({
      url: 'http://ad3.liverail.com/?LR_PUBLISHER_ID=1331&LR_CAMPAIGN_ID=229&LR_SCHEMA=vast2'
    });

 var vid2 = videojs('vid2');

    vid2.ads();
    vid2.vast({
      url: 'http://ad3.liverail.com/?LR_PUBLISHER_ID=1331&LR_CAMPAIGN_ID=229&LR_SCHEMA=vast2'
    });

And so i get the ads to work on the first but not the second video.I dnt think that my code is the problem.

Thank you

ashishsipl commented 10 years ago

We are working in the same problem, Hope we will have a solution soon

If someone have a solution ready, we are ready to pay him for the quick support.