Skip to content

设置播放器音量 ​

方法名 ​

setPlayerVolume

用法 ​

  • 用法如下:
    js
    module.setPlayerVolume({
      params: {
        volume: 0.5
      },
      complete: (res) => {
        console.log(res)
      }
    })
    js
    module.setPlayerVolume({
      params: {
        volume: 0.5
      },
      complete: (res : LevenResult) => {
        console.log(res)
      }
    } as LevenOptions)
  • 参数说明
    参数名参数类型是否必填默认值参数描述
    paramsObject是无接口请求参数
    params.volumeInteger是无音量大小,取值范围:[0, 1]
    successFunction否无执行成功的函数
    failFunction否无执行失败的函数
    completeFunction否无执行完成的函数,不管成功还是失败都会执行

回调 ​

  • 示例
    json
    {
      "data": {},
      "message": "",
      "code": 0
    }
  • 回调说明:
    参数名参数类型参数描述
    messageString消息提示
    dataObject数据对象
    codeInteger返回类型,0.成功,其他:失败