How to implement ExoPlayer to play video from URL in Android Studio

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone in this tutorial you will learn how to implement EXO Player in Android Studio let's start by adding the required dependency [Music] now let's add Internet permission in our Android manifest file [Music] now let's build the UI for this tutorial we need only styled player view let's add it and give it an ID [Music] foreign [Music] now let's code the mainactivity.javafile we'll start by declaring EXO player and the URL of the video [Music] [Music] foreign I'm using a short film from blender you can use any video but make sure that the URL ends with an extension [Music] now let's declare the styled player View [Music] [Music] thank you then let's initialize EXO player [Music] now let's set exoplayer to style player View in order to set a video Source in EXO player we need to pass the source as media item so let's declare the media item with the video URL [Music] foreign [Music] item as EXO player's source [Music] then let's call the prepare function so that the player starts loading the video from the source [Music] after that in order to play the video as soon as it loads we have to set play when ready is true finally in the on stop function we have to add the following codes so that the EXO player won't continue to play the video in the background after the app is closed [Music] now let's run this app [Music] [Music] exoplayer also comes with this in build controls which is great [Music] video source and video speed from here [Music] [Music] thank you thank you for watching a like share and comment would be great also subscribe for more programming contents happy coding
Info
Channel: Everyday Programmer
Views: 11,151
Rating: undefined out of 5
Keywords: programmer, apps, apks, development, apple, developer, client, android, new, hero, knowledge, programming, for, beginners, language, training, setup, laptop, every, one, using c, with c, line, studio, 2023, how, to, example, tutorial, exo, player, video, java, implement, add, create, url, play, working, code, youtube, kotlin, source, github, project, college, media, with, free, guide, course, repository, from, link, file, uri, codewith, flutter, ai, ui, build, exoplayer, coding, everyday, web, blender, controls, pause, resume, close, builder, depreciated, fix
Id: _ttcR7VDouE
Channel Id: undefined
Length: 4min 53sec (293 seconds)
Published: Tue Jul 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.