Exemplo n.º 1
0
 @Override
 public void onAvailableRangeChanged(int sourceId, TimeRange availableRange) {
   availableRangeValuesUs = availableRange.getCurrentBoundsUs(availableRangeValuesUs);
   Log.d(
       TAG,
       "availableRange ["
           + availableRange.isStatic()
           + ", "
           + availableRangeValuesUs[0]
           + ", "
           + availableRangeValuesUs[1]
           + "]");
 }
Exemplo n.º 2
0
 private void setMediaPlaylist(int variantIndex, HlsMediaPlaylist mediaPlaylist) {
   variantLastPlaylistLoadTimesMs[variantIndex] = SystemClock.elapsedRealtime();
   variantPlaylists[variantIndex] = mediaPlaylist;
   live |= mediaPlaylist.live;
   durationUs = live ? C.UNKNOWN_TIME_US : mediaPlaylist.durationUs;
   TimeRange newAvailableRange = new TimeRange.StaticTimeRange(0, mediaPlaylist.durationUs);
   if (availableRange == null || !availableRange.equals(newAvailableRange)) {
     availableRange = newAvailableRange;
     this.notifyAvailableRangeChanged(availableRange);
   }
 }
Exemplo n.º 3
0
 @Override
 public void onSeekRangeChanged(TimeRange seekRange) {
   seekRangeValuesUs = seekRange.getCurrentBoundsUs(seekRangeValuesUs);
   Log.d(
       TAG,
       "seekRange [ "
           + seekRange.type
           + ", "
           + seekRangeValuesUs[0]
           + ", "
           + seekRangeValuesUs[1]
           + "]");
 }