![]() MediaSource instances that it needs internally. From 2.12 onwards, the player converts media items to the Prior to ExoPlayer 2.12, the player needed to be given a MediaSource rather Read more about the different options available whenīuilding media items, such as clipping and attaching subtitle files, on the Read more about populating and manipulating the playlist on the The playlist can be updated during playback without the need to prepare the addMediaItem ( secondItem ) // Prepare the player. fromUri ( secondVideoUri ) // Add the media items to be played. fromUri ( firstVideoUri ) MediaItem secondItem = MediaItem. A StyledPlayerView can be included in your application’s layout xml.īinding the player to the view is as simple as: StyledPlayerControlView, a SubtitleView, and a Surface onto which video is These include StyledPlayerView, which encapsulates a The ExoPlayer library provides a range of pre-built UI components for media “Threading model” section of the ExoPlayer Javadoc. If you see IllegalStateException being thrown with the message “Player isĪccessed on the wrong thread”, then some code in your app is accessing anĮxoPlayer instance on the wrong thread (the exception’s stack trace shows youįor more information about ExoPlayer’s threading model, see the Which the player must be accessed can be queried using ![]() ![]() In all cases the Looper of the thread from Used, or if that thread does not have a Looper, the Looper of theĪpplication’s main thread is used. Specified, then the Looper of the thread that the player is created on is Specified by passing a Looper when creating the player. The thread on which an ExoPlayer instance must be accessed can be explicitly Using theĪpplication’s main thread is a requirement when using ExoPlayer’s UI components ![]() Vast majority of cases this should be the application’s main thread. ![]() build () A note on threadingĮxoPlayer instances must be accessed from a single application thread. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |