Тёмный

How to Build a Simple Video Player With Jetpack Compose & ExoPlayer (Media3) 

Philipp Lackner
Подписаться 181 тыс.
Просмотров 39 тыс.
50% 1

With the Media3 library we have a simplified way to implement all kinds of media playback for Android. In this video I'll show you how you can build a simple video player with it.
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/...
Get the source code for this video here:
github.com/phi...

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 71   
@thelumiereguy
@thelumiereguy Год назад
What timing! I was just working on the same thing haha
@sebastianseno9285
@sebastianseno9285 Год назад
you're lucky bro haha
@murderousgod-pubglite4262
@murderousgod-pubglite4262 Год назад
btw I was planning to make a video player app with jetpack compose and here you are withing the right time, thanks.
@elfarouk3306
@elfarouk3306 Год назад
Man ,I will be honest with you. I was looking for this a week ago . I feel like you have a reading mind superpower!!! Please keep up the good work .
@PhilippLackner
@PhilippLackner Год назад
Happy to help!
@Adam0001
@Adam0001 Год назад
Good topic 👏 If you could make more tutorials like these topics, like recording audio or rebuild spotify project that you already made it before 😁 Thank you for your efforts 💐
@meidy3795
@meidy3795 Год назад
You just in time 😭 I was about to study about Media 3. Thank you so much 😁😁😁😁😁
@PhilippLackner
@PhilippLackner Год назад
Hope you enjoyed it!
@sanjaybhatikar
@sanjaybhatikar Год назад
Watched this video 3-4 times to wrap my head around all the great content in it. I realized you have a tell. When you use 'simple' in a title that means it is going to be really complicated. Just kidding. Thank you so much and cheers!
@benbrown1535
@benbrown1535 Год назад
Good video, definitely learned a lot about compose and DI but for someone rather new to Android dev you move particularly fast!
@subbum3414
@subbum3414 Год назад
I'm grateful, Phillip. Please make videos demonstrating how to use Exo player for video download, playback, and Chrome Cast. I cannot find any videos on this subject.
@rajamondal5084
@rajamondal5084 Год назад
i recommend your channel my developer then she said "Thank you"
@dikenmhrz3902
@dikenmhrz3902 Год назад
Wouldn't this cause memory leak as the player could be referencing the PlayerView internally? If the activity is destroyed, is it sure the player be referencing the PlayerView?
@justmeagain9302
@justmeagain9302 Месяц назад
Hmmm since app context of player is scoped to viewmodel, wouldn't it not cause memory leaks tho?
@adamfoerster9098
@adamfoerster9098 9 месяцев назад
Thanks for the excellent video but wow. That is a LOT of setup for a simple video player. I wished there was a framework for Android to abstract away most of the setup and let the dev concentrate in just creating views and logic. Google could take a clue from Angular and do something that feels more batteries included.
@DahabJr
@DahabJr Год назад
This is awesome video, thank you so much, but sir please please we need à video on bottom bar navigation with Raamcosta library . Plz
@SameepSharma
@SameepSharma 2 месяца назад
Hi friends,, I'm facing an issue where I already have a composable which wraps Exoplayer, but I wanto apply fade-in/fade-out on this, however, when I overlay a Box over it AnimatedVisibility, the video starts again as it is recomposed. What to do, want to deliver tonight!
@Prabhs226
@Prabhs226 5 месяцев назад
Its good but what if i want my own design for the player. Like mx plater where you can seek video by double tapping or just by swiping on the video. May be use different layout icons etc. For eg, i want to use it in a bottomsheet, sonplayer design changes according to how much sheet is open.
@user-od2mj1dv5h
@user-od2mj1dv5h Год назад
Thank you very much
@bongitkh
@bongitkh Год назад
I tried full screen, it was not working correctly, do you have any workings examples
@TheThornTech
@TheThornTech Год назад
Thank you
@viledogvd3539
@viledogvd3539 6 месяцев назад
Hello. I'm trying to make a media player and I have a problem with .flac playback. When I try to get currentPosition of the track to move Slider it gives me a wrong values (multiplied by 2)and app got crash in a few seconds of playback, but with mp3 is everything ok. But if I comment this function everything is playing fine... except progress bar... ???
@filipebittencourt_
@filipebittencourt_ Год назад
Amazing! Thanks for sharing.
@freshtechtips
@freshtechtips Год назад
Is this media player specific to Android framework?
@dikenmhrz3902
@dikenmhrz3902 Год назад
Cant we use player from viewModel to play and pause video?
@mustafaammar551
@mustafaammar551 Год назад
Very cool video Thank You Bro you are the best
@viledogvd3539
@viledogvd3539 5 месяцев назад
Hello Philipp can You tell me how to solve my problem. I'am just start to study android development, kotlin, jetpack and so on... I'm writing audio player (ExoPlayer) and I have a problem with progres bar (Slider) when I'm trying to update the slider like that: if(_isPlaying) { LaunchedEffect(key1 = currentTime) { delay(1000L) // wait 1sec. currentTime = audioPlayer.getTrackPosition() bufferedPercentage = audioPlayer.getPlayer()!!.bufferedPercentage } } it cause a micro freezes... every second everything stucks: Lazy column, Marquee Text and even can cause app crash if I reduce delay to smaller values, like 100ms... Do You have any Ideas why does it happens?
@itselanhandoko
@itselanhandoko Год назад
how to make playerview fullscreen?
@PinaColada65
@PinaColada65 3 месяца назад
Can someone here please tell how to download the adaptive streams through exoplayer with exoplayer's download manager. I have utilised download helper for callback and am stuck with adding the broadcast receiver to it.
@amineib7286
@amineib7286 Год назад
Hello Philipp, where do we release the resources here to the player? shouldn't we set the playerview's player to null somewhere?
@akash_dvlpr
@akash_dvlpr Месяц назад
how to play youtube videos using media3? pleade let us know sir
@mojamoha8636
@mojamoha8636 3 месяца назад
i want to use Media3 Transformer to cut and edit video, any idea
@murderousgod-pubglite4262
@murderousgod-pubglite4262 Год назад
Please post full app tutorials with jetpack compose like your cryptoapp, note app etc
@maximooze3196
@maximooze3196 Год назад
use your brain buddy
@nagp2836
@nagp2836 Год назад
Hey, can you tell me how get the media metadata and current position of song played from any other app into my app, please give some info on this
@kelvintan2699
@kelvintan2699 Год назад
Does it have some sort of data persistence where the videos I uploaded will not be lost whenever the app closes or phone restarts?
@ND-xs3wj
@ND-xs3wj Год назад
is it a good practice to add your player in the viewmodel?
@briankimathi5400
@briankimathi5400 Год назад
Hello Philipp, Can you make a video on reels vew like tiktok and instagram using jetpack compose
@summerwise
@summerwise Год назад
Hello, Philipp. Can you make a video about handling different types of body from Retrofit response? For example, handling successful response body and error body with different structure?
@Priyanshu-ub2bp
@Priyanshu-ub2bp 8 месяцев назад
No
@redev1966
@redev1966 Год назад
Hi you can make example preload video with Media3 in view pager ?
@sathishra1758
@sathishra1758 Год назад
Hi, make a video for the call recording feature latest android versions
@Santhoshkuma6
@Santhoshkuma6 Год назад
How to get out Data From api or local room database to show in table view using Kotlin
@Matiplayer
@Matiplayer Год назад
Hey Philipp, I was wondering, what is your current IDE UI Theme (color scheme)?
@veceluxa7601
@veceluxa7601 Год назад
It's dracula I think
@theai2020
@theai2020 Год назад
Can you make a video on exoplayer in recycler view with caching
@dkyadav5322
@dkyadav5322 Год назад
Yo yo yo yo yo damn happy thank big bro
@kamanchomorgan9655
@kamanchomorgan9655 Год назад
How to play m3u8 format audio with media3
@xomeluha5837
@xomeluha5837 Год назад
Hey Phillip, thanks for this video. I implemented exoplayer following your tutorial and now I'm trying to play the video from the URL in viewpager2. For every video, I'm getting a MediaCodecConverter error. The same video is playable in the iOS app and in the browser. (file extension: .mp4)
@fracta7
@fracta7 Год назад
Maybe the codec isn't supported? Check the codec
@manalijoshi519
@manalijoshi519 Год назад
Same with this.Badly stuck.I used defaultRender.setcallback true error fixed using this but some videos are rotating.Please anyone help me with this.I m also releaseing player then also I got.
@aestheticdesigns7469
@aestheticdesigns7469 Год назад
can we get audio player also?
@BashPSK
@BashPSK Год назад
Nice bro 😍😍😍
@PhilippLackner
@PhilippLackner Год назад
Thanks 🤗
@SOFTEDBLOCKED
@SOFTEDBLOCKED Год назад
@justinsmith3981
@justinsmith3981 8 месяцев назад
unless you are just playing a one off video you should be using a service and a mediaSession
@harpritsingh172
@harpritsingh172 Год назад
Hi, Can you please guide and make a video on How to pull a video from the google bucket of Firebase storage. And then play it locally from app's cache, no streaming.
@frank4pickerson
@frank4pickerson Год назад
How could a view like PlayerView have onPause and onResume functionality?. I have never seen a button that could be resumed. But PlayerView, which is just a view like a button, could be? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JX1fwti2LI4.html
@Designguidetv
@Designguidetv 11 месяцев назад
seems a bit complicated for something so simple?
@brky.kurtoglu
@brky.kurtoglu Год назад
Bro what theme you are using 🤘🤘
@manu12353
@manu12353 Год назад
same question haha
@ahmedaaoua4233
@ahmedaaoua4233 Год назад
heey , what about m3u??
@toyboatt
@toyboatt Год назад
Followed until about 7 minutes in. Now I'm lost. *sigh*
@Zeeshan-Syed
@Zeeshan-Syed Год назад
Cursor not closed? 😅
@PhilippLackner
@PhilippLackner Год назад
use {} makes sure it's closed after use
@Zeeshan-Syed
@Zeeshan-Syed Год назад
Ooo That's super cool.. 🤩
@MillionviewsYT1
@MillionviewsYT1 Год назад
pls adaptive
@maximooze3196
@maximooze3196 Год назад
rofl, lucky for those group of people spamming stack overflow these past few days about this thing 🤣🤣🤣🤣
@DiabloZq
@DiabloZq Год назад
Thank you for interesting and helpfull video!🦾
Далее
Как мы играем в игры 😂
00:20
Просмотров 156 тыс.
Inside Out 2: BABY JOY VS SHIN SONIC
00:19
Просмотров 2,2 млн
Coding Was HARD Until I Learned These 5 Things...
8:34
How to optimize media streaming with ExoPlayer
21:58
Просмотров 26 тыс.
What's next for AndroidX Media and ExoPlayer
17:36
Просмотров 31 тыс.
What is the Context? - Android Basics 2023
11:22
Просмотров 56 тыс.
Nobody Cares About Your Coding Projects
11:02
Просмотров 105 тыс.
The Top 3 State Management Mistakes On Android
14:30
Просмотров 24 тыс.