• <legend id='HYpK3'><style id='HYpK3'><dir id='HYpK3'><q id='HYpK3'></q></dir></style></legend>
    <i id='HYpK3'><tr id='HYpK3'><dt id='HYpK3'><q id='HYpK3'><span id='HYpK3'><b id='HYpK3'><form id='HYpK3'><ins id='HYpK3'></ins><ul id='HYpK3'></ul><sub id='HYpK3'></sub></form><legend id='HYpK3'></legend><bdo id='HYpK3'><pre id='HYpK3'><center id='HYpK3'></center></pre></bdo></b><th id='HYpK3'></th></span></q></dt></tr></i><div id='HYpK3'><tfoot id='HYpK3'></tfoot><dl id='HYpK3'><fieldset id='HYpK3'></fieldset></dl></div>

      <small id='HYpK3'></small><noframes id='HYpK3'>

        <bdo id='HYpK3'></bdo><ul id='HYpK3'></ul>
      1. <tfoot id='HYpK3'></tfoot>
      2. UIWebView 中的 MPMoviePlayerController 全屏电影

        时间:2023-10-21
          • <bdo id='377HH'></bdo><ul id='377HH'></ul>
          • <i id='377HH'><tr id='377HH'><dt id='377HH'><q id='377HH'><span id='377HH'><b id='377HH'><form id='377HH'><ins id='377HH'></ins><ul id='377HH'></ul><sub id='377HH'></sub></form><legend id='377HH'></legend><bdo id='377HH'><pre id='377HH'><center id='377HH'></center></pre></bdo></b><th id='377HH'></th></span></q></dt></tr></i><div id='377HH'><tfoot id='377HH'></tfoot><dl id='377HH'><fieldset id='377HH'></fieldset></dl></div>
            <tfoot id='377HH'></tfoot>

            <small id='377HH'></small><noframes id='377HH'>

                <legend id='377HH'><style id='377HH'><dir id='377HH'><q id='377HH'></q></dir></style></legend>
                  <tbody id='377HH'></tbody>

                • 本文介绍了UIWebView 中的 MPMoviePlayerController 全屏电影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我遇到了 UIWebView 和 MPMoviePlayerController 的问题:我的 UIWebView 在 html 中有一个电影(它是一个本地 html 文件),我正在使用 html5 和视频的视频标签.问题是:用户可以直接在html上将视频设置为内联播放,也可以点击全屏按钮,但我需要知道视频是否正在全屏播放.

                  I'm having a problem with the UIWebView and MPMoviePlayerController: My UIWebView have a movie inside the html (it's a local html file), I'm using html5 and a video tag for the video. The problem is: the user can set the video to play inline, directly on the html or he can tap the fullscreen button, but I need to know if the video is playing fullscreen.

                  我尝试使用 MPMoviePlayerDidEnterFullscreenNotification 但没有成功.

                  I've tried to use MPMoviePlayerDidEnterFullscreenNotification but with no success.

                  有人知道如何从 webview 获取此通知吗?

                  Does anybody know how to get this notification from the webview?

                  提前致谢

                  推荐答案

                  没有发送通知(另见这篇文章:Event on view 显示更改 (Youtube MPMoviePlayerViewController)),但 web 视图会做一些骇人听闻的事情:它将向根 添加一个子视图UIViewController 的 视图,将其设为全屏并在那里播放电影.

                  There is no notification being sent (also see this post: Event on view displayed change (Youtube MPMoviePlayerViewController)), but the web view will do something hackish: it will add a subview to the root UIViewController's view, make it full screen and play the movie there.

                  让你的主 UIViewController's 视图成为你自己的视图,并拦截 -didAddSubview:-willRemoveSubview:.这样您就可以检测播放器何时被全屏显示.

                  Make your main UIViewController's view a view of your own, and intercept -didAddSubview: and -willRemoveSubview:. This way you'll be able to detect when the player is brought fullscreen.

                  这篇关于UIWebView 中的 MPMoviePlayerController 全屏电影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:UIWebView 中的 EXC_BAD_ACCESS 下一篇:iPhone - 自动调整 UIWebView 内容的大小不适合框架

                  相关文章

                • <legend id='aM7PY'><style id='aM7PY'><dir id='aM7PY'><q id='aM7PY'></q></dir></style></legend>

                  <small id='aM7PY'></small><noframes id='aM7PY'>

                • <i id='aM7PY'><tr id='aM7PY'><dt id='aM7PY'><q id='aM7PY'><span id='aM7PY'><b id='aM7PY'><form id='aM7PY'><ins id='aM7PY'></ins><ul id='aM7PY'></ul><sub id='aM7PY'></sub></form><legend id='aM7PY'></legend><bdo id='aM7PY'><pre id='aM7PY'><center id='aM7PY'></center></pre></bdo></b><th id='aM7PY'></th></span></q></dt></tr></i><div id='aM7PY'><tfoot id='aM7PY'></tfoot><dl id='aM7PY'><fieldset id='aM7PY'></fieldset></dl></div>
                      <tfoot id='aM7PY'></tfoot>

                        <bdo id='aM7PY'></bdo><ul id='aM7PY'></ul>