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

Conditional proxying #662

Merged
merged 2 commits into from May 18, 2024
Merged

Conditional proxying #662

merged 2 commits into from May 18, 2024

Conversation

stonerl
Copy link
Collaborator

@stonerl stonerl commented May 9, 2024

I added a new feature. When instances are not proxied, Yattee first checks the URL to make sure it is not a restricted video. Usually, music videos and sports content can only be played back by the same IP address that requested the URL in the first place. That is why some videos do not play when the proxy is disabled.

This approach has multiple advantages. First and foremost, It reduced the load on Invidious/Piped instances, since users can now directly access the videos without going through the instance, which might be severely bandwidth limited. Secondly, users don't need to manually turn on the proxy when they want to watch IP address bound content, since Yattee automatically proxies such content.

Furthermore, adding the proxy option allows mitigating some severe playback issues with invidious instances. Invidious by default returns proxied URLs for videos, and due to some bug in the Invidious proxy, scrubbing or continuing playback at a random timestamp can lead to severe wait times for the users.

This should fix numerous playback issues: #666, #626, #590, #585, #498, #457, #400

@stonerl stonerl marked this pull request as draft May 14, 2024 12:10
@stonerl stonerl changed the title Piped: add Proxy video toggle Conditional proxying May 16, 2024
@stonerl stonerl marked this pull request as ready for review May 16, 2024 11:07
@stonerl
Copy link
Collaborator Author

stonerl commented May 16, 2024

This is good to go now.

@stonerl stonerl marked this pull request as draft May 16, 2024 13:10
@stonerl stonerl marked this pull request as ready for review May 16, 2024 15:13
@arekf
Copy link
Contributor

arekf commented May 16, 2024

Please rebase and fix merge conflicts

I added a new feature. When instances are not proxied, Yattee first checks the URL to make sure it is not a restricted video. Usually, music videos and sports content can only be played back by the same IP address that requested the URL in the first place. That is why some videos do not play when the proxy is disabled.

This approach has multiple advantages. First and foremost, It reduced the load on Invidious/Piped instances, since users can now directly access the videos without going through the instance, which might be severely bandwidth limited. Secondly, users don't need to manually turn on the proxy when they want to watch IP address bound content, since Yattee automatically proxies such content.

Furthermore, adding the proxy option allows mitigating some severe playback issues with invidious instances. Invidious by default returns proxied URLs for videos, and due to some bug in the Invidious proxy, scrubbing or continuing playback at a random timestamp can lead to severe wait times for the users.

This should fix numerous playback issues: yattee#666, yattee#626, yattee#590, yattee#585, yattee#498, yattee#457, yattee#400
@stonerl
Copy link
Collaborator Author

stonerl commented May 16, 2024

done

@stonerl
Copy link
Collaborator Author

stonerl commented May 17, 2024

I discovered a race condition. This is fixed now.

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