Adds an opt-in native HLS video player (iOS-only, off by default) that uses AVPlayerViewController for true automatic picture-in-picture on swipe-home, replacing the WebView-based player when enabled. Key changes: - GQL API client for fetching playback access tokens and building HLS URLs - NativeVideoStore (MobX) managing player lifecycle, quality selection, PiP - VideoPlayerInterface abstraction so both stores drive the same overlay - Settings toggle gated on iOS with "Native player (experimental)" label - Auth token fallback: tries authenticated GQL for ad-free, falls back to anonymous if rejected (app OAuth token != web Client-ID token) - Scoped UnauthorizedInterceptor to Helix/OAuth URLs only - iOS Info.plist background audio mode for PiP audio continuity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
482 B
Dart
18 lines
482 B
Dart
class PlaybackAccessToken {
|
|
final String value;
|
|
final String signature;
|
|
|
|
const PlaybackAccessToken({
|
|
required this.value,
|
|
required this.signature,
|
|
});
|
|
|
|
factory PlaybackAccessToken.fromGqlResponse(Map<String, dynamic> json) {
|
|
final data = json['data']['streamPlaybackAccessToken']
|
|
as Map<String, dynamic>;
|
|
return PlaybackAccessToken(
|
|
value: data['value'] as String,
|
|
signature: data['signature'] as String,
|
|
);
|
|
}
|
|
}
|