Tuesday, September 22, 2015

How to Stream Video in XCode (4 Steps)


Open the Xcode software on your desktop and open the project for your iPhone or iPad app. Double-click the code file you want to use to play the movie.
Set up the movie controller to display the video. The following code sets up the video variable and sets the video to fill the entire screen:MPMoviePlayerController* movie=[[MPMoviePlayerController alloc] initWithContentURL:'movie.com/movie'];
movie.scalingMode=MPMovieScalingModeAspectFill;
Replace the 'movie.com/movie' with the URL that contains the streaming video.
Play the video. Add the following code to play the movie:[movie play];
Release the movie control after the movie finishes playing. The iPhone or iPad automatically closes the movie, but you can use the following line of code to close the movie when the user clicks your interface button:[movie release];
VPS Hosting

No comments:

Post a Comment