Video player: lockscreen parity, playlist nav, aspect-fill, dimensions, teardown hardening#1
Open
danielwilliamson wants to merge 10 commits intomasterfrom
Open
Video player: lockscreen parity, playlist nav, aspect-fill, dimensions, teardown hardening#1danielwilliamson wants to merge 10 commits intomasterfrom
danielwilliamson wants to merge 10 commits intomasterfrom
Conversation
…and iOS
- Android: ForwardingPlayer intercepts seekTo{Previous,Next}() to fire
previousTrack/nextTrack events when track nav flags are set; overrides
getAvailableCommands() so the system notification shows ⏮/⏭ for
single-item playlists; flags are updated eagerly in handleLoad so
onAvailableCommandsChanged reflects them immediately
- iOS: Register previousTrackCommand/nextTrackCommand remote command
handlers; toggle enabled state based on showSystemPreviousTrackControl
/ showSystemNextTrackControl flags; disabled direction falls back to
the corresponding skip button
- Dart: Add previousTrackRequested/nextTrackRequested to PlayerControlState
and NativeVideoPlayerMediaInfo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…laying after video track Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch bundles ten commits that extend the native video player with lockscreen/media-center parity across iOS and Android, adds playlist track navigation, introduces aspect-fill rendering and video-dimension events, and hardens controller/event-channel teardown. It also wires in a new iOS Live Text (video frame analysis) toggle.
Commits (oldest → newest)
a16def8Add aspect-fill, dimensions events, and lockscreen controls fixes4c53506Fix lockscreen seek and metadata parity on iOS/Androidd70afeaDisable previous/restart transport seek for non-premiumdcafcdeSet Android seek back/forward increment to 15 seconds34e9e03FLTR-19614: Add video frame analysis togglef43964dFLTR-19614: Harden iOS video event teardownbb77fffFLTR-19615: Emit Android video dimensions more reliablyc210261FLTR-19589: Handle controller event channel teardown racesaa6e940FLTR-19589: Add video playlist track navigation controlseb56283FLTR-19796: Fix mixed video/audio playlist media center Not Playing stateChanges in detail
Lockscreen / now-playing parity (iOS + Android)
VideoPlayerNowPlayingHandler) and Android (VideoPlayerNotificationHandler) were brought to parity for metadata, artwork, and seek behavior so the lockscreen/media center shows consistent state across platforms.FLTR-19796: Fixes a bug in mixed video/audio playlists where, after a video track, the media center would display Not Playing — the notification handler now re-asserts the correct now-playing state when transitioning between media types.Playlist track navigation (
FLTR-19589)ForwardingPlayerinterceptsseekToPrevious()/seekToNext()and emitspreviousTrack/nextTrackevents when the corresponding track-nav flags are set.getAvailableCommands()is overridden so the system notification shows ⏮/⏭ even for single-item playlists; flags are updated eagerly insidehandleLoadsoonAvailableCommandsChangedpicks them up immediately.previousTrackCommand/nextTrackCommandremote-command handlers, toggling their enabled state based onshowSystemPreviousTrackControl/showSystemNextTrackControl. A disabled direction falls back to the corresponding skip-seconds button.PlayerControlState.previousTrackRequested/nextTrackRequestedevents, and newshowSkipControls/showSystemPreviousTrackControl/showSystemNextTrackControlfields onNativeVideoPlayerMediaInfo.Premium transport controls
Aspect-fill rendering + video dimensions
useAspectFillconstructor flag andsetUseAspectFill(bool)method onNativeVideoPlayerController, implemented on both iOS (VideoPlayerView) and Android (VideoPlayerView.kt) to toggle between aspect-fit and aspect-fill (zoom/crop).getVideoDimensions()method andPlayerControlState.videoDimensionsUpdatedevent (videoDimensionson the wire).FLTR-19615: Android now emits video dimensions more reliably by hooking additional ExoPlayer listeners so late/async size changes aren't missed.iOS Live Text / frame analysis (
FLTR-19614)allowsVideoFrameAnalysisconstructor flag (defaulttrue) passed toAVPlayerViewControlleron iOS 16+, enabling the system analysis button over video.VideoPlayerObserverteardown on iOS has been hardened: observer/KVO removal paths are made idempotent and safe against double-release so dismissing a player mid-event no longer crashes.Controller event channel teardown races (
FLTR-19589)0 / 50 / 100 / 200 / 400 ms) after the first platform view attaches, instead of eagerly in the constructor. This removes a race where the channel was created before the native side had registered itsStreamHandler.MissingPluginExceptionand thePlatformException('error', 'No active stream to cancel')variant that iOS can throw when the native side has already torn down.channel-error / Unable to establish connection on channeltransient that occurs during hot restart and very early attach.Files touched
lib/src/controllers/native_video_player_controller.dartlib/src/platform/video_player_method_channel.dartlib/src/enums/native_video_player_event.dartlib/src/models/native_video_player_media_info.dartios/Classes/View/VideoPlayerView.swiftios/Classes/View/VideoPlayerViewController+Delegate.swiftios/Classes/Handlers/VideoPlayerMethodHandler.swiftios/Classes/Handlers/VideoPlayerNowPlayingHandler.swiftios/Classes/Handlers/VideoPlayerObserver.swiftandroid/.../VideoPlayerView.ktandroid/.../handlers/VideoPlayerMethodHandler.ktandroid/.../handlers/VideoPlayerNotificationHandler.ktandroid/.../handlers/VideoPlayerObserver.ktandroid/.../manager/SharedPlayerManager.ktTest plan
useAspectFillandsetUseAspectFill(bool)and confirm render mode switches on iOS + AndroidgetVideoDimensions()returns non-null once the first frame is available;videoDimensionsUpdatedevent fires on Android for late size changesallowsVideoFrameAnalysis: true, hidden when falsereleaseResources()🤖 Generated with Claude Code