Android 4.27.0: Caption customization and offline DRM improvements
Android SDK 4.27.0 adds caption styling and positioning APIs, fullscreen exit reasons, and new offline DRM capabilities. This release also improves offline-download reliability, upgrades AndroidX Media3 to 1.10.1, and fixes issues affecting captions, Chromecast, fullscreen playback, advertising, and media controls.
New Features
- New
CaptionsConfigAPIs let you customize caption font, size, text color, background and window colors, edge style, and placement. - New caption positioning options let you configure caption box width, horizontal position, alignment, and vertical placement.
FullscreenExitReasonlets apps identify how fullscreen was exited.- Offline DRM now supports process-scoped
MediaDrmCallbackregistration, retrieving the remaining duration of an offline license, refreshing renewable licenses without re-downloading media, and improved license handling when downloads are removed or replaced. - AndroidX Media3 has been upgraded from version 1.10.0 to 1.10.1.
Bug Fixes
- Captions no longer appear too small in letterboxed portrait layouts.
- Offline downloads no longer crash on Android 14 and later and now resume after a requirements wait, process restart, or reboot when supported by the Android version.
- Fixed potential crashes when selecting captions shortly after connecting to Chromecast or requesting fullscreen after the player had been destroyed.
- Fixed advertising issues affecting Google DAI pause and resume events, fullscreen VAST playback, and mid-roll playback after seeking while paused.
- The lock-screen scrubber no longer advances while playback is paused.
- Improved Picture-in-Picture and media-button broadcast receiver handling.
- Added missing consumer rules for optional dependencies that could cause minified host-app builds to fail.
Offline downloads on Android 14 and later
Apps using offline downloads and targeting API level 34 or later must declare android.permission.FOREGROUND_SERVICE and android.permission.FOREGROUND_SERVICE_DATA_SYNC.
For additional technical details, see the Android Changelog.