This project is read-only.
The player framework's advertising feature includes supports companion ads as long as you do a little work in your app to tell the companion ads where to display.

For Xaml (Windows 8 and Windows Phone 8):

The app developer needs to create a container for the companion ad to be placed. For example:
<Grid x:Name="banner_top" Background="#222222" HorizontalAlignment="Center" Width="300" Height="60"/>
Then in code, the container needs to be supplied to the player framework via:
player.Containers.Add(banner_top);
Note: a container can be an control that inherits Panel, ContentControl, or Border.

The player framework will automatically insert companion ads into this container at runtime if either:
  1. The companion ad container’s x:Name property matches the companion AdSlotId in VAST. VAST 3.0 only.
  2. The companion ad container’s width and height match the width and height of the companion ad in VAST. VAST 2.0 & 3.0.

For JavaScript:

The app developer needs to create a container for the companion ad to be placed. For example:
<div id="companionAd1" class="pf-companion-ad" style="width: 300px; height: 60px"></div>
The player framework will automatically insert companion ads into this container at runtime if either:
  1. The companion ad container’s id property matches the companion AdSlotId in VAST. VAST 3.0 only.
  2. The companion ad container uses the “pf-companion-ad” class AND the width and height match that of the companion ad in VAST. VAST 2.0 & 3.0.

Pausing Video When Companion Ad is clicked

If you want to pause the video or do anything in the app when the companion ad is clicked, handle the CoreWindow.VisibilityChanged event on the video player page. See this article for more details.

Last edited Oct 20, 2014 at 3:59 PM by mscherotter, version 3