I am new at Swift Language. I want to develop simple movie player app for learning. I added some movies(".avi, .flv, .f4u.... which format is best) to my project. My view is just simple.There is a button on my view. ITs called "Play". When user tap on that button the movies will start.
Plus I need to play audio files too, like mp3 or .mid files. Can you give me how i can do that in Swift? IF you explain with example, It will be perfect.
Edit
I am not asking all code. I get confused when I try to convert my Objective C code to Swift. I want to know how I can develop below code in Swift?
NSString *path = [[NSBundle mainBundle] pathForResource:@"eminem1" ofType:@"mp4"];
MPMoviePlayerController *myPlayer = [[MPMoviePlayerController alloc] init];
myPlayer.shouldAutoplay = YES;
myPlayer.repeatMode = MPMovieRepeatModeOne;
myPlayer.fullscreen = YES;
myPlayer.movieSourceType = MPMovieSourceTypeFile;
myPlayer.scalingMode = MPMovieScalingModeAspectFit;
myPlayer.contentURL =[NSURL fileURLWithPath:path];
[self.view addSubview:myPlayer.view];
[myPlayer play];