webtorrent / webtorrent

⚡️ Streaming torrent client for the web
https://webtorrent.io
MIT License
29.5k stars 2.71k forks source link

Introduction example is broken on https://webtorrent.io/intro #2776

Open memoryhash opened 5 months ago

memoryhash commented 5 months ago

I just pasted the contents of "HTML example with status showing UI" on https://webtorrent.io/intro into a file called sample.html, opened that in my browser, and whilst the video downloads, the video does not play.

Brave 1.65.114 Chromium: 124.0.6367.60 (Official Build) (64-bit)

memoryhash commented 5 months ago

image

SilentBot1 commented 5 months ago

Hi @memoryhash,

Due to breaking changes between v1 and v2, the example on https://webtorrent.io/intro will not work with webtorrent@latest, and the current active maintainers do not have the ability to update this page.

You can downgrade the sample code you're using to use https://cdn.jsdelivr.net/npm/webtorrent@1.9.7, rather than webtorrent@latest, which will get this sample working, or alternatively, use the more up to date sample found here.

rezos2 commented 3 months ago

Hi @memoryhash,

Due to breaking changes between v1 and v2, the example on https://webtorrent.io/intro will not work with webtorrent@latest, and the current active maintainers do not have the ability to update this page.

You can downgrade the sample code you're using to use https://cdn.jsdelivr.net/npm/webtorrent@1.9.7, rather than webtorrent@latest, which will get this sample working, or alternatively, use the more up to date sample found here.

I can't get your UI version to work in the example on your linked page. I made these changes to it, but I still get syntax error: `

<script src="https://cdn.jsdelivr.net/npm/webtorrent@1.9.7/webtorrent.min.js">

<script type="module">
  // Include the latest version of WebTorrent
import WebTorrent`
SilentBot1 commented 3 months ago

Hi @rezos2,

You do not need a script tag and an import for WebTorrent for version 1.9.7 (it is necessary for >2.0 iirc), adding the script tag is enough to make window.WebTorrent available.

github-actions[bot] commented 1 month ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?