我希望视频文件在我的应用程序中重复播放,并且我正在使用 MPMoviePlayerController 来播放视频文件
嗨朋友们, 我希望视频文件在我的应用程序中重复播放,并且我使用以下代码来播放视频文件
NSString *tempurl = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Movie.m4v"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:tempurl]];
player.view.frame = CGRectMake(0, 0, 867, 1008);
player.scalingMode = MPMovieScalingModeFill;
[self.view addSubview:player.view];
[player play];
我可以使用可以在视频文件播放结束时发出警报的委托方法吗 先感谢您
HI Friends,
I Want the Video File To Play repeatedly in my application and i have used the Following code to play the video file
NSString *tempurl = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Movie.m4v"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:tempurl]];
player.view.frame = CGRectMake(0, 0, 867, 1008);
player.scalingMode = MPMovieScalingModeFill;
[self.view addSubview:player.view];
[player play];
Can I Have The Delegate method that can give the alert for the video file end playing
Thank You In Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用属性“repeatMode”并将其设置为 MPMovieRepeatModeOne
you can use the property "repeatMode" and set it to MPMovieRepeatModeOne