Fix native video playback in static viewer - #1712
Draft
mjebarat1 wants to merge 1 commit into
Draft
Conversation
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.
Description
Fix Android native video playback when a video is opened through a static PhotoSwipe viewer, notably from "On This Day" / memories.
The Android native player is rendered behind the WebView. Native video pass-through relies on two pieces of viewer state:
viewer-videoclass on<body>;activeclass on the current.pswp__item.Previously this logic was registered only in
openDynamic(), which is used by the normal timeline.openStatic(), used by "On This Day", did not set those classes. ExoPlayer therefore played the video correctly, including audio, but the PhotoSwipe/WebView layer remained visible above the native PlayerView, resulting in a black/grey video.This change moves the native slide-state handling into
createBase(), so it is shared by both static and dynamic viewers.Timeline-specific thumbnail scrolling remains in
openDynamic().Testing
npm run build?assembleDebug?Fixes #1226
Related to #1651