Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webtorrent streaming #277

Closed
brunooliniski opened this issue Mar 9, 2015 · 4 comments
Closed

Webtorrent streaming #277

brunooliniski opened this issue Mar 9, 2015 · 4 comments

Comments

@brunooliniski
Copy link

@brunooliniski brunooliniski commented Mar 9, 2015

Hello guys,

I've a problem with stream video with webtorrent.

I can't load videos in video tag, someone can help me please?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Mar 9, 2015

Provide more information about what you're trying to do.

@brunooliniski

This comment has been minimized.

Copy link
Author

@brunooliniski brunooliniski commented Mar 10, 2015

I'm using the script included in my html, and using the tag video, but the video wont load :/

@Svenskunganka

This comment has been minimized.

Copy link

@Svenskunganka Svenskunganka commented Mar 10, 2015

That's not more information...

Show us the actual Javascript code you're executing.

@brunooliniski

This comment has been minimized.

Copy link
Author

@brunooliniski brunooliniski commented Mar 11, 2015

<!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

@feross feross closed this Mar 18, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.