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

Dont start the video streaming on browser Chrome 40.x #257

Closed
S0c5 opened this issue Feb 4, 2015 · 6 comments
Closed

Dont start the video streaming on browser Chrome 40.x #257

S0c5 opened this issue Feb 4, 2015 · 6 comments

Comments

@S0c5
Copy link

@S0c5 S0c5 commented Feb 4, 2015

Hi guys, when, I run this code don't start the vídeo streaming in the browser, and not show me any debug message do you have idea what happen?.

<html lang="en">
    <head>
        <meta charset="utf-8">
        <script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script>
        <script src="http://wzrd.in/standalone/concat-stream@1.4.7"></script>
    </head>
    <body>
   <script>



var client = new WebTorrent()
var magnetUri = 'redacted'

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>
   </body>
</html>
@nezzard

This comment has been minimized.

Copy link

@nezzard nezzard commented Feb 4, 2015

I, too, does not work

@iShift

This comment has been minimized.

Copy link
Contributor

@iShift iShift commented Feb 5, 2015

no webtorrent peers?

@nezzard

This comment has been minimized.

Copy link

@nezzard nezzard commented Feb 5, 2015

Nothing shows only a blank window

@S0c5

This comment has been minimized.

Copy link
Author

@S0c5 S0c5 commented Feb 5, 2015

this is the debug message in the console, but I wait long and the streaming never start.

webtorrent new webtorrent (peerId 2d5757303032372d356439383031393130333131, nodeId f5d4edbf031e818f41a0439d4fc58fff63ea8296) +0ms webtorrent.min.js:3
webtorrent add magnet-uri-redacted +5ms webtorrent.min.js:3
webtorrent:torrent new torrent +2ms webtorrent.min.js:3
webtorrent-swarm new swarm i redacted p 2d5757303032372d356439383031393130333131 +3ms webtorrent.min.js:3
torrent-discovery setTorrent redacted +3ms webtorrent.min.js:3
webtorrent-tracker new client redacted +1ms 

@kyonetca

This comment has been minimized.

Copy link

@kyonetca kyonetca commented Feb 6, 2015

I cannot get it to work in Firefox either. :(

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 7, 2015

Until BitTorrent clients support WebTorrent, "pure" WebTorrent clients can only download from other WebTorrent clients. This means that someone has to be seeding the file you want from their browser.

We're going to release a node-webkit (nw.js) app soon that helps ease this transition period by letting seeders seed content to both the normal and web networks. Haven't had time to work on this yet. There's not enough time in a day...

@feross feross closed this Feb 7, 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
5 participants
You can’t perform that action at this time.