1. 30 Jun, 2023 1 commit
  2. 05 Jul, 2023 1 commit
  3. 28 Jun, 2023 2 commits
    • Ensure that ShuffleOrder has the same length as the current playlist · c033263d
      Add a fail-fast check in `ExoPlayerImpl` to ensure the equality of the lengths of `ShuffleOrder` and the current playlist. Also improve the documentation of `setShuffleOrder(ShuffleOrder)` with explicit instruction on this.
      
      Issue: androidx/media#480
      
      #minor-release
      
      PiperOrigin-RevId: 544009359
      (cherry picked from commit 9cabbc9badbc9301f5e13398b8444377c4e72543)
      tianyifeng committed
    • Clarify MediaPeriod.readDiscontinuity Javadoc · f6042d63
      It currently wrongly documents that it is only called before reading
      streams (that has never been the case and all MediaPeriods already need
      to handle calls after reading samples from the streams).
      
      It was also a bit unclear what a discontinuity implies and the new
      Javadoc calls out the main use case for discontinuties and the intended
      meaning of returning a discontinuity.
      
      #minor-release
      
      PiperOrigin-RevId: 543989124
      (cherry picked from commit 7530c45cb60f212d9d65c24f40a45fe666416ad5)
      tonihei committed
  4. 26 Jun, 2023 3 commits
  5. 22 Jun, 2023 1 commit
  6. 20 Jun, 2023 4 commits
    • Switch to SVG assets hosted on developer.android.com for reference docs · 8a4c944c
      #minor-release
      
      PiperOrigin-RevId: 541970884
      (cherry picked from commit ce466b742bc8edebef363aa79ec2c91fb40df5cd)
      ibaker committed
    • Fix ArrayIndexOutOfBoundIndex when re-preparing after exception · a72f1b2d
      When an app tried to re-prepare a live streeam with server side inserted
      ad after a playback exception, the player tried to find the ad group by
      its index in the ad playback state of the next timeline when creating
      the first period.
      
      If a source that supports server side ad, has removed the ad playback
      state when the source has been removed, this causes a crash. For live
      streams this is a reasonable thing to do given the exception could be
      caused by an invalid ad playback state.
      
      This change removes the ad metadata from the current period for live
      streams and the timeline. In case the ad playback state is not reset
      by the source, the first timeline refresh would ad the metadata again.
      
      PiperOrigin-RevId: 541959628
      (cherry picked from commit 207ef0d0f0bee86e75409f53ded325e859ca25aa)
      bachinger committed
    • Fix spurious sessions created for events after the playlist is cleared · 12cd9e81
      Some events may arrive after the playlist is cleared (e.g. load
      cancellation). In this case, the DefaultPlaybackSessionManager may
      create a new session for the already removed item.
      
      We already have checks in place that ignore events with old
      windowSequenceNumbers, but these checks only work if the current
      session is set (i.e. the playlist is non-empty). The fix is to add
      the same check for empty playlists by keeping note of the last
      removed window sequence number.
      
      PiperOrigin-RevId: 541870812
      (cherry picked from commit 656e0723e51e1bc38d558e77fa2cb0cc17e37054)
      tonihei committed
    • Merge pull request #436 from jaeho-lee104:feature/improve_condition · 38032a6e
      PiperOrigin-RevId: 540875285
      (cherry picked from commit 9fd38c16eeb9e64ff62a0a47ae6e174bb8de8d43)
      Ian Baker committed
  7. 15 Jun, 2023 2 commits
    • Refactor method `CmcdLog.createInstance` to accept `bufferedDurationUs` · b16238a3
      Instead of providing `playbackDurationUs` and `loadPositionUs` individually, which are used to calculate the buffer duration for CMCD logging, we can directly pass the pre-calculated `bufferedDurationUs` available in the `getNextChunk` method of the chunk source classes.
      
      Issue: google/ExoPlayer#8699
      
      #minor-release
      
      PiperOrigin-RevId: 540630112
      (cherry picked from commit 4d1119ab24384621877f4e7854dca1fa6db964a3)
      rohks committed
    • Add CMCD logging when requesting initialization chunk for DASH and HLS · fd060619
      Additionally, two existing methods to `buildDataSpec` in `DashUtil` have been deprecated, while a new method has been added that allows the inclusion of `httpRequestHeaders`.
      
      Issue: google/ExoPlayer#8699
      
      #minor-release
      
      PiperOrigin-RevId: 540594444
      (cherry picked from commit c69b6fe41d065175dacc22b1b30efed91b8102f1)
      rohks committed
  8. 14 Jun, 2023 3 commits
    • Remove `=` from parameter args in call to `Constructor.newInstance` · 593590c0
      These comments reflect the parameter names of the constructor that
      we're reflectively calling, but errorprone complains that they don't
      match the parameter names of `Constructor.newInstance`.
      
      PiperOrigin-RevId: 540348118
      (cherry picked from commit 2b53f100f858e36159ab636e82bcb07d26868150)
      ibaker committed
    • Stop suppressing exceptions in `MediaCodec.Callback` during flush · eb5ffeb0
      Previously `AsynchronousMediaCodecCallback.mediaCodecException` was
      cleared when flushing completed. This behaviour was changed in
      https://github.com/google/ExoPlayer/commit/aeff51c50772a82e44045e7d80e8a13390e2bb36
      so now the exception is not cleared.
      
      The result after that commit was that we would **only** suppress/ignore
      the expression if a flush was currently pending, and we would throw it
      both before and after the flush. This doesn't really make sense, so this
      commit changes the behaviour to also throw the exception during the
      flush.
      
      This commit also corrects the assertion in
      `flush_withPendingError_resetsError` and deflakes it so that it
      consistently passes. The previous version of this test, although the
      assertion was incorrect, would often pass because the
      `dequeueInputBuffer` call would happen while the `flush` was still
      pending, so the exception was suppressed.
      
      #minor-release
      
      PiperOrigin-RevId: 540237228
      (cherry picked from commit dd17e73629930628e5cb313301ceabf0c776bd18)
      ibaker committed
    • Add missing @Override · 1e6dd8a2
      PiperOrigin-RevId: 540220141
      (cherry picked from commit 1434c61bf5e8a92d90cadc39e66e5edb993b9a84)
      tonihei committed
  9. 12 Jun, 2023 3 commits
  10. 11 Aug, 2023 1 commit
    • Stop setting `-no-module-directories` in ExoPlayer javadoc generation · 0c58f15f
      This flag was introduced to fix links in javadoc search when generating
      it with Java 11: <unknown commit>
      
      The flag is no longer supported with Java 17 (which is required for
      Gradle 8.0+), and seems to no longer be needed: I generated the javadoc
      with it removed and the search links work OK.
      
      PiperOrigin-RevId: 536738686
      ibaker committed
  11. 05 Jul, 2023 1 commit
  12. 26 Jun, 2023 4 commits
  13. 23 Jun, 2023 5 commits
  14. 15 Jun, 2023 1 commit
  15. 09 Jun, 2023 8 commits
    • Rollback of https://github.com/google/ExoPlayer/commit/21b5661897bb684502ae187f2aec83f58a1d21ff · 233655a3
      *** Original commit ***
      
      Add a timer to end a video stream prematurely in ExtTexMgr
      
      ***
      
      This has been submitting for more than 1.5hrs. "This presubmit is running slowly because you have been throttled by Build Queue due to using too much of your Product Area's quota."
      
      adding NO_SQ as this is a pure rollback
      
      PiperOrigin-RevId: 539135970
      (cherry picked from commit e790f3271f209f4fcc955f6d8841ec5219da7156)
      Googler committed
    • Add missing import to StreamKey · 036f6e8c
      #minor-release
      
      PiperOrigin-RevId: 539112700
      (cherry picked from commit 36a6fe4af70031bdf451d759ec9a31633c46ad99)
      tofunmi committed
    • Throw exception when `TimestampAdjuster` initialization hits timeout · 68d7214e
      Add `HlsMediaSource.Factory.setTimestampAdjusterInitializationTimeoutMs(long)` to set the timeout for the loading thread to wait for the `TimestampAdjuster` to initialize. If the initialization doesn't complete before the timeout, a `PlaybackException` is thrown to avoid the playback endless stalling. The timeout is set to zero by default.
      
      This can avoid HLS playback endlessly stalls when manifest has missing discontinuities. According to the HLS spec, all variants and renditions have discontinuities at the same points in time. If not, the one with discontinuities will have a new `TimestampAdjuster` not shared by the others. When the loading thread of that variant is waiting for the other threads to initialize the timestamp and hits the timeout, the playback will stall.
      
      Issue: androidx/media#323
      
      #minor-release
      
      PiperOrigin-RevId: 539108886
      (cherry picked from commit 4eb56cfce76a41ff90d50d2d9e3ea4e9ad0d7b4e)
      tianyifeng committed
    • Fix splitting ad playback state for partial ad group when joining · 694e83f7
      This change addresses the case when the user joins the live stream
      on an ad period but the metadata for the ad period is not emitted.
      This results in inserting a partial ad group.
      
      In this case the ad group duration is longer than the partial ad
      group. If now the partial ad group ends at the period before the
      last period of the window (unknown duration), the splitting algorithm
      didn't recognize that the ad group already ended and made the last
      period wrongly an ad period.
      
      This change handles this edge case by counting the mapped ads in
      the partial ad group to detect this situation and stops splitting.
      
      #minor-release
      
      PiperOrigin-RevId: 539102785
      (cherry picked from commit 2adeb4107790e1a9f822b5b810e532501a02e4aa)
      bachinger committed
    • Add missing empty lines · 75a745a1
      PiperOrigin-RevId: 539100987
      (cherry picked from commit 4755e7313e5a31f5f9b6599ff290580026994b75)
      claincly committed
    • Make current period a placeholder when a live stream is reset · 43f2ebfc
      In case the player is reset while a live stream is playing, the current
      period needs to be a placeholder. This makes sure that the default start
      position is used when the first live timeline arrives after re-preparing.
      
      #minor-release
      
      PiperOrigin-RevId: 539044360
      (cherry picked from commit 538143aad92340ede0891a74c514a213e5513d06)
      bachinger committed
    • Add a timer to end a video stream prematurely in ExtTexMgr · 95ac96ae
      PiperOrigin-RevId: 539036285
      (cherry picked from commit 21b5661897bb684502ae187f2aec83f58a1d21ff)
      claincly committed
    • Do not reset period uid when DashMediaSource is released · 7d221150
      When the source is prepared again after stop, the period uid
      is calculated by subtracting the `firstPeriodId` from the
      period uid that is passed in to `createPeriod`. When this
      happens after stop, the uid from the old period uid that
      is still stored and has the value of the last played uid.
      
      Hence the `firstPeriodId` must not be reset when released.
      
      Issue: google/ExoPlayer#10838
      PiperOrigin-RevId: 539028570
      (cherry picked from commit de2ad14f46f4790063dfef849ba8cc0069f6106e)
      bachinger committed