Pause ad

Topics: Windows Phone 8
Aug 2, 2013 at 9:50 AM
Hi all!

How can I pause a preroll ad and resume it when the application has been deactivated, just like when a phone call arrives? I've tried to save the MediaState and restore it, but then the ad starts from the beginning.

Thanks in advance,
Tamas
Coordinator
Aug 8, 2013 at 6:21 PM
To pause an ad you can call MediaPlayer.InteractiveViewModel.Pause()
This will simulate what happens when the user clicks the pause button.

However, please note that the MediaElement looses its connection with the source when the app is deactivated and you must reset the source when resuming (this is what the MediaState methods help with). I believe a phone call is one of the actions that deactivates an app.

For ads it becomes even harder to restore the exact previous state due to all the complexities of nonlinear ads, companion ads, VPAID ads, ad pods...etc. Therefore, right now, we just restart or skip the ad (depending on your settings).
Sep 9, 2014 at 4:24 AM
Therefore, right now, we just restart or skip the ad (depending on your settings)
What settings are you referring to? It seems the default is to skip the ad, and I was hoping to set it to restart, but I can't seem to find the setting.

Thanks in advance!