简体   繁体   English

iPhone SDK:欢迎视频

[英]iPhone SDK: Welcome video

Right, I have a video ready for it to be played on start up of my iphone App. 正确,我已经准备好在iphone应用程序启动时播放的视频。 How can I get this implemented into my Xcode project? 如何将其实现到我的Xcode项目中?

I would like it to load as soon as the app is loaded, and the after it is played, to follow onto the correct view controller where the main bulk of my programming is. 我希望它在应用程序加载后立即加载,然后在播放之后加载到程序主要工作所在的正确视图控制器上。

It's not clear which part you have trouble with: 目前尚不清楚您在哪一部分上遇到麻烦:

  1. Playing video and getting notified when it's finished: See " How do i initiate video playback in my code? " from Audio/Video coding howtos . 播放视频并在完成时得到通知:请参阅“ 音频/视频编码方法 ”中的“ 如何在我的代码中启动视频回放? ”。
  2. Starting it as soon the application is loaded: applicationDidFinishLaunching is a good place to call. 加载应用程序后立即启动: applicationDidFinishLaunching是一个不错的调用位置。

The issue is that you'll see your window's content until the video is loaded, one possible workaround: 问题是您会在加载视频之前看到窗口的内容,这是一种可能的解决方法:

  • add an image of the first frame to the window, and hide that image when the video finished 将第一帧的图像添加到窗口中,并在视频结束时隐藏该图像
  • you should also add this first frame as Default.png to show it until your application is loaded 您还应该将第一帧添加为Default.png以显示它,直到加载应用程序为止
  • you might need to hide the status bar on startup ( UIStatusBarHidden ) and show it when the movie finished ( setStatusBarHidden ). 您可能需要在启动时隐藏状态栏( UIStatusBarHidden ),并在影片播放完后显示它( setStatusBarHidden )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM