音频和视频概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本部分介绍处理音频和视频数据的核心 API,包括播放、编辑和录制等用例。您还可以在此处找到有关应用架构的建议和平台行为说明。
在大多数情况下,我们建议使用 Media3 来打造音频和视频体验。如果您刚开始接触媒体功能开发,请从这里开始。
前往“Jetpack Media3 简介”
了解 Jetpack Media3 库以及用于实现播放用例的关键 API。
前往 Media3 MediaSession
深入了解 ExoPlayer
,它是 Media3 中包含的一款功能丰富且可扩展的媒体播放器 API。
前往 Media3 ExoPlayer
探索 Media3 中的 Transformer
模块,这是一组适用于媒体编辑用例的强大高性能 API。
前往 Media3 Transformer
了解用于在应用中显示视频和播放控件的默认界面组件。
前往 Media3 界面
了解如何在设备之间路由播放,以打造共享体验。
前往 Jetpack MediaRouter
了解 Android 平台本身附带的媒体 API 和行为,例如格式支持和音量控制 API。
前往“平台 API 和行为”
MediaCompat API 已不再更新,但本部分保留了相关指南。
前往旧版媒体 API
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Audio and video overview\n\nThis section covers the core APIs for handling audio and video data, including\nuse-cases like playback, editing, and recording. You'll also find\nrecommendations on app architecture and descriptions of platform behaviors here.\n| **Tip:** Check out the [Media Developer Center](/media) for best practices and guidance on creating a best-in-class multidevice app.\n\nJetpack Media3\n--------------\n\nIn most cases, Media3 is our recommended solution for building audio and video\nexperiences. Start here if you're new to developing media features.\n\n[Go to About Jetpack Media3](/guide/topics/media/media3)\n\n### Media3 MediaSession\n\nMeet the Jetpack Media3 library and key APIs for implementing playback\nuse-cases.\n\n[Go to Media3 MediaSession](/guide/topics/media/session/mediasession)\n\n### Media3 ExoPlayer\n\nDive deep into `ExoPlayer`, a feature rich and extensible media player API\nincluded in Media3.\n\n[Go to Media3 ExoPlayer](/guide/topics/media/exoplayer)\n\n### Media3 Transformer\n\nExplore the `Transformer` module from Media3, a set of powerful and performant\nAPIs for media editing use-cases.\n\n[Go to Media3 Transformer](/guide/topics/media/transformer)\n\n### Media3 UI\n\nLearn about the default UI components to display video and playback controls in\nyour app.\n\n[Go to Media3 UI](/guide/topics/media/ui/overview)\n\nJetpack MediaRouter\n-------------------\n\nLearn about routing playback between devices to create a shared experience.\n\n[Go to Jetpack MediaRouter](/guide/topics/media/routing)\n\nPlatform APIs and behaviors\n---------------------------\n\nRead about media APIs and behaviors that come with the Android platform itself,\nsuch as format support and volume control APIs.\n\n[Go to Platform APIs and behaviors](/guide/topics/media/platform)\n\nLegacy media APIs\n-----------------\n\nThe MediaCompat APIs are no longer updated, but the guides are preserved in this\nsection.\n\n[Go to Legacy media APIs](/guide/topics/media/legacy)"]]