[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# About MediaPlayer\n\nThis document discusses the MediaPlayer APIs in the Android multimedia\nframework. However, the recommended approach for media is [Jetpack Media3](/media/media3),\nwhich includes [ExoPlayer](/guide/topics/media/exoplayer). To create a new app, use Jetpack Media3 instead\nof the MediaPlayer APIs.\n\nThe `MediaPlayer` APIs in the Android multimedia framework support playing a\nvariety of common media types.\n| **Note:** You can play back the audio data only to the standard output device. That is, the mobile device speaker or a Bluetooth headset. You cannot play sound files in the conversation audio during a call.\n\nYou can:\n\n- Integrate audio, video, and images into your applications.\n- Play audio or video from media files stored in your application's resources (raw resources).\n- Play audio or video from standalone files in the file system.\n- Play audio or video from a data stream arriving over a network connection.\n\n| **Caution:** The recommended way to include media in your app is to use [Jetpack\n| Media3](/media/media3), which includes [ExoPlayer](/guide/topics/media/exoplayer).\n\nLearn more\n----------\n\nJetpack Media3 is the recommended solution for media playback in your app. [Read\nmore](/media/media3) about it.\n\nThese pages cover topics relating to recording, storing, and playing back audio\nand video:\n\n- [Supported Media Formats](/guide/topics/media/media-formats)\n- [MediaRecorder](/guide/topics/media/mediarecorder)\n- [Data Storage](/guide/topics/data/data-storage)"]]