Skip to content

fix: sync captions to native iOS fullscreen player#2888

Open
mkrn wants to merge 1 commit into
sampotts:masterfrom
mkrn:fix/ios-native-fullscreen-captions
Open

fix: sync captions to native iOS fullscreen player#2888
mkrn wants to merge 1 commit into
sampotts:masterfrom
mkrn:fix/ios-native-fullscreen-captions

Conversation

@mkrn
Copy link
Copy Markdown

@mkrn mkrn commented Jan 22, 2026

Summary

  • Fixes captions not displaying in native iOS fullscreen when using iosNative: true
  • When entering native fullscreen, sets active caption track mode to 'showing' so iOS can render captions
  • When exiting, restores track mode to 'hidden' so Plyr can resume controlling caption rendering
  • Also fixes a bug where exit() was calling webkitEnterFullscreen() instead of webkitExitFullscreen()

Test plan

  • Test on iOS device with iosNative: true configured
  • Enable captions and enter fullscreen
  • Verify captions are visible in native iOS fullscreen player
  • Exit fullscreen and verify Plyr captions still work normally

Fixes #2732

🤖 Generated with Claude Code

When using iosNative: true, captions were not displayed in the native iOS
fullscreen video player. This was because Plyr sets all track modes to
hidden to handle its own caption rendering, but the native iOS player
only shows captions when track mode is showing.

This fix:
- Listens for webkitbeginfullscreen/webkitendfullscreen events
- Sets the active caption track mode to showing when entering native
  fullscreen so iOS can render captions
- Restores track mode to hidden when exiting so Plyr can resume
  controlling caption rendering

Also fixes a bug where exit() was calling webkitEnterFullscreen()
instead of webkitExitFullscreen().

Fixes sampotts#2732

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mkrn
Copy link
Copy Markdown
Author

mkrn commented Jan 22, 2026

Tested at preview URL with iPhone. LGTM

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.

Captions not displaying in fullscreen when using iosNative: true

1 participant