Package com.brightcove.player.controller
Class ExoPlayerSourceSelector
java.lang.Object
com.brightcove.player.controller.ExoPlayerSourceSelector
- All Implemented Interfaces:
SourceSelector
The default Source Selector used with ExoPlayer.
It attempts selecting a
DeliveryType.DASH
Source
when available,
or it will use BrightcoveSourceSelector.selectSource(Video)
otherwise.
This selector prioritize HEVC sources for Android API level 21 and higher.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canPlaySource
(Source source) Check if the device has a decoder for the given source.selectSource
(Video video) Determines best appropriate Source within given Video object based on logic implemented.
-
Constructor Details
-
ExoPlayerSourceSelector
public ExoPlayerSourceSelector()
-
-
Method Details
-
selectSource
Determines best appropriate Source within given Video object based on logic implemented.- Specified by:
selectSource
in interfaceSourceSelector
- Parameters:
video
- Video in which to find the most appropriate Source- Returns:
- the best matched Source based on the currently implemented selection logic
- Throws:
IllegalArgumentException
- when the Video passed is nullNoSourceFoundException
- when no validSource
is found
-
canPlaySource
Check if the device has a decoder for the given source. NOTE: The source must contain a codecs to determine if the device has a decoder.- Parameters:
source
- The source to check.- Returns:
- True if the device has an audio and video decoder based on the codecs.
-