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 file doesn't stream when file name is clicked on #3966

Closed
Brave-Matt opened this issue Apr 1, 2019 · 2 comments · Fixed by brave/brave-core#2990
Closed

Webtorrent file doesn't stream when file name is clicked on #3966

Brave-Matt opened this issue Apr 1, 2019 · 2 comments · Fixed by brave/brave-core#2990
Assignees
Labels

Comments

@Brave-Matt
Copy link

Brave-Matt commented Apr 1, 2019

Description

Instead of streaming the torrent content in window when clicking on the file name, Brave instead offers to save the file to your device:
webtor

When torrent is opened in a new tab (from webtorrent screen), stream content opens in the new tab and will play as intended.

Steps to Reproduce

  1. Ensure Brave webtorrent ext is enabled in settings
  2. Start torrent file in webtorrent
  3. Click on torrent name

Actual result:

(see above gif)

Expected result:

Clicking the file name should start streaming content in new tab rather than offer to download file.

Reproduces how often:

Easily

Brave version (brave://version info)

v0.61.52

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds?
    Yes

Additional Information

FWIW, there should be a "play" or "start stream" button here instead of clicking on the file name -- Its not very clear nor is it stated anywhere that this is how to initiate video playback.

@bsclifton bsclifton added the feature/webtorrent Label for webtorrent related issues label Apr 2, 2019
@rebron rebron added the priority/P3 The next thing for us to work on. It'll ride the trains. label Apr 5, 2019
@feross feross assigned feross and unassigned yrliou Jul 23, 2019
@feross
Copy link

feross commented Jul 23, 2019

@yrliou I figured out the root cause of this issue. I will send a PR shortly.

feross added a commit to brave/brave-core that referenced this issue Jul 26, 2019
When the user clicks on a file in the torrent file list, a new tab opens which points to the .torrent file, but with a file fragment appended. For example, the torrent https://webtorrent.io/torrents/big-buck-bunny.torrent would have a link to https://webtorrent.io/torrents/big-buck-bunny.torrent#ix=1 for the 2nd file in the torrent.

Without this PR, this request passes the `IsWebtorrentInitiated(ctx)` condition and is therefore allowed to reach the network. Instead, we should confirm that the request is not for an individual file before letting it go to the network. That's what this commit does.

Fixes: brave/brave-browser#3966
feross added a commit to brave/brave-core that referenced this issue Jul 26, 2019
When the user clicks on a file in the torrent file list, a new tab opens which points to the .torrent file, but with a file fragment appended. For example, the torrent https://webtorrent.io/torrents/big-buck-bunny.torrent would have a link to https://webtorrent.io/torrents/big-buck-bunny.torrent#ix=1 for the 2nd file in the torrent.

Without this PR, this request passes the `IsWebtorrentInitiated(ctx)` condition and is therefore allowed to reach the network. Instead, we should confirm that the request is not for an individual file before letting it go to the network. That's what this commit does.

Fixes: brave/brave-browser#3966
@yrliou yrliou added this to the 0.70.x - Nightly milestone Jul 27, 2019
@btlechowski
Copy link

btlechowski commented Sep 18, 2019

Verification passed on

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

image

Verification PASSED on macOS 10.14.6 x64 using the following build:

Brave 0.69.126 Chromium: 77.0.3865.65 (Official Build) (64-bit)
Revision 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS macOS Version 10.14.6 (Build 18G95)

Verification passed on

Brave 0.70.97 Chromium: 77.0.3865.65 (Official Build) beta (64-bit)
Revision 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS Windows 10 OS Version 1803 (Build 17134.1006)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants