denivip / ios-vast-player

IAB VAST ads playback in iOS AVPlayer
http://blog.denivip.ru/index.php/2012/08/ios-player-with-vast-video-ad-support/?lang=en
MIT License
82 stars 34 forks source link

Firing Impression, Tracking, click events from the VAST xml #8

Closed rockrebel closed 11 years ago

rockrebel commented 11 years ago

Hi, Thank you so much for the VAST player and Sample. Is there a way I can fire all the events while the Ad Video is playing ? if yes can you please let me know the steps.

For example I want to fire

  1. Impression , start event at 0 second interval of VIdeo Ad
  2. firstQuartile, secondQuartile etc... 3.Similarly user initiated events like mute, unmute, fullscreen , click , rewind , pause and all...

Thank you Moh

sagarsg commented 11 years ago

Hi,

I am working on Tracking Events in VAST 2.0. What is the best way to mute/unmute Video ad playing on AVPlayer? The AVFoundation group says that the mute/unmute functions does not work on HTTP live streams ("AVAudioMix only supports file-based assets.").

https://developer.apple.com/library/ios/#qa/qa1716/_index.html

Please assist.

Thanks, vog

kolyuchiy commented 11 years ago

@vogwheels You can try doing it like this:

- (IBAction)toggleMute
{
    if ([MPMusicPlayerController applicationMusicPlayer].volume == 0.f) {
        [MPMusicPlayerController applicationMusicPlayer].volume = self.preMuteVolume;
    }
    else {
        self.preMuteVolume = [MPMusicPlayerController applicationMusicPlayer].volume;
        [MPMusicPlayerController applicationMusicPlayer].volume = 0.f;
    }
}
rockrebel commented 11 years ago

Hi kolyuchiy, Can you please look into questions I posted and give any pointers on those ?

Thanks Mohan

kolyuchiy commented 11 years ago

@rockrebel I think the code from @stuffmc that I've merged today includes the functionality that you're asking about. Please, check if it works for you.

stuffmc commented 11 years ago

@rockrebel regarding your Initiating comment:

  1. yup
  2. yup
  3. nope — my customer didn't need those guys, but if you look for trackEvent: in the code you'll see everything I track.