<commit_before># Release notes #

### dev-v2 (not yet released) ###

* Optimize seeking in FMP4 by enabling seeking to the nearest sync sample within
  a fragment. This benefits standalone FMP4 playbacks, DASH and SmoothStreaming.
* Optimize seeking in FMP4.
* Match codecs starting with "mp4a" to different Audio MimeTypes
  ([#3779](https://github.com/google/ExoPlayer/issues/3779)).
* Moved initial bitrate estimate from `AdaptiveTrackSelection` to
  `DefaultBandwidthMeter`.
* Updated default max buffer length in `DefaultLoadControl`.
* UI components:
  * Add support for listening to `AspectRatioFrameLayout`'s aspect ratio update
    ([#3736](https://github.com/google/ExoPlayer/issues/3736)).
  * Add PlayerNotificationManager.
* Downloading: Add `DownloadService`, `DownloadManager` and
  related classes ([#2643](https://github.com/google/ExoPlayer/issues/2643)).
* MediaSources:
  * Allow reusing media sources after they have been released and
    also in parallel to allow adding them multiple times to a concatenation.
    ([#3498](https://github.com/google/ExoPlayer/issues/3498)).
  * Merged `DynamicConcatenatingMediaSource` into `ConcatenatingMediaSource` and
    deprecated `DynamicConcatenatingMediaSource`.
  * Allow clipping of child media sources where the period and window have a
    non-zero offset with `ClippingMediaSource`.
  * Allow adding and removing `MediaSourceEventListener`s to MediaSources after
    they have been created. Listening to events is now supported for all
    media sources including composite sources.
  * Added callbacks to `MediaSourceEventListener` to get notified when media
    periods are created, released and being read from.
* Audio:
  * Factor out `AudioTrack` position tracking from `DefaultAudioSink`.
  * Fix an issue where the playback position would pause just after playback
    begins, and poll the audio timestamp less frequently once it starts
    advancing ([#3841](https://github.com/google/ExoPlayer/issues/3841)).
* Caching:
  * Add release method to Cache interface.
  * Prevent multiple instances of SimpleCache in the same folder.
    Previous instance must be released.
* DRM:
  * Allow multiple listeners for `DefaultDrmSessionManager`.
  * Pass `DrmSessionManager` to `ExoPlayerFactory` instead of `RendererFactory`.
* Fix handling of zero padded strings when parsing Matroska streams
  ([#4010](https://github.com/google/ExoPlayer/issues/4010)).
* Fix ANR issue on Redmi 4X and Redmi Note 4
  ([#4006](https://github.com/google/ExoPlayer/issues/4006)).
* Removed default renderer time offset of 60000000 from internal player. The
  actual renderer timestamp offset can be obtained by listening to
  `BaseRenderer.onStreamChanged`.

### 2.7.1 ###

* Gradle: Replaced 'compile' (deprecated) with 'implementation' and
  'api'. This may lead to build breakage for applications upgrading from
  previous version that rely on indirect dependencies of certain modules. In
  such cases, application developers need to add the missing dependency to
  their gradle file. You can read more about the new dependency configurations
  [here](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations).
* HlsMediaSource: Make HLS periods start at zero instead of the epoch.
  Applications that rely on HLS timelines having a period starting at
  the epoch will need to update their handling of HLS timelines. The program
  date time is still available via the informational
  `Timeline.Window.windowStartTimeMs` field
  ([#3865](https://github.com/google/ExoPlayer/issues/3865),
  [#3888](https://github.com/google/ExoPlayer/issues/3888)).
* Enable seeking in MP4 streams where duration is set incorrectly in the track
  header ([#3926](https://github.com/google/ExoPlayer/issues/3926)).
* Video: Force rendering a frame periodically in `MediaCodecVideoRenderer` and
  `LibvpxVideoRenderer`, even if it is late.

### 2.7.0 ###

* Player interface:
  * Add optional parameter to `stop` to reset the player when stopping.
  * Add a reason to `EventListener.onTimelineChanged` to distinguish between
    initial preparation, reset and dynamic updates.
  * Add `Player.DISCONTINUITY_REASON_AD_INSERTION` to the possible reasons
    reported in `Eventlistener.onPositionDiscontinuity` to distinguish
    transitions to and from ads within one period from transitions between
    periods.
  * Replaced `ExoPlayer.sendMessages` with `ExoPlayer.createMessage` to allow
    more customization of the message. Now supports setting a message delivery
    playback position and/or a delivery handler
    ([#2189](https://github.com/google/ExoPlayer/issues/2189)).
  * Add `Player.VideoComponent`, `Player.TextComponent` and
    `Player.MetadataComponent` interfaces that define optional video, text and
    metadata output functionality. New `getVideoComponent`, `getTextComponent`
    and `getMetadataComponent` methods provide access to this functionality.
* Add `ExoPlayer.setSeekParameters` for controlling how seek operations are
  performed. The `SeekParameters` class contains defaults for exact seeking and
  seeking to the closest sync points before, either side or after specified seek
  positions. `SeekParameters` are not currently supported when playing HLS
  streams.
* DefaultTrackSelector:
  * Replace `DefaultTrackSelector.Parameters` copy methods with a builder.
  * Support disabling of individual text track selection flags.
* Buffering:
  * Allow a back-buffer of media to be retained behind the current playback
    position, for fast backward seeking. The back-buffer can be configured by
    custom `LoadControl` implementations.
  * Add ability for `SequenceableLoader` to re-evaluate its buffer and discard
    buffered media so that it can be re-buffered in a different quality.
  * Allow more flexible loading strategy when playing media containing multiple
    sub-streams, by allowing injection of custom `CompositeSequenceableLoader`
    factories through `DashMediaSource.Factory`, `HlsMediaSource.Factory`,
    `SsMediaSource.Factory`, and `MergingMediaSource`.
  * Play out existing buffer before retrying for progressive live streams
    ([#1606](https://github.com/google/ExoPlayer/issues/1606)).
* UI components:
  * Generalized player and control views to allow them to bind with any
    `Player`, and renamed them to `PlayerView` and `PlayerControlView`
    respectively.
  * Made `PlayerView` automatically apply video rotation when configured to use
    `TextureView` ([#91](https://github.com/google/ExoPlayer/issues/91)).
  * Made `PlayerView` play button behave correctly when the player is ended
    ([#3689](https://github.com/google/ExoPlayer/issues/3689)), and call a
    `PlaybackPreparer` when the player is idle.
* DRM: Optimistically attempt playback of DRM protected content that does not
  declare scheme specific init data in the manifest. If playback of clear
  samples without keys is allowed, delay DRM session error propagation until
  keys are actually needed
  ([#3630](https://github.com/google/ExoPlayer/issues/3630)).
* DASH:
  * Support in-band Emsg events targeting the player with scheme id
    "urn:mpeg:dash:event:2012" and scheme values "1", "2" and "3".
  * Support EventStream elements in DASH manifests.
* HLS:
    * Add opt-in support for chunkless preparation in HLS. This allows an
      HLS source to finish preparation without downloading any chunks, which can
      significantly reduce initial buffering time
      ([#3149](https://github.com/google/ExoPlayer/issues/3149)). More details
      can be found
      [here](https://medium.com/google-exoplayer/faster-hls-preparation-f6611aa15ea6).
    * Fail if unable to sync with the Transport Stream, rather than entering
      stuck in an indefinite buffering state.<commit_msg>Escape :dash: emoji in RELEASENOTES<commit_after># Release notes #

### dev-v2 (not yet released) ###

* Optimize seeking in FMP4 by enabling seeking to the nearest sync sample within
  a fragment. This benefits standalone FMP4 playbacks, DASH and SmoothStreaming.
* Optimize seeking in FMP4.
* Match codecs starting with "mp4a" to different Audio MimeTypes
  ([#3779](https://github.com/google/ExoPlayer/issues/3779)).
* Moved initial bitrate estimate from `AdaptiveTrackSelection` to
  `DefaultBandwidthMeter`.
* Updated default max buffer length in `DefaultLoadControl`.
* UI components:
  * Add support for listening to `AspectRatioFrameLayout`'s aspect ratio update
    ([#3736](https://github.com/google/ExoPlayer/issues/3736)).
  * Add PlayerNotificationManager.
* Downloading: Add `DownloadService`, `DownloadManager` and
  related classes ([#2643](https://github.com/google/ExoPlayer/issues/2643)).
* MediaSources:
  * Allow reusing media sources after they have been released and
    also in parallel to allow adding them multiple times to a concatenation.
    ([#3498](https://github.com/google/ExoPlayer/issues/3498)).
  * Merged `DynamicConcatenatingMediaSource` into `ConcatenatingMediaSource` and
    deprecated `DynamicConcatenatingMediaSource`.
  * Allow clipping of child media sources where the period and window have a
    non-zero offset with `ClippingMediaSource`.
  * Allow adding and removing `MediaSourceEventListener`s to MediaSources after
    they have been created. Listening to events is now supported for all
    media sources including composite sources.
  * Added callbacks to `MediaSourceEventListener` to get notified when media
    periods are created, released and being read from.
* Audio:
  * Factor out `AudioTrack` position tracking from `DefaultAudioSink`.
  * Fix an issue where the playback position would pause just after playback
    begins, and poll the audio timestamp less frequently once it starts
    advancing ([#3841](https://github.com/google/ExoPlayer/issues/3841)).
* Caching:
  * Add release method to Cache interface.
  * Prevent multiple instances of SimpleCache in the same folder.
    Previous instance must be released.
* DRM:
  * Allow multiple listeners for `DefaultDrmSessionManager`.
  * Pass `DrmSessionManager` to `ExoPlayerFactory` instead of `RendererFactory`.
* Fix handling of zero padded strings when parsing Matroska streams
  ([#4010](https://github.com/google/ExoPlayer/issues/4010)).
* Fix ANR issue on Redmi 4X and Redmi Note 4
  ([#4006](https://github.com/google/ExoPlayer/issues/4006)).
* Removed default renderer time offset of 60000000 from internal player. The
  actual renderer timestamp offset can be obtained by listening to
  `BaseRenderer.onStreamChanged`.

### 2.7.1 ###

* Gradle: Replaced 'compile' (deprecated) with 'implementation' and
  'api'. This may lead to build breakage for applications upgrading from
  previous version that rely on indirect dependencies of certain modules. In
  such cases, application developers need to add the missing dependency to
  their gradle file. You can read more about the new dependency configurations
  [here](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations).
* HlsMediaSource: Make HLS periods start at zero instead of the epoch.
  Applications that rely on HLS timelines having a period starting at
  the epoch will need to update their handling of HLS timelines. The program
  date time is still available via the informational
  `Timeline.Window.windowStartTimeMs` field
  ([#3865](https://github.com/google/ExoPlayer/issues/3865),
  [#3888](https://github.com/google/ExoPlayer/issues/3888)).
* Enable seeking in MP4 streams where duration is set incorrectly in the track
  header ([#3926](https://github.com/google/ExoPlayer/issues/3926)).
* Video: Force rendering a frame periodically in `MediaCodecVideoRenderer` and
  `LibvpxVideoRenderer`, even if it is late.

### 2.7.0 ###

* Player interface:
  * Add optional parameter to `stop` to reset the player when stopping.
  * Add a reason to `EventListener.onTimelineChanged` to distinguish between
    initial preparation, reset and dynamic updates.
  * Add `Player.DISCONTINUITY_REASON_AD_INSERTION` to the possible reasons
    reported in `Eventlistener.onPositionDiscontinuity` to distinguish
    transitions to and from ads within one period from transitions between
    periods.
  * Replaced `ExoPlayer.sendMessages` with `ExoPlayer.createMessage` to allow
    more customization of the message. Now supports setting a message delivery
    playback position and/or a delivery handler
    ([#2189](https://github.com/google/ExoPlayer/issues/2189)).
  * Add `Player.VideoComponent`, `Player.TextComponent` and
    `Player.MetadataComponent` interfaces that define optional video, text and
    metadata output functionality. New `getVideoComponent`, `getTextComponent`
    and `getMetadataComponent` methods provide access to this functionality.
* Add `ExoPlayer.setSeekParameters` for controlling how seek operations are
  performed. The `SeekParameters` class contains defaults for exact seeking and
  seeking to the closest sync points before, either side or after specified seek
  positions. `SeekParameters` are not currently supported when playing HLS
  streams.
* DefaultTrackSelector:
  * Replace `DefaultTrackSelector.Parameters` copy methods with a builder.
  * Support disabling of individual text track selection flags.
* Buffering:
  * Allow a back-buffer of media to be retained behind the current playback
    position, for fast backward seeking. The back-buffer can be configured by
    custom `LoadControl` implementations.
  * Add ability for `SequenceableLoader` to re-evaluate its buffer and discard
    buffered media so that it can be re-buffered in a different quality.
  * Allow more flexible loading strategy when playing media containing multiple
    sub-streams, by allowing injection of custom `CompositeSequenceableLoader`
    factories through `DashMediaSource.Factory`, `HlsMediaSource.Factory`,
    `SsMediaSource.Factory`, and `MergingMediaSource`.
  * Play out existing buffer before retrying for progressive live streams
    ([#1606](https://github.com/google/ExoPlayer/issues/1606)).
* UI components:
  * Generalized player and control views to allow them to bind with any
    `Player`, and renamed them to `PlayerView` and `PlayerControlView`
    respectively.
  * Made `PlayerView` automatically apply video rotation when configured to use
    `TextureView` ([#91](https://github.com/google/ExoPlayer/issues/91)).
  * Made `PlayerView` play button behave correctly when the player is ended
    ([#3689](https://github.com/google/ExoPlayer/issues/3689)), and call a
    `PlaybackPreparer` when the player is idle.
* DRM: Optimistically attempt playback of DRM protected content that does not
  declare scheme specific init data in the manifest. If playback of clear
  samples without keys is allowed, delay DRM session error propagation until
  keys are actually needed
  ([#3630](https://github.com/google/ExoPlayer/issues/3630)).
* DASH:
  * Support in-band Emsg events targeting the player with scheme id
    `urn:mpeg:dash:event:2012` and scheme values "1", "2" and "3".
  * Support EventStream elements in DASH manifests.
* HLS:
    * Add opt-in support for chunkless preparation in HLS. This allows an
      HLS source to finish preparation without downloading any chunks, which can
      significantly reduce initial buffering time
      ([#3149](https://github.com/google/ExoPlayer/issues/3149)). More details
      can be found
      [here](https://medium.com/google-exoplayer/faster-hls-preparation-f6611aa15ea6).
    * Fail if unable to sync with the Transport Stream, rather than entering
      stuck in an indefinite buffering state.
{'fraction_non_alphanumeric': 0.07859703020993343, 'fraction_numerical': 0.020865335381464414, 'mean_word_length': 4.488233227959255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 36, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2796303', 'n_tokens_mistral': 4331, 'n_tokens_neox': 4083, 'n_words': 1659}