私は私のiOSアプリケーションでHTTP VideoStreamingを実装しようとしています。私は自分のアプリケーションで2つのビューを持っています。最初はメインビューです。そのビューにはボタンがあり、ユーザーがそのボタンをクリックすると、VideoPlayerViewはサーバーからビデオをロードして再生します。ビデオはアプリケーション内で再生されています。ここで私はMPMoviePlayerの通知機能を宣言しなければなりません。助けてください
私のアプリケーションでは、私は2つのビューとAppDelegateを持っています。
AppDelegate
MainViewController
VideoPlayerView
私は自分のVideoPlayerViewクラスで自分のMPMoviePlayerプレーヤーを作成しています。私は通知機能を実装したい
// Register to receive a notification that the movie is now in memory and ready to play
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePreloadDidFinish:)
name:MPMoviePlayerContentPreloadDidFinishNotification
object:nil];
私はAppDelegateまたはVideoPlayerViewでこの関数を宣言する必要があります。
と私は、この関数を呼び出す必要があります場合は、どのクラスに
// Notification called when the movie finished preloading.
- (void) moviePreloadDidFinish:(NSNotification*)notification
{
}
を意味し、私を助けてください.....................