Aşamalı
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Aşağıdaki kapsayıcı biçimlerindeki akışlar doğrudan ExoPlayer tarafından oynatılabilir.
İçerilen ses ve video örnek biçimleri de desteklenmelidir (bkz.
Örnek biçimler bölümüne bakın).
Görüntü kapsayıcısı ve biçim desteği için bkz.
Resimler.
Kapsayıcı biçimi |
Destekleniyor |
Yorumlar |
MP4 |
EVET |
|
M4A |
EVET |
|
FMP4 |
EVET |
|
WebM |
EVET |
|
Matroska |
EVET |
|
MP3 |
EVET |
Bazı canlı yayınlarda yalnızca sabit bit hızı sarması ile arama yapılabilir.** |
Ogg |
EVET |
Vorbis, Opus ve FLAC içerir |
WAV |
EVET |
|
MPEG-TS |
EVET |
|
MPEG-PS |
EVET |
|
FLV |
EVET |
Aranamaz* |
ADTS (AAC) |
EVET |
Yalnızca sabit bit hızında sarma kullanıldığında aranabilir** |
FLAC |
EVET |
FLAC kitaplığını veya ExoPlayer kitaplığındaki FLAC ayıklayıcısını kullanarak*** |
AMR |
EVET |
Yalnızca sabit bit hızında sarma kullanıldığında aranabilir** |
* Kapsayıcı meta veri (örneğin,
örnek dizin) kullanarak bir medya oynatıcının verimli bir şekilde arama yapmasını sağlar.
Sarma işlemi gerekiyorsa daha uygun bir kapsayıcı biçimi kullanmanızı öneririz.
** Bu ayıklayıcılarda FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
işareti vardır
Sabit bit hızı varsayımı kullanarak yaklaşık sarma özelliğini etkinleştirme. Bu
işlevi varsayılan olarak etkin değildir. Bunu etkinleştirmenin en basit yolu
destekleyen tüm ayıklayıcılar için otomatik olarak
Açıklandığı şekliyle DefaultExtractorsFactory.setConstantBitrateSeekingEnabled
burada bulabilirsiniz.
*** FLAC kitaplığı ayıklayıcısı, işlenebilecek ham ses çıkışını sağlar.
tüm API düzeylerinde
çerçeveye göre değerlendirebiliriz. ExoPlayer kitaplığı FLAC ayıklayıcı çıkışları
FLAC ses kareleri ve bu nedenle bir FLAC kod çözücü (örneğin, MediaCodec
FLAC'yi işleyen kod çözücü (API düzeyi 27'den itibaren gereklidir) veya
FLAC özellikli FFmpeg kitaplığı). DefaultExtractorsFactory
,
uygulama FLAC kitaplığı ile oluşturulmuşsa uzantı ayıklayıcıyı kullanın.
Aksi takdirde, ExoPlayer kitaplığı ayıklayıcısını kullanır.
Progresif akışı oynatmak için medya URI'si ile bir MediaItem
oluşturun ve
bunu oyuncuya iletebilir.
Kotlin
// Create a player instance.
val player = ExoPlayer.Builder(context).build()
// Set the media item to be played.
player.setMediaItem(MediaItem.fromUri(progressiveUri))
// Prepare the player.
player.prepare()
Java
// Create a player instance.
ExoPlayer player = new ExoPlayer.Builder(context).build();
// Set the media item to be played.
player.setMediaItem(MediaItem.fromUri(progressiveUri));
// Prepare the player.
player.prepare();
Daha fazla özelleştirme seçeneği için bir ProgressiveMediaSource
ve
oyuncuya MediaItem
yerine doğrudan iletebilir.
Kotlin
// Create a data source factory.
val dataSourceFactory: DataSource.Factory = DefaultHttpDataSource.Factory()
// Create a progressive media source pointing to a stream uri.
val mediaSource: MediaSource =
ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(MediaItem.fromUri(progressiveUri))
// Create a player instance.
val player = ExoPlayer.Builder(context).build()
// Set the media source to be played.
player.setMediaSource(mediaSource)
// Prepare the player.
player.prepare()
Java
// Create a data source factory.
DataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();
// Create a progressive media source pointing to a stream uri.
MediaSource mediaSource =
new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(MediaItem.fromUri(progressiveUri));
// Create a player instance.
ExoPlayer player = new ExoPlayer.Builder(context).build();
// Set the media source to be played.
player.setMediaSource(mediaSource);
// Prepare the player.
player.prepare();
Oynatmayı özelleştirme
ExoPlayer, oynatma deneyimini kendi tercihinize göre uyarlamanız için çeşitli yöntemler sunar.
iyi bir fikir olabilir. Örnekler için Özelleştirme sayfasına göz atın.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Progressive\n\nStreams in the following container formats can be played directly by ExoPlayer.\nThe contained audio and video sample formats must also be supported (see the\n[Sample formats](/media/media3/exoplayer/supported-formats#sample-formats) section for details).\nFor image container and format support, see\n[Images](/media/media3/exoplayer/images).\n\n| Container format | Supported | Comments |\n|------------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| MP4 | YES | |\n| M4A | YES | |\n| FMP4 | YES | |\n| WebM | YES | |\n| Matroska | YES | |\n| MP3 | YES | Some streams only seekable using constant bitrate seeking\\*\\* |\n| Ogg | YES | Containing Vorbis, Opus and FLAC |\n| WAV | YES | |\n| MPEG-TS | YES | |\n| MPEG-PS | YES | |\n| FLV | YES | Not seekable\\* |\n| ADTS (AAC) | YES | Only seekable using constant bitrate seeking\\*\\* |\n| FLAC | YES | Using the [FLAC library](https://github.com/androidx/media/tree/release/libraries/decoder_flac) or the FLAC extractor in the [ExoPlayer library](https://github.com/androidx/media/tree/release/libraries/exoplayer)\\*\\*\\* |\n| AMR | YES | Only seekable using constant bitrate seeking\\*\\* |\n\n\\* Seeking is unsupported because the container does not provide metadata (for example,\na sample index) to allow a media player to perform a seek in an efficient way.\nIf seeking is required, we suggest using a more appropriate container format.\n\n\\*\\* These extractors have `FLAG_ENABLE_CONSTANT_BITRATE_SEEKING` flags for\nenabling approximate seeking using a constant bitrate assumption. This\nfunctionality is not enabled by default. The simplest way to enable this\nfunctionality for all extractors that support it is to use\n`DefaultExtractorsFactory.setConstantBitrateSeekingEnabled`, as described\n[here](/media/media3/exoplayer/customization#enabling-constant-bitrate-seeking).\n\n\\*\\*\\* The [FLAC library](https://github.com/androidx/media/tree/release/libraries/decoder_flac) extractor outputs raw audio, which can be handled\nby the framework on all API levels. The [ExoPlayer library](https://github.com/androidx/media/tree/release/libraries/exoplayer) FLAC extractor outputs\nFLAC audio frames and so relies on having a FLAC decoder (for example, a `MediaCodec`\ndecoder that handles FLAC (required from API level 27), or the\n[FFmpeg library](https://github.com/androidx/media/tree/release/libraries/decoder_ffmpeg) with FLAC enabled). The `DefaultExtractorsFactory` uses the\nextension extractor if the application was built with the [FLAC library](https://github.com/androidx/media/tree/release/libraries/decoder_flac).\nOtherwise, it uses the [ExoPlayer library](https://github.com/androidx/media/tree/release/libraries/exoplayer) extractor.\n\nUsing MediaItem\n---------------\n\nTo play a progressive stream, create a `MediaItem` with the media URI and pass\nit to the player. \n\n### Kotlin\n\n```kotlin\n// Create a player instance.\nval player = ExoPlayer.Builder(context).build()\n// Set the media item to be played.\nplayer.setMediaItem(MediaItem.fromUri(progressiveUri))\n// Prepare the player.\nplayer.prepare()\n```\n\n### Java\n\n```java\n// Create a player instance.\nExoPlayer player = new ExoPlayer.Builder(context).build();\n// Set the media item to be played.\nplayer.setMediaItem(MediaItem.fromUri(progressiveUri));\n// Prepare the player.\nplayer.prepare();\n```\n\n\u003cbr /\u003e\n\nUsing ProgressiveMediaSource\n----------------------------\n\nFor more customization options, you can create a `ProgressiveMediaSource` and\npass it directly to the player instead of a `MediaItem`. \n\n### Kotlin\n\n```kotlin\n// Create a data source factory.\nval dataSourceFactory: DataSource.Factory = DefaultHttpDataSource.Factory()\n// Create a progressive media source pointing to a stream uri.\nval mediaSource: MediaSource =\nProgressiveMediaSource.Factory(dataSourceFactory)\n .createMediaSource(MediaItem.fromUri(progressiveUri))\n// Create a player instance.\nval player = ExoPlayer.Builder(context).build()\n// Set the media source to be played.\nplayer.setMediaSource(mediaSource)\n// Prepare the player.\nplayer.prepare()\n```\n\n### Java\n\n```java\n// Create a data source factory.\nDataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();\n// Create a progressive media source pointing to a stream uri.\nMediaSource mediaSource =\n new ProgressiveMediaSource.Factory(dataSourceFactory)\n .createMediaSource(MediaItem.fromUri(progressiveUri));\n// Create a player instance.\nExoPlayer player = new ExoPlayer.Builder(context).build();\n// Set the media source to be played.\nplayer.setMediaSource(mediaSource);\n// Prepare the player.\nplayer.prepare();\n```\n\n\u003cbr /\u003e\n\nCustomizing playback\n--------------------\n\nExoPlayer provides multiple ways for you to tailor playback experience to your\napp's needs. See the [Customization page](/guide/topics/media/exoplayer/customization) for examples."]]