-
Google i/o 2018 - ExoPlayer 2.8프로그래밍/Android 2018. 6. 6. 20:20반응형
- MediaPlayer for Android and across all different devices
- API Level >= 16
- Open source in Github
- Used in 200,000 apps
- advanced functionality
- caching and offline to their application
- ExoPlayer's extension modules with Google API (MediaSession, Cast, Interactive Media Ads)
- 2.8.0
- Exo-Player-Core, Exo-Player-Ui
- extension-Ima
- Audio Player with Notification
- extension-mediassesion - Audio Palyer with Android Framework
- MediaSessionConnect syncs the player state with the state of MediaSession and retrieves commands from the MediaSession of Android Framework.
- download functions for offline playback
-
when the MediaSource request some data, it’s going to ask the CacheDataSource to provide that information. The CacheDataSource is going to look in the cache. If it is present there, then we can get the data from the local storage. On the other hand, if the data is not present in the cache, we’ve got a cache miss, then the CacheDataSource needs to go to the DataSource that’s being used to load from the network, and requests the data from the network, and then it’s going to store in the cache when it arrives. The cache gradually gets populated with the data that’s loaded during playback.
The CacheEvictor is responsible for making sure that our cache doesn’t grow indefinitely as we play more and more different media items. The NoCacheEvictor implements CacheEvictor. It is never going to remove(evict) data from the cache for the current video. This is for that we don’t want to the situation downloading the stream and we are getting rid of the stream. It is very annoying for the users.
We can get the every cache data from the CacheDataSource, then there’s never a need to go to network.
반응형'프로그래밍 > Android' 카테고리의 다른 글
Android Room 데이터베이스 코드랩 (0) 2021.03.30 MediaPlayer:안드로이드에서 간단한 비디오 재생 (0) 2020.11.21 Property View (0) 2017.12.20 Introduction to Physics-based animations in Android (0) 2017.09.06 과연 Activity/Fragment가 Finished되면 View Model은 어떻게 될까? (0) 2017.08.29