gpt4 book ai didi

ios - 播放视频 iPad Ios6

转载 作者:行者123 更新时间:2023-11-29 11:06:39 24 4
gpt4 key购买 nike

我需要在应用程序启动时播放视频

我的代码完美适用于 Iphone Ipad 模拟器

但不是在物理Ipad的设备上

怎么了??

- (void)viewDidLoad
{

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {

NSURL* url = [[NSBundle mainBundle] URLForResource:@"Intro3" withExtension:@"mp4"];

m_player = [[MPMoviePlayerController alloc] initWithContentURL:url];
[m_player.backgroundView setBackgroundColor:[UIColor blackColor]];
[m_player.view setBackgroundColor:[UIColor blackColor]];
[m_player setControlStyle:MPMovieControlStyleNone];
[[m_player view] setFrame:[self.view bounds]];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
[m_player play];
[self.view addSubview:[m_player view]];

}
else{
---play video in iphone---
}

}

最佳答案

代码完美运行!!!

问题是视频的分辨率太大了。

调整大小并工作 =)

关于ios - 播放视频 iPad Ios6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13334253/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com