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: Video streaming is broken since upgrade to WebTorrent v0.105.0 #5358

Closed
feross opened this issue Jul 23, 2019 · 6 comments · Fixed by webtorrent/webtorrent#1675 or brave/brave-core#2989

Comments

@feross
Copy link

feross commented Jul 23, 2019

Description

It appears that WebTorrent video playback is broken on Nightly, ever since the upgrade to WebTorrent v0.105.0.

The URL constructor is undefined on this line in webtorrent/lib/server.js:

https://github.com/webtorrent/webtorrent/blob/78d98d9fa45598b63fb0fec013036e35d167f6c3/lib/server.js#L80

The reason appears that webpack replaces this line:

https://github.com/webtorrent/webtorrent/blob/78d98d9fa45598b63fb0fec013036e35d167f6c3/lib/server.js#L6

with:

const URL = __webpack_require__(/*! url */ "./node_modules/url/url.js").URL

and the url package doesn't export URL as url.URL even though it exists in the chrome extension environment. I can fix this on the webtorrent side and publish a new version.

cc @yrliou

Steps to Reproduce

  1. Go to https://webtorrent.io/free-torrents
  2. Click on Big Buck Bunny (torrent file)
  3. Start download
  4. Right click on "Big Buck Bunny.mp4" and "Open Link in New Tab" (to workaround Webtorrent file doesn't stream when file name is clicked on #3966)
  5. The video does not load.
  6. Check the WebTorrent extension background process (via brave://inspect/#extensions) to see the exception.

Actual result:

Screen Shot 2019-07-23 at 3 37 52 PM

Expected result:

Video plays

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Nightly. Version 0.69.77 Chromium: 76.0.3809.62 (Official Build) nightly (64-bit)

Version/Channel Information:

  • Can you reproduce this issue with the current release? No
  • Can you reproduce this issue with the beta channel? No
  • Can you reproduce this issue with the dev channel? No
  • Can you reproduce this issue with the nightly channel? Yes
@feross
Copy link
Author

feross commented Jul 23, 2019

There's a new release of webtorrent with the fix. Version 0.105.1. We just need to pull it into Brave.

@feross
Copy link
Author

feross commented Jul 23, 2019

Re-opening until brave/brave-core#2989 is merged.

@kjozwiak
Copy link
Member

Moving this into the 0.70.x - Nightly milestone as per brave/brave-core#2989.

@yrliou
Copy link
Member

yrliou commented Sep 4, 2019

This is fixed in 0.69.x too now because we upgrade WebTorrent to 0.105.1 in 0.69.x.

@yrliou yrliou modified the milestones: 0.70.x - Beta, 0.69.x - Release Sep 4, 2019
@feross
Copy link
Author

feross commented Sep 4, 2019

@yrliou Thank you for debugging this issue!

@btlechowski
Copy link

btlechowski commented Sep 5, 2019

Verification passed on

Brave 0.69.124 Chromium: 76.0.3809.132 (Official Build) (64-bit)
Revision fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS Ubuntu 18.04 LTS

Verified test plan from the description.

Was able to stream the video
image
No exception in the console(only warnings):
image

Verified passed with

Brave 0.69.124 Chromium: 76.0.3809.132 (Official Build) (64-bit)
Revision fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS Mac OS X
  • Verified test plan from the description
    Screen Shot 2019-09-06 at 1 44 37 PM

Verification passed on

Brave 0.69.124 Chromium: 76.0.3809.132 (Official Build) (64-bit)
Revision fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS Windows 10 OS Version 1803 (Build 17134.523)
  • Verified the STR from the description - there are no exceptions in the extension background page

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment