浏览器播放画中画

  • chrome70+
  • document.pictureInPictureElement ==null,非画中画模式,进入画中画,video.requestPictureInPicture()
  • document.pictureInPictureElement=video,画中画模式,退出画中画,document.exitPictureInPicture();
  • video监听enterpictureinpicture,leavepictureinpicture事件定义额外行为

参考浏览器播放画中画