禁用视频、直播网站的P2P上传功能(B站等)

通过在直播页面禁用RTC来禁止P2P功能

// ==UserScript==
// @name         禁用视频、直播网站的P2P上传功能(B站等)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  通过在直播页面禁用RTC来禁止P2P功能
// @author       小忍Alter
// @license      MIT
// @match        https://live.bilibili.com/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    delete window.RTCDataChannel;
    delete window.DataChannel;
    delete window.RTCPeerConnection;
    delete window.mozRTCPeerConnection;
    delete window.webkitRTCPeerConnection;
})();