Абмеркаванні » Creation Requests
各位大佬 有没有油管 后台播放的脚本 请指点
如果是切换页面后导致无法播放,实测无法复现。麻烦检查一下浏览器设置和浏览器插件配置等。
如果是切换页面后导致无法播放,实测无法复现。麻烦检查一下浏览器设置和浏览器插件配置等。
我的意思是实现 alook或者YouTube++那种 后台可以息屏播放
如果是切换页面后导致无法播放,实测无法复现。麻烦检查一下浏览器设置和浏览器插件配置等。 我的意思是实现 alook或者YouTube++那种 后台可以息屏播放
我之后研究一下,明天或后天回复你。
如果是切换页面后导致无法播放,实测无法复现。麻烦检查一下浏览器设置和浏览器插件配置等。 我的意思是实现 alook或者YouTube++那种 后台可以息屏播放
我之后研究一下,明天或后天回复你。
谢谢大佬
Alook
Alook-设置-视频设置-后台播放
油猴脚本
// ==UserScript==
// @name 通用_息屏播放
// @name:zh-CN 通用_息屏播放
// @name:en-US Uni_Lock-screen playback
// @description 让移动设备浏览器支持息屏播放功能。此脚本基于 https://greasyfork.org/zh-CN/discussions/requests/167911 请求。
// @version 1.0.0
// @author LiuliPack
// @license WTFPL
// @homepage https://gitlab.com/liulipack
// @match *://*/*
// @updateURL https://gitlab.com/LiuliPack/userscript/-/raw/main/GM/Uni_Lock-screen%20playback.user.js
// @downloadURL https://gitlab.com/LiuliPack/userscript/-/raw/main/GM/Uni_Lock-screen%20playback.user.js
// @supportURL https://gitlab.com/liulipack/UserScript
// @run-at document-start
// ==/UserScript==
'use strict';
// 监听监听页面可见性
document.addEventListener("visibilitychange", () => {
// 如果不可见,就遍历音视频让其播放监听页面可见性
if (document.hidden) {
document.querySelectorAll('video, audio').forEach(vid => {
vid.play()
vid.play()
})
}
});
我用的狐猴浏览器+脚本猫,并不起效。
Alook
Alook-设置-视频设置-后台播放油猴脚本
// ==UserScript== // @name 通用_息屏播放 // @name:zh-CN 通用_息屏播放 // @name:en-US Uni_Lock-screen playback // @description 让移动设备浏览器支持息屏播放功能。此脚本基于 https://greasyfork.org/zh-CN/discussions/requests/167911 请求。 // @version 1.0.0 // @author LiuliPack // @license WTFPL // @homepage https://gitlab.com/liulipack // @match *://*/* // @updateURL https://gitlab.com/LiuliPack/userscript/-/raw/main/GM/Uni_Lock-screen%20playback.user.js // @downloadURL https://gitlab.com/LiuliPack/userscript/-/raw/main/GM/Uni_Lock-screen%20playback.user.js // @supportURL https://gitlab.com/liulipack/UserScript // @run-at document-start // ==/UserScript== 'use strict'; // 监听监听页面可见性 document.addEventListener("visibilitychange", () => { // 如果不可见,就遍历音视频让其播放监听页面可见性 if (document.hidden) { document.querySelectorAll('video, audio').forEach(vid => { vid.play() vid.play() }) } });
我用的狐猴浏览器+脚本猫,并不起效。
抱歉,没能帮上你。
:(
Try it
https://greasyfork.org/en/scripts/457579-youtube-minimal-on-pc
https://greasyfork.org/en/scripts/447447-youtube-audio-mode
or if you have a message that the video pauses when tab focus is lost check:
https://github.com/raingart/Nova-YouTube-extension/blob/master/plugins/player/no-sleep.js#L36-L41

如题