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

  Рет қаралды 37,828

Philipp Lackner

Philipp Lackner

Жыл бұрын

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/drop-table-ment...
Get the source code for this video here:
github.com/philipplackner/Vid...

Пікірлер: 71
@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.
@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 💐
@benbrown1535
@benbrown1535 Жыл бұрын
Good video, definitely learned a lot about compose and DI but for someone rather new to Android dev you move particularly fast!
@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!
@meidy3795
@meidy3795 Жыл бұрын
You just in time 😭 I was about to study about Media 3. Thank you so much 😁😁😁😁😁
@PhilippLackner
@PhilippLackner Жыл бұрын
Hope you enjoyed it!
@thelumiereguy
@thelumiereguy Жыл бұрын
What timing! I was just working on the same thing haha
@sebastianseno9285
@sebastianseno9285 Жыл бұрын
you're lucky bro haha
@sanjaybhatikar
@sanjaybhatikar 11 ай бұрын
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!
@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.
@filipebittencourt_
@filipebittencourt_ Жыл бұрын
Amazing! Thanks for sharing.
@mustafaammar551
@mustafaammar551 Жыл бұрын
Very cool video Thank You Bro you are the best
@user-od2mj1dv5h
@user-od2mj1dv5h Жыл бұрын
Thank you very much
@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?
@rajamondal5084
@rajamondal5084 Жыл бұрын
i recommend your channel my developer then she said "Thank you"
@TheThornTech
@TheThornTech Жыл бұрын
Thank you
@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
@dikenmhrz3902
@dikenmhrz3902 Жыл бұрын
Cant we use player from viewModel to play and pause video?
@ND-xs3wj
@ND-xs3wj Жыл бұрын
is it a good practice to add your player in the viewmodel?
@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
@freshtechtips
@freshtechtips Жыл бұрын
Is this media player specific to Android framework?
@redev1966
@redev1966 Жыл бұрын
Hi you can make example preload video with Media3 in view pager ?
@kelvintan2699
@kelvintan2699 10 ай бұрын
Does it have some sort of data persistence where the videos I uploaded will not be lost whenever the app closes or phone restarts?
@Prabhs226
@Prabhs226 4 ай бұрын
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.
@mojamoha8636
@mojamoha8636 2 ай бұрын
i want to use Media3 Transformer to cut and edit video, any idea
@SameepSharma
@SameepSharma 25 күн бұрын
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!
@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 7 ай бұрын
No
@viledogvd3539
@viledogvd3539 4 ай бұрын
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... ???
@PinaColada65
@PinaColada65 Ай бұрын
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.
@sathishra1758
@sathishra1758 Жыл бұрын
Hi, make a video for the call recording feature latest android versions
@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 8 күн бұрын
Hmmm since app context of player is scoped to viewmodel, wouldn't it not cause memory leaks tho?
@BashPSK
@BashPSK Жыл бұрын
Nice bro 😍😍😍
@PhilippLackner
@PhilippLackner Жыл бұрын
Thanks 🤗
@kamanchomorgan9655
@kamanchomorgan9655 Жыл бұрын
How to play m3u8 format audio with media3
@aestheticdesigns7469
@aestheticdesigns7469 Жыл бұрын
can we get audio player also?
@adamfoerster9098
@adamfoerster9098 8 ай бұрын
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.
@Santhoshkuma6
@Santhoshkuma6 Жыл бұрын
How to get out Data From api or local room database to show in table view using Kotlin
@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
@Matiplayer
@Matiplayer Жыл бұрын
Hey Philipp, I was wondering, what is your current IDE UI Theme (color scheme)?
@veceluxa7601
@veceluxa7601 Жыл бұрын
It's dracula I think
@akash_dvlpr
@akash_dvlpr 18 күн бұрын
how to play youtube videos using media3? pleade let us know sir
@viledogvd3539
@viledogvd3539 4 ай бұрын
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?
@murderousgod-pubglite4262
@murderousgod-pubglite4262 Жыл бұрын
Please post full app tutorials with jetpack compose like your cryptoapp, note app etc
@maximooze3196
@maximooze3196 Жыл бұрын
use your brain buddy
@bongitkh
@bongitkh Жыл бұрын
I tried full screen, it was not working correctly, do you have any workings examples
@itselanhandoko
@itselanhandoko Жыл бұрын
how to make playerview fullscreen?
@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.
@briankimathi5400
@briankimathi5400 11 ай бұрын
Hello Philipp, Can you make a video on reels vew like tiktok and instagram using jetpack compose
@SOFTEDBLOCKED
@SOFTEDBLOCKED Жыл бұрын
@ahmedaaoua4233
@ahmedaaoua4233 Жыл бұрын
heey , what about m3u??
@brky.kurtoglu
@brky.kurtoglu Жыл бұрын
Bro what theme you are using 🤘🤘
@manu12353
@manu12353 Жыл бұрын
same question haha
@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? kzbin.info/www/bejne/gImUl6qqnpd_f5Y
@MillionviewsYT1
@MillionviewsYT1 11 ай бұрын
pls adaptive
@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.. 🤩
@Designguidetv
@Designguidetv 10 ай бұрын
seems a bit complicated for something so simple?
@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.
@justinsmith3981
@justinsmith3981 7 ай бұрын
unless you are just playing a one off video you should be using a service and a mediaSession
@toyboatt
@toyboatt Жыл бұрын
Followed until about 7 minutes in. Now I'm lost. *sigh*
@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:47
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 24 МЛН
ПОМОГЛА НАЗЫВАЕТСЯ😂
00:20
Chapitosiki
Рет қаралды 8 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 30 МЛН
Should You Use Compose State or StateFlow in Your ViewModels?
13:59
Philipp Lackner
Рет қаралды 74 М.
How to Build a Calculator with Jetpack Compose - Android Studio Tutorial
43:24
Stop, Intel’s Already Dead! - AMD Ryzen 9600X & 9700X Review
13:47
Linus Tech Tips
Рет қаралды 1,3 МЛН
Powerful Habits to make Games Quickly
35:58
Edwardivan Labarca
Рет қаралды 6 М.
Алексей Щербаков разнес ВДВшников
00:47