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

[CloudFlare]Uncaught ReferenceError: torrentId is not defined #993

Closed
ziomik opened this issue Dec 7, 2016 · 6 comments
Closed

[CloudFlare]Uncaught ReferenceError: torrentId is not defined #993

ziomik opened this issue Dec 7, 2016 · 6 comments

Comments

@ziomik
Copy link

@ziomik ziomik commented Dec 7, 2016

Sorry for my english...

Code is ok and work to http://plnkr.co
but in my vps browser error: video.html:26 Uncaught ReferenceError: torrentId is not defined(…)

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
    </head>
<body>
<script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script>
<script>
var client = new WebTorrent()

// Sintel, a free, Creative Commons movie
var torrentId = 'magnet:?xt=urn:btih:467c457b1ccc8a163c0597953a38a61ee102a219&dn=stri.mp4&tr=udp%3A%2F%2Fexodus.desync.com%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com'

client.add(torrentId, function (torrent) {
  // Torrents can contain many files. Let's use the first.
  var file = torrent.files[0]

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


</script>
</body>
</html>
@ziomik ziomik changed the title Problem my vps Uncaught ReferenceError: torrentId is not defined Dec 7, 2016
@ziomik

This comment has been minimized.

Copy link
Author

@ziomik ziomik commented Dec 7, 2016

found the problem: CloudFlare.
The cache causes problems.

@ziomik

This comment has been minimized.

Copy link
Author

@ziomik ziomik commented Dec 7, 2016

tips to bypass cloudflare?
I tried various rules on "Page Rule" without positive results.

@ziomik ziomik changed the title Uncaught ReferenceError: torrentId is not defined [CloudFlare]Uncaught ReferenceError: torrentId is not defined Dec 7, 2016
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Dec 8, 2016

@feross feross closed this Dec 8, 2016
@ziomik

This comment has been minimized.

Copy link
Author

@ziomik ziomik commented Dec 8, 2016

No works..
Html page with CLOUDFLARE(cache purge and cache disable): http://www.ziomik.net/video/video.html
Html page not CLOUDFLARE: http://www.pginternationale.com/video.html

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Dec 9, 2016

I would contact cloudflare support and ask for help. This is not a webtorrent issue.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 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
2 participants
You can’t perform that action at this time.