philipwatson / videojsx-vast-plugin

A video.js plugin to allow the player to serve adverts using VAST
Other
32 stars 23 forks source link

how to setup both pre-roll mid-roll post-roll #36

Closed hapo-hoangnh closed 7 months ago

hapo-hoangnh commented 1 year ago

hello @philipwatson how to setup both pre-roll mid-roll post-roll. if there is a setup like jwplayer that would be great. example:

jwplayer("myElement").setup({
  "playlist": "https://cdn.jwplayer.com/v2/media/123acb4e",
  "advertising": {
    "client": "vast",
    "adscheduleid": "Az87bY12",
    "schedule": [
      {
        "offset": "pre",
        "tag": "https://www.domain.com/adtag.xml"
      },
      {
        "offset": 10,
        "tag": "https://www.domain.com/adtag-mid-roll1.xml"
      },
      {
        "offset": "00:00:15:000",
        "tag": "https://www.domain.com/adtag-mid-roll2.xml"
      },
      {
        "offset": "25%",
        "tag": "https://www.domain.com/adtag-mid-roll3.xml"
      },
      {
        "offset": "post",
        "tag": "https://www.domain.com/adtag-post-roll.xml"
      }
    ]
  }
});

Also don't know if it's possible or not but it would be nice if an ad event is run.

philipwatson commented 1 year ago

Hi @hapo-hoangnh . Unfortunately, only preroll is supported at the moment.

I do intend to implement an ad break schedule where you can setup mid rolls etc. Thank you for giving me an example of how jwplayer does it.

Luxury-666 commented 1 year ago

1) hello, is it possible to add several networks to be in preroll, player should ask every link to find ad for this user, is it possible? like: player.vast( {url: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=', skip: 8}, {url: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=', skip: 8} );

Luxury-666 commented 1 year ago

2) And can you add support for waterfall VAST Example

philipwatson commented 1 year ago

Hi @Luxury-666 . This feature is also not supported at the moment. But will add to my todo list. I'm assuming by waterfall you mean fallback? The website you linked doesn't explain it.

philipwatson commented 7 months ago

Feature now supported. Closing issue.