This release includes the following changes since the 1.8.0-alpha01 release:
- Common Library:
- Add support for replacing the player in
ForwardingSimpleBasePlayer.
- Add support for replacing the player in
- ExoPlayer:
- Add support for using the virtual device ID from the
Contextpassed toExoPlayer.Builder. - Enable dynamic scheduling by default in scrubbing mode.
- Avoid unnecessary reload of a source when seeking to the end of an item.
- Use
MediaCodec.BUFFER_FLAG_DECODE_ONLYby default in scrubbing mode. - Throw
IllegalStateExceptionwhenPreloadMediaSourceis played by anExoPlayerwith a playback thread that is different than the preload thread (#2495). - Add
cloneAndMovetoShuffleModewith a default implementation (#2226). - Change default behavior of
Renderer.getMinDurationToProgressUsto return a larger value if no call torenderis required. - Fix bug where internal scheduling delayed last frame when seeking to the end while paused. For now, the bug fix only takes effect if
ExoPlayer.Builder.experimentalSetDynamicSchedulingEnabledis enabled.
- Add support for using the virtual device ID from the
- Transformer:
- Add
CodecDbLitethat enables chipset specific optimizations of video encoding settings. - Add
setEnableCodecDbLiteflag to theDefaultEncoderFactoryto enable CodecDB Lite settings optimization. By default, this flag is set to false.
- Add
- Extractors:
- Add support for seeking in fragmented MP4 with multiple
sidxatoms. This behavior can be enabled using theFLAG_MERGE_FRAGMENTED_SIDXflag onFragmentedMp4Extractor(#9373). - Ignore empty seek tables in FLAC files (including those containing only placeholder seek points), and fall back to binary search seeking if the duration of the file is known (#2327).
- Fix parsing of H.265 SEI units to fully skip unrecognized SEI types (#2456).
- Update
WavExtractorto use the header extension's SubFormat data for the audio format when parsing aWAVE_FORMAT_EXTENSIBLEtype file. - MP4: Add support for
ipcmandfpcmboxes defining raw PCM audio tracks (64-bit floating point PCM is not supported). - MP4: Handle the rotation part of
tkhdtransformation matrices that both rotate and reflect the video. This ensures that reflected videos taken by the iPhone front facing camera display the right way up, but incorrectly reflected in the y-axis (#2012).
- Add support for seeking in fragmented MP4 with multiple
- Audio:
- Add support for all linear PCM sample formats in
ChannelMappingAudioProcessorandTrimmingAudioProcessor. - Add support for audio gaps in
CompositionPlayer. - Remove spurious call to
BaseAudioProcessor#flush()fromBaseAudioProcessor#reset().
- Add support for all linear PCM sample formats in
- Video:
- Improve smooth video frame release at startup when audio samples don't start at exactly the requested position.
- Extend detached surface workaround to "realme" devices (#2059).
- Text:
- Fix a playback stall when a subtitle segment initially fails to load and later loads successfully, followed by several empty subtitle segments (#2517).
- Metadata:
- Added support for retrieving media duration and
TimelinetoMetadataRetrieverand migrated it to an instance-based,AutoCloseableAPI. Use the newBuilderto create an instance for aMediaItem, then callretrieveTrackGroups(),retrieveTimeline(), andretrieveDurationUs()to getListenableFutures for the metadata. The previous static methods are now deprecated (#2462).
- Added support for retrieving media duration and
- Image:
- Limit decoded bitmaps to the display size in
BitmapFactoryImageDecoder, to avoid an app crashing withCanvas: trying to draw too large bitmap.fromPlayerViewwhen trying to display very large (e.g. 50MP) images. - Change the signature of
DefaultRenderersFactory.getImageDecoderFactory()to take aContextparameter. - Align the max bitmap output size used in
CompositionPlayerwith that already used inTransformer(meaningCompositionPlayerdoes not consider the display size when decoding bitmaps, unlikeExoPlayer).
- Limit decoded bitmaps to the display size in
- Muxers:
- Fix a bug where correct sample flags were not set for audio samples in fragmented MP4.
- Session:
- Fix bug where calling
setSessionExtrasfrom the main thread when running the player from a different application thread then the main thread caused anIllegalStateException(#2265). - Don't automatically show a notification if a player is set up with media items without preparing or playing them (#2423#2423). This behavior is configurable via
MediaSessionService.setShowNotificationForIdlePlayer. - Add custom
PlaybackExceptionfor all or selected controllers. - Fix bug where seeking in a live stream on a
MediaControllercan cause anIllegalArgumentException. - For live streams, stop publishing a playback position and the ability to seek in the current item for platform media controllers, to avoid position artefacts in the Android Auto UI (and other controllers using this information from the platform media session) (#1758).
- Fix bug where calling
- Cronet extension:
- Add automatic cookie handling (#5975).
- HLS extension:
- Fix playlist parsing to accept
\f(form feed) in quoted string attribute values (#2420). - Support updating interstitials with the same ID (#2427).
- Fix bug where playlist load errors are sometimes not propagated once a live stream runs out of segments to load (#2401#2401).
- Group subtitle renditions by NAME tag, similar to how audio renditions are grouped already (#1666).
- Fix playlist parsing to accept
- DASH extension:
- RTSP extension:
- Fix
RtspClientto use the location uri as provided when processing an HTTP 302 response (#2398).
- Fix
- Decoder extensions (FFmpeg, VP9, AV1, etc.):
- Fix bug where
DefaultTrackSelector.setAllowInvalidateSelectionsOnRendererCapabilitiesChangehas no effect for audio decoder extensions (#2258).
- Fix bug where
- Cast extension:
- Add support for
setVolume(), andgetVolume()(#2279). - Prevent CastPlayer from entering STATE_BUFFERING while the timeline is empty.
- Add support for
- Test Utilities:
- Add
advance(player).untilPositionAtLeastanduntilMediaItemIndextoTestPlayerRunHelperin order to advance the player until a specified position is reached. In most cases, these methods are more reliable than the existinguntilPositionanduntilStartOfMediaItemmethods. - Move
FakeDownloadertotest-utils-robolectricmodule for reuse in other tests.
- Add