在 iPhoneSDK 中的 UINavigationController 上播放从 Javascript 调用的视频
我有一个应用程序,单击按钮后,我想动态创建一个 UINavigationController
。 navigationController
上的当前视图将是一个 UIWebView
,呈现其中嵌入视频的 JavaScript
。当我单击视频的播放按钮时,视频开始播放,但我无法在前台看到视频。仅当我完全关闭 UINavigationController
时,我才能看到视频。
如何确保当我单击 UINavigationController
内的 UIWebView
中的“播放”按钮时,在前台的本机播放器中呈现视频,并且单击时在本机播放器中“完成”,我返回到“UINavigationController
”?
I have an application and on clicking a button, I want to create a UINavigationController
on the fly. The current view on the navigationController
would be a UIWebView
rendering a JavaScript
with an embedded video in it. When I click on the play button of the video, the video starts playing, but I'm not able to see the video on the foreground. I'm able to see the video only if I completely dismiss the UINavigationController
.
How do I make sure that when I click on the "Play" button in the UIWebView
inside the UINavigationController
, renders the video in the native player in the foreground and when clicked on "Done" in the native player, I go back to the "UINavigationController
" ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您如何显示初始化视频视图控制器?
您是否正在创建一个实例并将其呈现为模态视图?
这也取决于您使用的 iOS 版本:
How are you displaying initalizing the video view controller?
Are you creating an instance and presenting it as a modal view?
This also diffs depending on which version of iOS you are using:
下面是我如何创建需要渲染视频的 UIViewController 的代码片段:
“adHTML”是包含嵌入了视频的 JavaScript 的 URL。
Below is the code snippet of how I create my UIViewController which needs to render the video:
"adHTML" is the URL which contains the javascript which has the video embedded in it.