Crunchyroll Picture-in-Picture (page + iframe)

Enables PiP on Crunchyroll player by fixing iframe and video element restrictions.

作者
cyberaguiar
日安装量
0
总安装量
0
评分
0 0 0
版本
1.3
创建于
2025-09-26
更新于
2025-09-26
大小
3.6 KB
许可证
MIT
适用于

📖 Description

This userscript enables Picture-in-Picture (PiP) mode for Crunchyroll’s HTML5 player. By default, Crunchyroll blocks PiP by:

Wrapping the video element inside a restricted iframe.

Applying the attribute disablepictureinpicture to the video element.

This script solves both issues:

On the main Crunchyroll page, it updates the iframe’s allow attribute to include picture-in-picture.

Inside the iframe player, it automatically removes (and prevents re-adding) the disablepictureinpicture attribute from the video element.

As a result, you can use the standard PiP feature (or shortcut) to pop the video out while browsing.

🛠️ Features

Works on Crunchyroll main site and its embedded player iframe (static.crunchyroll.com/vilos).

Automatically patches the iframe permissions.

Continuously watches for player reloads or replaced elements.

Removes disablepictureinpicture as soon as it appears.

Optional shortcut: Ctrl + Alt + P forces PiP mode immediately.

📋 Installation

Install a userscript manager such as Tampermonkey (Chrome/Edge/Opera) or Violentmonkey (Firefox).

Click “Install” on this script page.

Ensure that the script is enabled and is set to run in all frames (iframes included).

Visit https://www.crunchyroll.com and play any video.

🎮 Usage

Simply start playback. The script will silently enable PiP support.

Right-click on the video and choose “Picture in Picture” (or use your browser’s toolbar shortcut).

Or press Ctrl + Alt + P to enter PiP instantly.