G
G
grade242020-06-11 05:55:37
PHP
grade24, 2020-06-11 05:55:37

How can users organize playback (torrent) p2p on the site?

Maybe someone will tell.
It is possible to make site visitors able to view torrent videos without installing additional. ON.

That is, the site admin uploads torrent files to the server (it doesn’t matter what the OS will be), on the site it inserts the player code that plays the video.

I hope I have clearly explained the essence of the problem. Many thanks in advance for any help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Den Sabrov, 2020-06-11
@grade24

1. Tyts
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')
})

2. Tyts
Example:
<iframe src="https://embed.torrents-time.com/#source=TorrentURL&publisher_id=1"></iframe>

S
Sanes, 2020-06-11
@Sanes

Add. The software will need to be installed anyway. How do you think they will distribute?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question