Polyv Help Center

Help Center

API

Updated: 2025-10-10 12:02:04

API Call

<polyv-live-player
  id="plv-live-player"
  config="{{ config }}"
>
</polyv-live-player>

// 播放视频
const player = this.selectComponent('#plv-live-player')
player.play();

API List

play

Play video

player.play();

pause

Pause video

player.pause();

enterFullScreen

Enter full screen

player.enterFullScreen();

exitFullScreen

Exit full screen

player.exitFullScreen();

refresh

Refresh video (only effective during live streaming)

player.refresh();

seek

Fast-forward video (only effective during playback), in seconds

player.seek(50);

getVideoContext

Get the player component instance, enabling operations such as manually exiting picture-in-picture mode

const playerCtx = player.getVideoContext();
playerCtx.exitPictureInPicture();
联系客服,在线咨询
在线咨询