These guides discuss the MediaCompat APIs, which are no longer updated. We strongly recommend using the
Jetpack Media3 library instead.
Video app overview
Stay organized with collections
Save and categorize content based on your preferences.
A typical video player always displays its controls and video content while it's
running; it can't operate in the background or without a UI. Therefore, it's
appropriate to build your app as a single activity containing the UI, a player,
a media session, and a media controller:
- Building a videoplayer activity
- How to create an activity that contains a media session and a media controller.
- Media session callbacks
- Describes how the media session callback methods manage the media session and other app components like notifications and broadcast receivers.
- Compatible media transcoding
- Set up transcoding behavior, such as whether to automatically convert
videos to AVC (H.264) when they are opened by an app that doesn't support
the initial encoding format.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-05 UTC."],[],[]]