Class ExoPlayerSourceSelector

All Implemented Interfaces:

public final class ExoPlayerSourceSelector extends Object implements 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 Details

    • ExoPlayerSourceSelector

      public ExoPlayerSourceSelector()
  • Method Details

    • selectSource

      @NonNull public Source selectSource(@NonNull Video video) throws NoSourceFoundException
      Determines best appropriate Source within given Video object based on logic implemented.
      Specified by:
      selectSource in interface SourceSelector
      video - Video in which to find the most appropriate Source
      the best matched Source based on the currently implemented selection logic
      IllegalArgumentException - when the Video passed is null
      NoSourceFoundException - when no valid Source is found
    • canPlaySource

      public static boolean canPlaySource(Source source)
      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.
      source - The source to check.
      True if the device has an audio and video decoder based on the codecs.