如何使用torrent磁力链接作为视频嵌入链接并使用它在网站上显示视频?

I want to use <video src="torrent link"> as <video src="youtube link">. Is it possible?

I tried normally by making torrent links & directly showing on the page. But got errors.

Here I can embed any link from any website & it works. So same thing I want to use on torrents to get video data & play on website. It will help us to make a website better

All videos are playing. Here you can upload from hard drive & from any website also.

It is possible, but as far as I know, it can't be done using regular means (HTML/Javascript/PHP). The only way I know of is to use Java applet. Though it does work, it isn't really that efficient, depending on what you intend to do with it. Anyways, Bitlet got this working. They succeed in implementing the Bittorrent protocol in Java. You can check their code on Github here.

Of course you can simply use https://webtorrent.io

Working example:

var WebTorrent = require('webtorrent')

var client = new WebTorrent()

// Sintel, a free, Creative Commons movie
var torrentId = 'magnet:?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'

client.add(torrentId, function (torrent) {
  // Torrents can contain many files. Let's use the .mp4 file
  var file = torrent.files.find(function (file) {
    return file.name.endsWith('.mp4')
  })

  // Display the file by adding it to the DOM.
  // Supports video, audio, image files, and more!
  file.appendTo('body')
})