diff --git a/CHANGELOG.md b/CHANGELOG.md index d165d0b8..538bf028 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Revert "Use iOS user agent in player" + ## [0.40.6] - 2025-06-21 ### Fixed diff --git a/playlet-lib/src/components/Services/Innertube/Constants.bs b/playlet-lib/src/components/Services/Innertube/Constants.bs index 06dfdcb1..1024f9b5 100644 --- a/playlet-lib/src/components/Services/Innertube/Constants.bs +++ b/playlet-lib/src/components/Services/Innertube/Constants.bs @@ -1,3 +1,5 @@ +const VIDEO_PLAYER_USER_AGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0" + const INNERTUBE_IOS_CLIENT_NAME = "5" const INNERTUBE_IOS_CLIENT_VERSION = "20.20.5" const INNERTUBE_IOS_DEVICE_MODEL = "iPhone16,2" diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index f1242c37..c676f55b 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -54,7 +54,7 @@ function Init() httpAgent = m.top.getHttpAgent() ' TODO:P2 user agent should not be hardcoded, it should be part of video metadata - httpAgent.AddHeader("User-Agent", INNERTUBE_IOS_USER_AGENT) + httpAgent.AddHeader("User-Agent", VIDEO_PLAYER_USER_AGENT) #if DEBUG_LOG_VIDEO_QUALITY m.top.addFields({ diff --git a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs index bcab6667..9e33256c 100644 --- a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs +++ b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs @@ -17,7 +17,7 @@ function Init() InitializePlayerUi() httpAgent = m.top.getHttpAgent() - httpAgent.AddHeader("User-Agent", INNERTUBE_IOS_USER_AGENT) + httpAgent.AddHeader("User-Agent", VIDEO_PLAYER_USER_AGENT) end function function OnNodeReady()