0

我正在使用 WebTorrent 处理流式视频,并且对于某些链接,视频未呈现, 例如 磁铁:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker .coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org %3A1337&tr=wss​​%3A%2F%2Ftracker.btorrent.xyz&tr=wss​​%3A%2F%2Ftracker.fastcast.nz&tr=wss​​%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents %2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent 此链接工作正常,但无法加载此链接 https://yts.mx/torrent/download/6C74A650AFC100BBF256AC978A49498E080B3F28

const client = WebTorrent();
const magnetURL = 'https://yts.mx/torrent/download/6C74A650AFC100BBF256AC978A49498E080B3F28'

client.add(magnetURL, function (torrent) {
  torrent.files.forEach(function (file) {
    let video = torrent.files.find(function (file) {
      return file.name.endsWith('.mp4');
    });
      const xpi = document.getElementById('video-container');
      video.renderTo(xpi, function (err, element) {
        // console.log(magnetURL);
      });
    console.log(video.name);
  });
});
4

0 回答 0