Add video proxy support with live toggle for Invidious/Piped instances

Adds a "Proxy videos" toggle in instance settings that routes video
streams through the instance instead of connecting directly to YouTube
CDN. Includes auto-detection of 403 blocks and live re-application of
proxy settings without requiring app restart or video reload.
This commit is contained in:
Arkadiusz Fal
2026-02-16 19:40:55 +01:00
parent 1fa6d7a4a5
commit c8b4ae5422
9 changed files with 305 additions and 4 deletions

View File

@@ -451,6 +451,16 @@ final class PlayerState {
}
}
/// Updates the current stream without changing the video.
func updateCurrentStream(_ stream: Stream) {
currentStream = stream
}
/// Updates the current audio stream without changing the video.
func updateCurrentAudioStream(_ stream: Stream) {
currentAudioStream = stream
}
/// Whether the playback has failed.
var isFailed: Bool {
if case .failed = playbackState { return true }