How to play DASH type content with ExoPlayer? 📺 📱 🎞

Overview

How to use ExoPlayer ▶️ with Kotlin in Android

ExoPlayer

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.

When defining the formats that ExoPlayer supports, it’s important to note that “media formats” are defined at multiple levels. From the lowest level to the highest, these are:

The format of the individual media samples (e.g., a frame of video or a frame of audio). These are sample formats. Note that a typical video file will contain media in at least two sample formats; one for video (e.g., H.264) and one for audio (e.g., AAC). The format of the container that houses the media samples and associated metadata. These are container formats. A media file has a single container format (e.g., MP4), which is commonly indicated by the file extension. Note that for some audio only formats (e.g., MP3), the sample and container formats may be the same. Adaptive streaming technologies such as DASH, SmoothStreaming and HLS. These are not media formats as such, however it’s still necessary to define what level of support ExoPlayer provides.

For more detailed information about Exoplayer, you can review the following article: 👇🏻

https://medium.com/@halilozel1903/exoplayer-nedir-ccae84e9f115

ExoPlayer 🎥 App 📱 Screenshots 🖼

ExoPlayer

To turn on the Subtitle option on the player screen:

app:show_subtitle_button="true"

To turn on the Audio option on the Player Screen:

argType:show_subtitle_button="true"

The application is playing content with .hls extension. The video can be rolled forward. The video can be undone.

Donation 💸

If this project help 💁 you to develop, you can give me a cup of coffee.

"Buy Me A Coffee"

License ℹ️

MIT License

Copyright (c) 2022 Halil OZEL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
Android SRT player powered by Exoplayer and srtdroid

SrtPlayer An Android SRT test player powered by ExoPayer. Most of this code comes from YoussefHenna reply in the SRT support ExoPayer issue. It demons

Sandbox project for practice: Media Streaming with Exoplayer (via Android Development tutorial)

Media streaming with ExoPlayer The code in this repository accompanies the Media streaming with ExoPlayer codelab. If you are looking to get started w

ExoPlayerComposeSample - Example for how we can use the ExoPlayer with Jetpack Compose

ExoPlayer Example with Jetpack Compose This repository demonstrates how we can u

Movies App by MVVM, Coroutines, Retrofit,, Navigation Component, ExoPlayer, Coil and Firebase
Movies App by MVVM, Coroutines, Retrofit,, Navigation Component, ExoPlayer, Coil and Firebase

Show-Time Movies App by MVVM, Coroutines, Retrofit, Navigation Component, ExoPlayer, Coil and Firebase Screens Home Movies Details Movies List Person

Compose-video-player - Video player for Android Compose powered by ExoPlayer

Compose Video Player Video player for Android Compose powered by ExoPlayer. Addi

ExoPlayer - an application level media player for Android
ExoPlayer - an application level media player for Android

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks.

This is a basic demo application for exoplayer library.
This is a basic demo application for exoplayer library.

ExoPlayer Demo Application This is a basic demo application for exoplayer library. It can stream these types of file: MP3 MP4 DASH HLS You can minimiz

ZExoRecyclerPlayer is an Android library that allows developers to easily create RecyclerView with Exoplayer .
ZExoRecyclerPlayer is an Android library that allows developers to easily create RecyclerView with Exoplayer .

ZExoRecyclerPlayer Description ZExoRecyclerPlayer is an Android library that allows developers to easily create RecyclerView with Exoplayer . Please f

A Spotify Clone that plays music and has similar UI to actual Spotify Mobile App. Made with Exoplayer and love ❤️
A Spotify Clone that plays music and has similar UI to actual Spotify Mobile App. Made with Exoplayer and love ❤️

Spotify Clone A Spotify Clone App that can play music, and has a good looking UI that is very similar to actual Spotify Mobile App on Play Store I use

A type-safe HTTP client for Android and the JVM

Retrofit A type-safe HTTP client for Android and Java. For more information please see the website. Download Download the latest JAR or grab from Mave

This library provides Easy Android ListView Adapters(EasyListAdapter & EasyCursorAdapter) which makes designing Multi-Row-Type ListView very simple & cleaner, It also provides many useful features for ListView.
This library provides Easy Android ListView Adapters(EasyListAdapter & EasyCursorAdapter) which makes designing Multi-Row-Type ListView very simple & cleaner, It also provides many useful features for ListView.

EasyListViewAdapters Whenever you want to display custom items in listview, then only way to achieve this is to implement your own subclass of BaseAda

A library that gives full control over text related technologies such as bidirectional algorithm, open type shaping, text typesetting and text rendering
A library that gives full control over text related technologies such as bidirectional algorithm, open type shaping, text typesetting and text rendering

Tehreer-Android Tehreer is a library which gives full control over following text related technologies. Bidirectional Algorithm OpenType Shaping Engin

Type-safe time calculations in Kotlin, powered by generics.

Time This library is made for you if you have ever written something like this: val duration = 10 * 1000 to represent a duration of 10 seconds(in mill

Type safe intent building for services and activities

#IntentBuilder Type safe intent building for services and activities. IntentBuilder is a type safe way of creating intents and populating them with ex

A simple Android utils library to write any type of data into cache files and read them later.

CacheUtilsLibrary This is a simple Android utils library to write any type of data into cache files and then read them later, using Gson to serialize

An ORM for Android with type-safety and painless smart migrations
An ORM for Android with type-safety and painless smart migrations

Android Orma Orma is a ORM (Object-Relation Mapper) for Android SQLiteDatabase. Because it generates helper classes at compile time with annotation pr

typedmap is an implementation of heterogeneous type-safe map pattern in Kotlin

Typedmap typedmap is an implementation of heterogeneous type-safe map pattern in Kotlin. It is a data structure similar to a regular map, but with two

A pluggable sealed API result type for modeling Retrofit responses.

A pluggable sealed API result type for modeling Retrofit responses.

Test any type of cloud database on Android apps. No need of a dedicated backend.

Test any type of cloud database on Android apps. No need of a dedicated backend.

Owner
Halil Özel
Android Developer 👨🏻‍💻
Halil Özel
AutoPlayer - A player based on ExoPlayer for play video automatically in RecyclerView, when an item is visible.

A player based on ExoPlayer for play video automatically in RecyclerView, when an item is visible.

Kishan Singh 6 Aug 14, 2022
An Android app that lets you download free children's books in different languages from non-profit publisher Book Dash

Bookdash Android Check out the blog post here: http://riggaroo.co.za/book-dash-android-app/ Download the app: https://play.google.com/store/apps/detai

Book Dash 684 Jan 8, 2023
Radio Player - A Flutter plugin to play streaming audio content with background support and lock screen controls.

A Flutter plugin to play streaming audio content with background support and lock screen controls. Installation To use this package, add

Ayotunde abdulsalam 1 Mar 14, 2022
Fast Seek for ExoPlayer

FastExoPlayerSeeker Introduction Adds fast seeking for exoplayer. (Note: it also depends on the amount of video encoding, mainly IDR Frames) How to in

Jan Rabe 40 Dec 27, 2022
Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer

Just (Video) Player Android video player based on ExoPlayer It uses ExoPlayer's extension-ffmpeg with all its audio formats enabled (it can handle eve

Marcel Dopita 677 Dec 28, 2022
Android podcast app made with Jetpack Compose and ExoPlayer.

Podcast App Android podcast app made with Jetpack Compose and ExoPlayer. Podcast information provided by Listen Notes API. Features Jetpack Compose UI

Fabian 302 Jan 2, 2023
Yet Another Video Player (or YAVP) is a Video Player for Android that is based on Googles ExoPlayer.

Yet Another Video Player Yet Another Video Player (or YAVP) is a Video Player for Android that is based on Googles ExoPlayer. Who Is YAVP For? First o

null 62 Dec 29, 2022
To show how to use preloading in exoplayer android using simple MVVM

Instagram Preloading Tech Stack Kotlin ViewBinding ExoPlayer ViewModel Coroutine Glide for image Demo Please take a look at videos folder How to run C

Andri Ginting 19 Sep 25, 2022
The androidx.media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android

AndroidX Media AndroidX Media is a collection of libraries for implementing media use cases on Android, including local playback (via ExoPlayer) and m

Android Jetpack 310 Dec 29, 2022