虎牙开放平台文档

hyExt.player.getLayoutInfo

  • 获取播放器布局信息
  • 引入版本 1.8.0
  • 适用终端
    • 虎牙直播APP-iOS:7.13.0
    • 虎牙直播APP-安卓:7.13.3

接口签名

declare namespace hyExt { module player { /** * 获取播放器布局信息 */ function getLayoutInfo(): Promise<VideoLayoutInfoRsp> } /** * 播放器布局信息 */ type VideoLayoutInfoRsp = { /** * 是否处于缩小布局 */ isZoomOut: boolean } }

示例代码

hyExt.player .getLayoutInfo() .then((res) => { const { isZoomOut } = res console.log("调用hyExt.player.getLayoutInfo成功", res) }) .catch((err) => { console.log("调用hyExt.player.getLayoutInfo失败", err) })