public override void ViewDidAppear (bool animated) { base.ViewDidAppear (animated); if (Player == null) { seekToZeroBeforePlaying = false; Player = new AVPlayer (); Player.AddObserver (this, (NSString)"rate", NSKeyValueObservingOptions.Old | NSKeyValueObservingOptions.New, RateObservationContext.Handle); playerView.player = Player; } addTimeObserverToPlayer (); // Build AVComposition and AVVideoComposition objects for playback Editor.BuildCompositionObjects (true); synchronizePlayerWithEditor (); }
public override void ViewDidLoad() { base.ViewDidLoad (); string path = NSBundle.MainBundle.PathForResource ("Dramatic2", "m4a"); if (path != null) { memeEffect = AVPlayer.FromUrl (NSUrl.FromFilename (path)); memeEffect.AddObserver (this, (NSString) "rate", (NSKeyValueObservingOptions)0, MemePlaybackContext); } path = NSBundle.MainBundle.PathForResource ("Sosumi", "wav"); if (path != null) beepEffect = AVPlayer.FromUrl (NSUrl.FromFilename (path)); setupAVCapture (); if (MaxZoom == 1f && device != null) { displayErrorOnMainQueue (null, "Device does not support zoom"); slider.Enabled = false; } }