VideoContext.hideStatusBar

解释:隐藏状态栏,仅在 iOS 全屏下有效。

# 方法参数

# 示例

扫码体验
重新加载
请使用百度APP扫码

# 代码示例

    <view class="wrap">
        <video id="myVideo" enable-danmu="true" src="https://b.bdstatic.com/miniapp/development_tool/Smartprogram.mp4"></video>
        <button bindtap="hideStatusBar">点击隐藏状态栏</button>
    </view>
    
    Page({
        onLoad() {
            this.videoContext = swan.createVideoContext('myVideo');
            this.videoContext.play();
        },
        hideStatusBar() {
            this.videoContext.requestFullScreen({direction: 90});
            let that = this;
            setTimeout(function () {
                that.videoContext.hideStatusBar();
            }, 5000);
        }
    });