VAST prerolls

Jun 20, 2012 at 12:49 PM


I have a player where i do a ScheduleAdTrigger to start an ad when beginning playback, the player does not have autoplay. When i start this ad (and thereby triggering the player, there is a flash of the video before the ad is loaded. Is there any way to prevent this?

Also, i haven't been able to use MAST to do prerolls, it seems when ever i try the recommended OnItemStart condidition with this player it simply does not load the VAST. Doing a midroll using a timestamp trigger works fine though.

Lastly, it seems that non-standard tracking events break the VAST implementation. At least ADTECH is known to use those, anybody have a workaround for that?

- Loke

Sep 19, 2012 at 4:13 PM

I was searching for solution about this flashing videos before preroll too. I haven't found anything. Additionaly, when there are couple adverts triggered by the same condition (like three prerrols in a row) the main video in flashing between them.

Please share the solution if found one.

Nov 26, 2012 at 11:13 PM

Hi Loke and panjanek, there is a timing issue trying to use the SSME's ScheduleClip feature with prerolls due to the async nature of MAST & VAST. I can expand on this if you're interested. But, the way you can work around this is the player framework is to turn off the ScheduleClip feature. When you do this, under the hood we use 2 MediaElements to play an ad and have more control over the hiding and showing of the main content. To do this, you need to pass a metadata flag along to the ad plugin by setting this property on SMFPlayer in xaml (or the equivelent code behind)...

    <util:MetadataItem Key="Microsoft.Advertising.Vpaid.IsScheduleClipEnabled" Value="false"/>

Loke, regarding the adtech issue, this is due to non-compliant VAST as you already discovered. You'll need to change the VAST file or alter the player framework source code to be more forgiving. The quick and easy way is to grab the source code and modify Vast_2_0_1.cs by adding the non-standard enums to TrackingEvents_typeTrackingEvent, recompile and use that dll in your project.

Lastly, Loke, can you share a MAST file that is not playing a preroll? I am unable to repro this using:

Sorry for the delay on the response. Hopefully this helps, Tim

Dec 5, 2012 at 7:26 AM

Hi Tim

Thanks for the update. I would love if you could expand a bit on the timing issue, as i might hit that problem in other cases as well. Anyway, i will be testing the setting and report back when i have confirmed it with our player deployment :)

Yeah, i figured it was adhering to some strict standard, just couldn't find the place in code to add the extra events, i'll give Vast_2_0_1.cs a look, thanks. I don't think i have the MAST file anymore, as it was something i created as a test. But whenever i used OnItemStart it wouldn't trigger, but it did when using a set time, thinking back this might have been in the previous release of the framework though, so if something has been fixed in the latest, i might not have tested that scenario again.

- Loke

Dec 5, 2012 at 9:33 PM

Hi Loke, to explain more about prerolls: the SSME requires that ScheduleClip is called from ManifestReady for prerolls. The challenge with this and VAST is that VAST requires an async request to the server before it knows what clip to schedule... and by then ManifestReady has already come and gone. The symptoms you're seeing are a result of setting AutoPlay=false on the SSME and calling ScheduleClip from MediaOpened, then calling SSME.Play to kick off playback. When doing this, you actually see the first few frames of the main content before the clip plays (note: this is expected behavior of the SSME, not a bug).

Technically, the only way to use ScheduleClip and VAST together for prerolls would be to download the VAST file before setting the source on the SSME, then wait for ManifestReady and call ScheduleClip from there. This is not currently supported in MMPPF because the MAST implementation does not kick off the VAST download until the source is set. While this could be implemented in MMPPF, it would be a significant refactor and instead the way we worked around it was to not use ScheduleClip and instead overlay a second SSME on top of the first to play the ad (controlled by the metadata setting above).

Let me know if you have any more questions about this. Cheers, Tim

Apr 8, 2013 at 3:03 PM
Has been a few month since the last post here - but i have the same issue. The first half or full second of the movie is played and only then the advertisement starts. Same for the post roll advertisement.

Can you please supply more code on what must be changed? The is scheduled Clip enabled is turned off:
player.GlobalConfigMetadata.Add("Microsoft.Advertising.Vpaid.IsScheduleClipEnabled", "false");