Universal Picture-in-Picture

PiP button on video hover + keyboard shortcut (Alt+P)

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
TropicalFrog3
日安装量
0
总安装量
4
评分
0 0 0
版本
1.0.0
创建于
2025-12-28
更新于
2025-12-28
大小
11.9 KB
许可证
MIT
适用于
所有网站

Universal Picture-in-Picture

A Picture-in-Picture (PiP) button that appears on any web video.

Features

  • Floating button: Appears in the top-right corner of the video on hover
  • Keyboard shortcut: Alt+P to quickly toggle PiP
  • Smart detection: Automatically filters out ads
  • Customizable position: Drag and drop the button wherever you want
  • Remembered position: Your preferred position is saved between sessions
  • YouTube compatible: Works on YouTube and all other video sites
  • Auto-hide: Button disappears after 3 seconds

Usage

Floating button

  1. Hover over a video with your mouse
  2. A PiP button appears in the top-right corner
  3. Click it to activate Picture-in-Picture mode

Keyboard shortcut

  • Press Alt+P anytime to toggle PiP on the best detected video

Customize position

  • Move: Click and drag the button to your preferred position
  • Reset: Right-click the button to return to default position

Compatibility

Tested and working on:

  • YouTube
  • Twitch
  • Vimeo
  • Netflix
  • And most sites with HTML5 video players

Technical notes

  • The script uses native DOM methods (no innerHTML) to be compatible with YouTube's Trusted Types security policy
  • Button position is stored as a percentage to adapt to different video sizes
  • Videos that are too small (< 100px) or identified as ads are automatically ignored