监听截屏事件


接口说明

支持版本>=10.1.0

监听用户主动截屏事件

HWH5.onUserCaptureScreen

请求参数

参数 类型 必填 说明
function Function 手机截屏成功回调函数,失败会进入catch回调

注意:截屏事件监听,多次申明只会回调最后一次

返回结果

无。

请求示例

  • ES6版本

    HWH5.onUserCaptureScreen(()=>{
      console.log('截屏成功')
    }).catch(error=>console.log(error));
    
  • ES5版本

    HWH5.onUserCaptureScreen(function () {
      console.log('截屏成功')
    }).catch(function (error) {
      console.log(error)
    });
    

result. ""

    Not Found. ""