You can read more about the lazy delegate here. In our case, this is in the onCreate callback of the activity. app/adle dependencies is a kotlin delegate for lazy initializing a value the first time it is used. Everything from the currently specified exoplayer-codelab-N module is merged when the app is built using a gradle dependency in app/adle. The app module is actually empty, having only a manifest. Screenshot: Project structure when importingĪfter the build finishes, you'll see six modules: the app module (of type application) and five modules with names exoplayer-codelab-N (where N is 00 to 04, each of type library).
To get started, download the Android Studio project:Īlternatively, you can clone the GitHub repository: git clone Ĭloning or unzipping provides you with a root folder ( exoplayer-intro), which contains a single gradle project with multiple modules an app module and one for each step of this codelab, along with all the resources you need.
Non-relevant concepts and code blocks are glossed over and are provided for you to simply copy and paste. Note: This codelab is focused on ExoPlayer.
Use standard ExoPlayer UI components, then customize them to your app's style.Register event listeners to monitor playback state and show how listeners can be used to measure the quality of playback.Play adaptive video streams, which adapt the media quality to the available bandwidth.Integrate ExoPlayer with the app's activity lifecycle to support backgrounding, foregrounding, and playback resumption in a single or multi-window environment.Create a SimpleExoPlayer instance, which prepares and plays media from a variety of sources.Moderate knowledge of Android development and Android Studio.Note: Read more about the pros and cons in the ExoPlayer developer guide. It is an open source project used by Google apps, including YouTube and Google Play Movies & TV. ExoPlayer is highly customizable and extensible, making it capable of many advanced use cases.
It supports many of the same media formats as MediaPlayer, plus adaptive formats, such as DASH and SmoothStreaming. ExoPlayer has a number of advantages over the built-in MediaPlayer in Android. It’s surprising that Microsoft has neglected to add these features to Windows Media Player even though it is pretty popular with Windows users.Note: ExoPlayer is the video player running in the Android YouTube app.ĮxoPlayer is an app-level media player built on top of low-level media APIs in Android. Click the one you want to switch to and the track will change on the fly. A popup list will show you the available channels. To change the audio track, click the language button next to the Play/Pause button. If your media file has multiple audio tracks, often used for movies and TV shows that are available in multiple languages, you can choose and switch to any one them from inside the Movies & TV app. The subtitles will start appearing on your screen right away. The file might have subtitles encoded and they will appear here as well as an option to ‘Choose subtitle file’.Ĭlick ‘Choose subtitle file’ and select the SRT file you downloaded. Open the video in the Movies & TV app and click the speech bubble button next to the volume button. If you downloaded the subtitles in a zipped file, extract them first. You can save the file anywhere you want but make sure it’s in SRT format.
Here’s how you can load an external subtitles file in the Movies & TV app on Windows 10, and how you can switch audio tracks.ĭownload subtitles for the movie or TV show you want to watch.
Although Microsoft hasn’t fixed this, it has introduced a new app in Windows 10 to play media called Movies & TV that supports loading external subtitles. Unless you have a movie with encoded subtitles, you will have to use other media players such as VLC player to load subtitles. It’s a glaring feature omission that has not been corrected to date. One of the biggest shortcomings of the Windows Media Player app is that it cannot load external subtitles.