VAST ad never plays

Topics: Windows 10 UWP
Mar 27 at 3:37 PM
Edited Mar 28 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">
<playerFramework:MediaPlayer.Plugins>
     <advertising:AdSchedulerPlugin>
          <advertising:AdSchedulerPlugin.Advertisements>
               <advertising:PrerollAdvertisement>
                    <advertising:PrerollAdvertisement.Source>
                          <advertising:RemoteAdSource x:Name="VastAdSource" Type="vast"/>
                    </advertising:PrerollAdvertisement.Source>
               </advertising:PrerollAdvertisement>
          </advertising:AdSchedulerPlugin.Advertisements>
     </advertising:AdSchedulerPlugin>
    <advertising:AdHandlerPlugin/>
</playerFramework:MediaPlayer.Plugins>
</playerFramework:MediaPlayer>
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 at 12:20 AM
Edited Mar 28 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("http://smf.blob.core.windows.net/samples/win8/ads/vast_linear.xml") };
var adScheduler = VideoMediaPlayer.GetAdSchedulerPlugin();
adScheduler.Advertisements.Clear();
adScheduler.Advertisements.Add(prerollAd);
I have the following in my XAML for the plugins:
<playerFramework:MediaPlayer.Plugins>
     <advertising:AdHandlerPlugin/>
     <advertising:AdSchedulerPlugin/>
</playerFramework:MediaPlayer.Plugins>
Mar 28 at 12:30 AM
Edited Mar 28 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 at 9:27 AM
Try to set VideoMediaPlayer AutoPlay="False",
then after adScheduler.Advertisements.Add(prerollAd);
call VideoMediaPlayer.Play()

ref to @timgreenfield's answer: https://playerframework.codeplex.com/discussions/459711
Apr 22 at 3:55 AM
Hi,

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 3.0.0.4 . 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 : https://onedrive.live.com/redir?resid=33D410474B8CEBCE!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 well..so far its fine in our case.

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