VideoContext.exitFullScreen

2020-08-26 16:32 更新

解释:退出全屏

方法参数

示例 

在开发者工具中打开


图片示例

代码示例

<view class="wrap">
    <video id="myVideo" enable-danmu="true" src="https://b.bdstatic.com/miniapp/development_tool/Smartprogram.mp4" rel="external nofollow" ></video>
    <view class="text">设置5s内自动退出全屏</view>
</view>
Page({
    onLoad() {
        this.videoContext = swan.createVideoContext('myVideo');
        this.videoContext.play();
        this.videoContext.requestFullScreen({direction: 90});
        let that = this;
        setTimeout(function () {
            that.videoContext.exitFullScreen();
        }, 5000);
    }
});


以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号