您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
https://github.com/erkserkserks/h264ify
当前为
// ==UserScript== // @name YouTube H.264 (h264ify) // @name:ru YouTube H.264 (h264ify) // @namespace https://www.youtube.com // @version 2023.11.19.1 // @description https://github.com/erkserkserks/h264ify // @description:ru https://github.com/erkserkserks/h264ify // @match *://*.youtube.com/* // @match *://*.youtube-nocookie.com/* // @match *://*.youtubekids.com/* // @license MIT // @grant none // @run-at document-start // ==/UserScript== const block60fps = true; function modifyVideoTypeChecker() { const mediaSource = window.MediaSource; if (mediaSource === undefined) return; const originalIsTypeSupported = mediaSource.isTypeSupported.bind(mediaSource); mediaSource.isTypeSupported = makeModifiedTypeChecker(originalIsTypeSupported); } const makeModifiedTypeChecker = (originalChecker) => (type) => { if (typeof type !== 'string') return ''; const disallowedTypes = ['webm', 'vp8', 'vp9', 'av01']; for (const disallowedType of disallowedTypes) { if (type.includes(disallowedType)) return ''; } if (block60fps) { const match = /framerate=(\d+)/.exec(type); if (match && match[1] > 30) return ''; } return typeof originalChecker === 'function' ? originalChecker(type) : ''; }; modifyVideoTypeChecker();