¡@

Home 

2014/10/15 ¤U¤È 10:13:50

iphone Programming Glossary: self.player

AVAudioPlayer fade volume out

http://stackoverflow.com/questions/1216581/avaudioplayer-fade-volume-out

ideas Thanks iphone avaudioplayer volume share improve this question Here's how I'm doing it void doVolumeFade if self.player.volume 0.1 self.player.volume self.player.volume 0.1 self performSelector @selector doVolumeFade withObject nil afterDelay.. volume share improve this question Here's how I'm doing it void doVolumeFade if self.player.volume 0.1 self.player.volume self.player.volume 0.1 self performSelector @selector doVolumeFade withObject nil afterDelay 0.1 else Stop and get.. share improve this question Here's how I'm doing it void doVolumeFade if self.player.volume 0.1 self.player.volume self.player.volume 0.1 self performSelector @selector doVolumeFade withObject nil afterDelay 0.1 else Stop and get the sound ready for..

playing a .caf file: works fine in simulator but not in iPhone

http://stackoverflow.com/questions/1363972/playing-a-caf-file-works-fine-in-simulator-but-not-in-iphone

alloc initWithContentsOfURL self.soundFileURL error nil if self.soundFileURL isFileURL printf isFileURL n self.player newPlayer newPlayer release player prepareToPlay player setDelegate self recorderLabel.text @ Playing.. player play printf..

MPMoviePlayerController switching movies causes white flash

http://stackoverflow.com/questions/4560065/mpmovieplayercontroller-switching-movies-causes-white-flash

@selector movieTwoItemDidReachEnd name AVPlayerItemDidPlayToEndTimeNotification object self.movieTwoItem self.player play void movieOneItemDidReachEnd NSNotification notification play movie two once movie one finishes self.player seekToTime.. self.player play void movieOneItemDidReachEnd NSNotification notification play movie two once movie one finishes self.player seekToTime kCMTimeZero self.player replaceCurrentItemWithPlayerItem self.movieTwoItem self.player play void movieTwoItemDidReachEnd.. NSNotification notification play movie two once movie one finishes self.player seekToTime kCMTimeZero self.player replaceCurrentItemWithPlayerItem self.movieTwoItem self.player play void movieTwoItemDidReachEnd NSNotification notification..

Playing many different videos on iphone using AVPlayer

http://stackoverflow.com/questions/6258573/playing-many-different-videos-on-iphone-using-avplayer

contentURL options nil playerItem AVPlayerItem playerItemWithAsset asset isPaused false controlsHidden false self.player AVPlayer playerWithPlayerItem playerItem retain duration self.player.currentItem.asset.duration return self This is the.. asset isPaused false controlsHidden false self.player AVPlayer playerWithPlayerItem playerItem retain duration self.player.currentItem.asset.duration return self This is the code that plays the video void playMovie UITapGestureRecognizer tapRecon..

AVPlayer Video SeekToTime

http://stackoverflow.com/questions/6329706/avplayer-video-seektotime

show you how I did the slider part. IBAction sliding id sender CMTime newTime CMTimeMakeWithSeconds seeker.value 1 self.player seekToTime newTime void setSlider sliderTimer NSTimer scheduledTimerWithTimeInterval 1.0 target self selector @selector.. Float64 dur CMTimeGetSeconds duration return dur Float64 currentTimeInSeconds Float64 dur CMTimeGetSeconds self.player currentTime return dur And that's it there are two gotchas in this code first the duration property returns a CMTime variable..

AVPlayer streaming progress

http://stackoverflow.com/questions/7691854/avplayer-streaming-progress

I am just working on this and so far have the following NSTimeInterval availableDuration NSArray loadedTimeRanges self.player currentItem loadedTimeRanges CMTimeRange timeRange loadedTimeRanges objectAtIndex 0 CMTimeRangeValue float startSeconds..

iOS : How to reference a music background from a singleton class?

http://stackoverflow.com/questions/8455576/ios-how-to-reference-a-music-background-from-a-singleton-class

release player release super dealloc #endif #pragma mark #pragma mark Custom Methods IBAction toggleMusic if self.player isPlaying YES self.player stop else self.player play self.playBgMusic.enabled YES void viewDidLoad NSString path NSBundle.. super dealloc #endif #pragma mark #pragma mark Custom Methods IBAction toggleMusic if self.player isPlaying YES self.player stop else self.player play self.playBgMusic.enabled YES void viewDidLoad NSString path NSBundle mainBundle pathForResource.. #pragma mark #pragma mark Custom Methods IBAction toggleMusic if self.player isPlaying YES self.player stop else self.player play self.playBgMusic.enabled YES void viewDidLoad NSString path NSBundle mainBundle pathForResource @ music ofType @ mp3..