This project is read-only.

VAST ad never plays

Topics: Windows 10 UWP
Mar 27, 2016 at 3:37 PM
Edited Mar 28, 2016 at 12:08 AM
I have my VAST advertising plugin setup in XAML as folows:
<playerFramework:MediaPlayer x:Name="VideoMediaPlayer" IsStopVisible="True" IsInteractiveChanged="VideoMediaPlayer_OnIsInteractiveChanged" MediaFailed="VideoMediaElement_OnMediaFailed" IsSkipAheadVisible="True" IsSkipBackVisible="True" IsReplayVisible="True" IsResolutionIndicatorVisible="True" IsFullScreenVisible="True" MediaEnded="MediaPlayer_MediaEnded" Width="854" Height="480" IsFullScreenChanged="VideoMediaElement_IsFullScreenChanged" MediaStarted="VideoMediaElement_OnMediaStarted" IsCastVisible="True" IsCastingEnabled="True" RequestedTheme="Dark">
                          <advertising:RemoteAdSource x:Name="VastAdSource" Type="vast"/>
I then do the following in the code behind:
VastAdSource.Uri = new Uri("<vast ad uri here>");
In my app, the ad never plays and it is a test ad so it should always play, however, if I put the same code in your sample project it works. I must be missing something that your sample ad has, but I can't see any configuration difference between the two. Are you able to help
Mar 28, 2016 at 12:20 AM
Edited Mar 28, 2016 at 12:21 AM
I've also tried putting the following code in the MediaStarting event:
var prerollAd = new PrerollAdvertisement();
prerollAd.Source = new RemoteAdSource() { Type = VastAdPayloadHandler.AdType, Uri = new Uri("") };
var adScheduler = VideoMediaPlayer.GetAdSchedulerPlugin();
I have the following in my XAML for the plugins:
Mar 28, 2016 at 12:30 AM
Edited Mar 28, 2016 at 12:40 AM
I changed it to midroll and I can get the midroll to play but I can't get prerolls to play.
Apr 14, 2016 at 9:27 AM
Try to set VideoMediaPlayer AutoPlay="False",
then after adScheduler.Advertisements.Add(prerollAd);
call VideoMediaPlayer.Play()

ref to @timgreenfield's answer:
Apr 22, 2016 at 3:55 AM

I'm not sure it is related to that, we have a live application that had the same issue but it is a JavaScript based app, however we are using the same binaries. We had 2 pc, it was working on one not on the other, after deep search we find out that the binaries of the PlayerFramework weren't the same....even if they were tagged with the same version . Unfortunately the version which was working is not the one available online. What does that mean ? That Playerframework guys publish and push a new binaries (obvious when checking the JS files) without updating the version...could have been unnoticed if this new binaries didn't break something. So you can find here the version that work for us :!674043&authkey=!AOoUqlHAt_TNILg&ithint=file%2czip just need to replace in the proper folder (read the readme files) and try. Of course when they updated the binaries they might have fixed some issues as far its fine in our case.

Apr 23, 2016 at 12:59 AM
Hello AEONSoft,
Which ads provider/network are you using?
I'm looking one for my video player?
Thank in advance