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

Switch back to the WEB client for the local API with potokens #6436

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Dec 22, 2024

Switch back to the WEB client for the local API with potokens

Pull Request Type

  • Bugfix
  • Feature Implementation

Related issue

Description

This pull request switches back to the WEB client as a way to hopefully avoid the 403s that have started to appear for some people. As an added bonus this means we can use the DASH manifests for live streams which have 4 hours of seeking, the alternative would be to use the HLS manifest but as the WEB ones don't support audio-only or seeking, using the DASH ones seemed like a better idea.

To make this possible, I added the bgutils-js dependency to help generate the poTokens required for using the WEB client these days. As the BotGuard code accesses the global window and document objects, I decided it would be best to isolate it to its own webview with a separate temporary session and reduced permissions compared to our normal webviews that the user interacts with. That also required introducing a separate webpack config to be able to generate the script to run inside of that webview.

Testing

Test video playback with the local API, both normal videos and live streams. If you can find a movie with a trailer that isn't dubbed you can test that too (dubbed trailers are known to be an issue, i'll be creating a PR to youtube.js to fix the DASH manifest generation).

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: f419aa5

@github-actions github-actions bot added PR: dependencies Pull requests that update a dependency file PR: waiting for review For PRs that are complete, tested, and ready for review labels Dec 22, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 22, 2024 22:50
PikachuEXE
PikachuEXE previously approved these changes Dec 23, 2024
@PikachuEXE
Copy link
Collaborator

Post merge action: merge FreeTubeApp/FreeTube-Docs#157

@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Dec 23, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@efb4f5ff-1298-471a-8973-3d47447115dc

ofcourse...

@absidue
Copy link
Member Author

absidue commented Dec 23, 2024

It's because autolinker and bgutils-js are next to each other in the package.json file :/

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 23, 2024
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve before another conflict appears~
image

@FreeTubeBot FreeTubeBot merged commit 248581d into FreeTubeApp:development Dec 27, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 27, 2024
@absidue absidue deleted the local-api-potokens branch December 27, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants