当前位置:网站首页>浏览器中的画中画(Picture-in-Picture)API
浏览器中的画中画(Picture-in-Picture)API
2022-07-31 05:17:00 【Forevermoremo】
画中画的应用随处可见啊,淘宝的直播界面悬浮窗口,哔哩哔哩视频以及豆瓣视频等都有使用到。
<body>
<video controls autoplay loop muted id="video" src="./video.mp4" poster="./poster.png"></video>
<div>
<button id="enter">进入画中画</button>
<button id="exit">退出画中画</button>
<span id="tips"></span>
</div>
<script>
const video = document.getElementById('video');
const enter = document.getElementById('enter');
const exit = document.getElementById('exit');
const tips = document.getElementById('tips');
// 进入画中画
enter.addEventListener('click', (event) => {
video.requestPictureInPicture().catch(error => {
console.log(error);
});
});
// 退出画中画
exit.addEventListener('click', (event) => {
document.exitPictureInPicture().catch(error => {
console.log(error);
});
});
</script>
</body>
边栏推荐
- 多元线性回归方程原理及其推导
- Introduction to CLS-PEG-FITC Fluorescein-PEG-CLS Cholesterol-PEG-Fluorescein
- QT VS中双击ui文件无法打开的问题
- Hyperparameter Optimization - Excerpt
- ROS之service编程的学习和理解
- MySQL 免安装版的下载与配置教程
- break and continue exit in js
- Cholesterol-PEG-Thiol CLS-PEG-SH Cholesterol-Polyethylene Glycol-Sulfhydryl
- pyspark.ml特征变换模块
- Pytorch每日一练——预测泰坦尼克号船上的生存乘客
猜你喜欢

unicloud 发布后小程序提示连接本地调试服务失败,请检查客户端是否和主机在同一局域网下

qt:cannot open C:\Users\某某某\AppData\Local\Temp\main.obj.15576.16.jom for write

After unicloud is released, the applet prompts that the connection to the local debugging service failed. Please check whether the client and the host are under the same local area network.

DSPE-PEG-Azide DSPE-PED-N3 Phospholipid-Polyethylene Glycol-Azide Lipid PFG

RuntimeError: CUDA error: no kernel image is available for execution on the device问题记录

Cholesterol-PEG-Amine CLS-PEG-NH2 Cholesterol-Polyethylene Glycol-Amino Research Use

多元线性回归方程原理及其推导

Tensorflow边用边踩坑

WeChat applet source code acquisition and decompilation method

VS connects to MYSQL through ODBC (1)
随机推荐
Tencent Cloud GPU Desktop Server Driver Installation
this points to the problem
Pytorch每日一练——预测泰坦尼克号船上的生存乘客
Navicat从本地文件中导入sql文件
Natural language processing related list
拒绝采样小记
Talking about the understanding of CAP in distributed mode
Tensorflow边用边踩坑
pytorch学习笔记10——卷积神经网络详解及mnist数据集多分类任务应用
Cholesterol-PEG-Acid CLS-PEG-COOH Cholesterol-Polyethylene Glycol-Carboxyl Modified Peptides
Pytorch学习笔记7——处理多维特征的输入
应用usb_cam同时打开多个摄像头方法
Data Preprocessing, Feature Engineering, and Feature Learning - Excerpt
CLS-PEG-FITC Fluorescein-PEG-CLS 胆固醇-聚乙二醇-荧光素简介
DSPE-PEG-Thiol DSPE-PEG-SH 磷脂-聚乙二醇-巯基脂质体制备用
MySQL master-slave switching steps
Research reagents Cholesterol-PEG-Maleimide, CLS-PEG-MAL, Cholesterol-PEG-Maleimide
DSPE-PEG-COOH CAS:1403744-37-5 磷脂-聚乙二醇-羧基脂质PEG共轭物
Embedding cutting-edge understanding
Sqlite column A data is copied to column B