Skip to content

Fix native video playback in static viewer - #1712

Draft
mjebarat1 wants to merge 1 commit into
pulsejet:masterfrom
mjebarat1:fix/android-static-viewer-video
Draft

Fix native video playback in static viewer#1712
mjebarat1 wants to merge 1 commit into
pulsejet:masterfrom
mjebarat1:fix/android-static-viewer-video

Conversation

@mjebarat1

Copy link
Copy Markdown

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:

  • the viewer-video class on <body>;
  • the active class 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 ?
  • Android assembleDebug ?
  • Reproduced the issue before the fix on Android
  • Verified the same "On This Day" video after the fix:
    • video visible ?
    • audio working ?
  • Verified switching between images and videos in the viewer ?

Fixes #1226
Related to #1651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Videos are black when played from souvenir's timeline in Android app

1 participant