Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWebtorrent streaming #277
Closed
Webtorrent streaming #277
Comments
This comment has been minimized.
This comment has been minimized.
|
Provide more information about what you're trying to do. |
This comment has been minimized.
This comment has been minimized.
|
I'm using the script included in my html, and using the tag video, but the video wont load :/ |
This comment has been minimized.
This comment has been minimized.
|
That's not more information... Show us the actual Javascript code you're executing. |
This comment has been minimized.
This comment has been minimized.
|
<!doctype html> <script src="webtorrent.min.js"></script> <script language="javascript" type="application/javascript"> var WebTorrent = require('webtorrent') var client = new WebTorrent() var magnetUri = 'magnet:?xt=urn:btih:a3b8efe116b63b78356fcfbd086e7131941e5d71&dn=The+Imitation+Game+%282014%29+720p+BrRip+x264+-+YIFY&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969' client.add(magnetUri, function (torrent) { // Got torrent metadata! console.log('Torrent info hash:', torrent.infoHash) // Let's say the first file is a webm (vp8) or mp4 (h264) video... var file = torrent.files[0] // Create a video element var video = document.createElement('video') video.controls = true document.body.appendChild(video) // Stream the video into the video tag file.createReadStream().pipe(video) }) </script> <title>Documento sem título</title>need something more? Like source on the video tag or something... I don't now :( tks |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello guys,
I've a problem with stream video with webtorrent.
I can't load videos in video tag, someone can help me please?