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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanPlaySource(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:
selectSourcein 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 validSourceis 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.
-