【问题标题】:React Native - Webview: How to play video in html fullscreenReact Native - Webview:如何在 html 全屏中播放视频
【发布时间】:2018-12-17 11:00:49
【问题描述】:

我在 react native 中使用 webview 来显示 html 内容。有时 html 包含可以渲染视频的 iframe。但默认情况下,当我在视频中触摸全屏选项时

下面是我的 HTML 示例,其中包含视频

<!DOCTYPE html>
<html lang="en">

<head>
    <style>
    .video-container {
        position: relative;
        padding-bottom: 56.25%;
        padding-top: 30px;
        height: 0;
        overflow: hidden;
    }

    .video-container iframe,
    .video-container object,
    .video-container embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    </style>
</head>

<body>
    <div class="video-container">
        <iframe allowfullscreen="" border="0" class="ud_content_iframe_custom" frameborder="0" id="ud_content_iframe" scrolling="no" src="https://vdo.matichon.co.th/videos/public/iframe/d4d7f619a787a8c29e8f3c44324ffb1b/adaptive_hls/?post_id=1275310&amp;category=daily-column%2Cnews-monitor%2Cprachachuen%2Cfood-travel" style="width:100%;" width="100%"></iframe>
    </div>
</body>

</html>

【问题讨论】:

    标签: react-native react-native-web


    【解决方案1】:

    由于您使用的是 iframe,请查看此线程。

    issue#172

    【讨论】:

    • 请在此处的 SO 帖子中直接包含答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-13
    • 1970-01-01
    • 2013-03-24
    • 2013-12-11
    • 2014-10-24
    • 1970-01-01
    • 2017-03-13
    相关资源
    最近更新 更多