Skip to content

Motion photo poc #2689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 249 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
a119b1f
Merge pull request #19 from androidx/main
ybai001 Jun 5, 2025
209c159
Handle channel count parsing for AC-4 with discrete objects
ybai001 Jun 11, 2025
730cab1
Extend Support for Vobsub subtitles to mp4 files
bennettpeter Jun 16, 2025
1963dd2
Add a test, some docs, some code tweaks, and run the formatter
icbaker Jun 16, 2025
15ddd0f
Switch to NATIVE robolectric graphics mode for consistency with inter…
icbaker Jun 16, 2025
d2eb0ed
Fix various small warnings
MGaetan89 Jun 11, 2025
bb614b8
Format with google-java-format
rohitjoins Jun 18, 2025
773f483
Rename CastPlayer to be RemoteCastPlayer
AquilesCanta Jun 19, 2025
ada2511
Add RemoteCastPlayer.Builder
AquilesCanta Jun 19, 2025
d00f370
Add `skipLeb128` utility method to `ParsableByteArray`
rohitjoins Jun 19, 2025
0b2f694
Merge pull request #2531 from bennettpeter:vobsub-mp4
copybara-github Jun 20, 2025
fdb1738
Remove unused logic
tonihei Jun 20, 2025
0d688be
Use MediaMetadata constants to make Lint happy
shahdDaghash Jun 20, 2025
b690bfe
Set VideoFrameMetadataListener to SequenceImageRenderer's videoSink
shahdDaghash Jun 20, 2025
6daf711
Add support for `setIsContentSpatialized` to `AudioAttributes`
rohitjoins Jun 20, 2025
449542a
Fix release notes link syntax
andrewlewis Jun 23, 2025
4242b0e
Support motion photos without Exif at the start
andrewlewis Jun 23, 2025
26419af
Support toggling remove audio
claincly Jun 23, 2025
311f76d
Check package name validity for incoming Media3 session connections
tonihei Jun 23, 2025
3ca2618
Ensure PlayerSurface views can be reused in reusable containers
tonihei Jun 23, 2025
73c7227
Check if target thread is still alive before sending message
tonihei Jun 24, 2025
3dc8f90
Store CommandButton.iconUri in platform CustomAction extras
tonihei Jun 24, 2025
3d68fa9
Add Codec string for IAMF codec.
a-googler Jun 24, 2025
03d9f89
Update release notes for Media3 1.8.0-beta01 release
shahdDaghash Jun 24, 2025
fa106a1
Fixes in release notes for 1.8.0-beta01
shahdDaghash Jun 24, 2025
2677db3
Bump Media3 version to 1.8.0-beta01
shahdDaghash Jun 24, 2025
be6e438
Avoid splice in HLS chunks if it can be fulfilled by discarding
tonihei Jun 25, 2025
3678158
Minor fixes
rohitjoins Jun 24, 2025
fba3e1f
Parse metadata from fMP4 files
nift4 May 21, 2025
532b88d
Fix setting containerMimeType for sideloaded tracks
rohitjoins Jun 25, 2025
b82db42
Update FragmentedMp4Extractor tests
rohitjoins Jun 25, 2025
929faf1
Merge pull request #2530 from MGaetan89:fix_warnings
copybara-github Jun 25, 2025
1d976ad
Clarify intended meaning of FORMAT_UNSUPPORTED_SUBTYPE
tonihei Jun 25, 2025
b8216cf
RTP H265 aggregation packet support implemented
ArtsemKurantsou May 11, 2025
20a74b8
Minor adjustment based on the review
ArtsemKurantsou May 20, 2025
d84fd51
Minor adjustments
ArtsemKurantsou May 21, 2025
c367d71
Format with google-java-format
microkatz May 22, 2025
3350dc2
Added release note
microkatz May 22, 2025
6e63a1b
Additional validations and unit tests added
ArtsemKurantsou Jun 23, 2025
2ce5276
Unit tests adjustments based on the review
ArtsemKurantsou Jun 24, 2025
1225847
NAL unit header type calculation updated to use NalUnitUtil
ArtsemKurantsou Jun 24, 2025
e04c3af
Formatted code and added additional unit test
microkatz Jun 26, 2025
5053997
[b/417361559] Replace `Toast` with `Snackbar` in demo composition
MGaetan89 Jun 1, 2025
6bfda82
Allow setting `LoadControl` on `ExoPlayerAssetLoader`
claincly Jun 26, 2025
5dc4d94
Merge pull request #2413 from ArtsemKurantsou:rtap-h265-aggregation-p…
copybara-github Jun 26, 2025
4d22aaa
Add back accidentally removed isTv check
tonihei Jun 26, 2025
b16b80f
Fix bug for failing tests
rohitjoins Jun 26, 2025
e4149cb
Add RELEASENOTES entry
rohitjoins Jun 26, 2025
f4bf71a
Add PlayerTransferState
AquilesCanta Jun 27, 2025
048961c
Delay onMediaItemChanged() call until input is queued
ivanbuper Jun 27, 2025
72c087c
Merge pull request #2494 from MGaetan89:fix_417361559
copybara-github Jun 27, 2025
24c129b
Workaround for race condition in `setSamplingGlShaderProgram`
claincly Jun 27, 2025
7af5d71
Media3 Muxer: Introduce SeekableMuxerOutput interface
SheenaChhabra Jun 27, 2025
6c5c5f2
Ensure masking PlayerInfos are not merged into real PlayerInfo updates
tonihei Jun 27, 2025
096b900
Fix StrictMode unsafe intent launch violation
nift4 Apr 11, 2025
802eec6
Formatting and release notes
tonihei Jun 30, 2025
e807fe5
Merge pull request #2330 from nift4:mbrstrict
copybara-github Jun 30, 2025
7c000e6
Ensure trick play tracks are not merged with incompatible main group
tonihei Jun 30, 2025
bb5da94
[ui-compose] Add `ProgressStateWithTickInterval` for position/duration
oceanjules Jun 30, 2025
3271632
Merge pull request #2453 from nift4:fmp4metadata
copybara-github Jun 30, 2025
9b4b008
Add AC-4 decoder capability assessment during track selection
ybai001 Jul 1, 2025
92ca7aa
Add missing request header forwarding in OfflineLicenseHelper
tonihei Jul 1, 2025
d6f79e1
Prevent infinite reloads when `CAN-BLOCK-RELOAD=YES` is not honored
mojsdev Apr 8, 2025
26b09c2
Update code to also work without parts
tonihei Jun 30, 2025
9a0fd5b
Merge pull request #2317 from mojsdev:feature/prevent-infinite-reload…
copybara-github Jul 1, 2025
a53f3c6
Merge pull request #2526 from DolbyLaboratories:dlb/ac4-channel-count…
copybara-github Jul 1, 2025
5a14369
Require flush on seek when `maxNumReorderSamples > 0`
microkatz Jul 1, 2025
b81a140
Allow writing fragmented MP4 to a WritableByteChannel directly
SheenaChhabra Jul 1, 2025
fce36ac
Make `FakeMediaPeriod.seekToUs` more realistic
icbaker Jul 1, 2025
c7ebbb4
Rename `ScrubbingModeParameters.isMediaCodecFlushEnabled`
icbaker Jul 1, 2025
cd2a6ed
Introduce MuxerOutputFactory to provide muxer output target
SheenaChhabra Jul 1, 2025
96f62dd
Replace Muxer#cacheFileProvider with MuxerOutputFactory
SheenaChhabra Jul 1, 2025
6ca4c81
Add missing assertions in `ScrubbingModeParametersTest.defaultValues()`
icbaker Jul 2, 2025
bf8d3ec
Ensure every controller call is eventually finished with new PlayerInfo
tonihei Jul 2, 2025
a3d57fd
Rename CastPlayerTest to RemoteCastPlayerTest
AquilesCanta Jul 2, 2025
46664da
Fix race condition in `MetadataRetriever`
rohitjoins Jul 2, 2025
26a38db
detached_surface_vendors_workaround: extend detached surface workarou…
NoNews May 27, 2025
bc55846
detached_surface_vendors_workaround: fix realme
NoNews May 27, 2025
28629ec
Update to correct capitilization of string + formatting
tonihei Jul 2, 2025
868ff78
Move release note to unreleased changes
shahdDaghash Jul 2, 2025
858a3ff
Add PreCacheHelperTest for HLS and DASH streams
tianyif Jul 2, 2025
8e8e1a9
Fix asset list resolution when joining stream
marcbaechinger Jul 2, 2025
138e9e2
Fix flakiness in `MetadataRetrieverTest`
rohitjoins Jul 2, 2025
4051040
Formal API to allow apps to handle playback resumption themselves
nift4 May 22, 2025
37607c9
Additional cleanup
tonihei Jul 2, 2025
af44f27
Require flush when tunneling.
microkatz Jul 2, 2025
cc6b2bb
Improve error reporting in AudioPositionAdvancingTest
ivanbuper Jul 3, 2025
6a05beb
Don't add `DECODE_ONLY` flag to buffers which are probably last
icbaker Jul 3, 2025
13585aa
Update tests and demo app
tonihei Jul 2, 2025
b8066f9
[PreCacheHelper] Start downloader after loaders for preparing released
tianyif Jul 3, 2025
8481a5b
Support seek handling for AudioProcessors in CompositionPlayer
ivanbuper Jul 3, 2025
d61922a
Remove unused binder methods
tonihei Jul 3, 2025
b573dba
Propagate StreamMetadata to Composition-level AudioProcessors
ivanbuper Jul 3, 2025
da1ca71
Add seek handling for GainProcessor
ivanbuper Jul 3, 2025
471075a
Merge pull request #2477 from NoNews:detached_surface_vendors_workaround
copybara-github Jul 3, 2025
9195ba6
Replace AudioAttributesCompat by AudioAttributes
tonihei Jul 3, 2025
ad314ff
Fix `setComposition()` doesn't update player speed
claincly Jul 3, 2025
371905f
Allow plumbing downloadExecutor for MediaSource
tianyif Jul 3, 2025
0cdac76
Merge pull request #2458 from nift4:resumption
copybara-github Jul 4, 2025
c6e2d6c
Clarify & add some test suppressions for API 23
icbaker Jul 4, 2025
5bafa0b
Fix flaky test in which audio ends too early
claincly Jul 4, 2025
bfd6d38
Set playback duration threshold for advancing the reading period
microkatz Jul 4, 2025
6a8e758
Trust controllers from apps in current UID
nift4 Jun 23, 2025
94f9e62
Formatting and demo app update
tonihei Jul 4, 2025
8f1f586
Add `mute` and `unmute` methods to Player interface
oceanjules Jul 4, 2025
e2673b2
Change how ProgressStateWithTickInterval supplies delay.
oceanjules Jul 4, 2025
5458895
Clean up demo app button preferences
tonihei Jul 4, 2025
f255ec8
[ui-compose] Add `MuteButtonState` that handles Player.volume
oceanjules Jul 4, 2025
903f977
CodecSpecificDataUtil: Build and Parse APV codec string.
a-googler Jul 6, 2025
10d7c65
Handle case where SysUI, AAOS or Auto controller use Media3
tonihei Jul 7, 2025
47e6550
Add method to manually trigger notification update
tonihei Jul 7, 2025
11b5b98
Update compileSdk to 36
a-googler Jul 7, 2025
0909e89
Update release notes for Media3 1.8.0-rc01 release
shahdDaghash Jul 7, 2025
9740f18
Guarantee increasing timestamps if skipping flush during seek
microkatz Jul 7, 2025
c9ce948
Bump Media3 to 1.8.0-rc01
shahdDaghash Jul 7, 2025
a80f551
Move release note to unreleased changes
shahdDaghash Jul 7, 2025
8563939
Merge pull request #2555 from nift4:trustme
copybara-github Jul 8, 2025
3174a48
Don't enforce available commands when connected to legacy session app
marcbaechinger Jul 8, 2025
6030c8d
Add missing final keywords and clarify contract of some methods
tonihei Jul 8, 2025
bb105d3
Add suport for local playback in CastPlayer
AquilesCanta Jul 8, 2025
81c73aa
Refactored Constructor/Factory to Builder pattern
a-googler Jul 9, 2025
25bbb96
Add missing audio Encoding value in Util method
microkatz Jul 9, 2025
6c018db
Use SDK constants for IAMF codec profiles
a-googler Jul 9, 2025
4236af5
Fix 30fps bug in `samplesWithRateDurationAndKeyframeInterval` test util
icbaker Jul 9, 2025
a976752
Add progress update when sending custom commands
marcbaechinger Jul 9, 2025
c14c060
Fix flaky `MetadataRetrieverTest` by draining loopers in `tearDown()`
rohitjoins Jul 9, 2025
a1eb756
Add getter for ShuffleOrder
nift4 Jun 10, 2025
6d0f06c
Deflake mute-unmute MediaController test
oceanjules Jul 9, 2025
70d6221
Use public ad playback state when evaluating the public stream position
marcbaechinger Jul 9, 2025
078ad0b
Do not show Snackbar message for automatically added items
shahdDaghash Jul 9, 2025
74ab7ef
Add release notes
marcbaechinger Jul 9, 2025
a6f1096
Merge pull request #2580 from DolbyLaboratories:dlb/ac4-track-selecti…
copybara-github Jul 9, 2025
1ed7c54
[ui-compose] Round up current position of ProgressStateWithTickInterval
oceanjules Jul 9, 2025
524dd77
Add gap support in CompositionPlayer
shahdDaghash Jul 10, 2025
e441352
Parse HLS interstitial skip attributes
marcbaechinger Jul 10, 2025
63dbb0b
Rollback of https://github.com/androidx/media/commit/81c73aafdc43d217…
a-googler Jul 10, 2025
d77b278
Add test case to ensure correct regexps for interstitial time fields
marcbaechinger Jul 10, 2025
8d37db5
More clearly assert if DefaultAudioSink is used from wrong thread
tonihei Jul 11, 2025
260b3f8
Parse AssetList SKIP-CONTROL JSON object
marcbaechinger Jul 11, 2025
af6fa9e
Merge pull request #2522 from nift4:getshuffle
copybara-github Jul 11, 2025
8bbdd04
[ui-compose] Add ProgressStateWithTickCount to get position/duration
oceanjules Jul 11, 2025
578ec5b
Ensure ConcatenatingMediaSource2Test uses FakeClock for delays
tonihei Jul 11, 2025
eb648b1
[ui-compose] Refactor ProgressStateWithTickInterval
oceanjules Jul 11, 2025
9df933f
Rollback of https://github.com/androidx/media/commit/524dd776a4c57f44…
a-googler Jul 11, 2025
b4f348a
Upgrade to jsyn v17.2.0
nift4 Jun 30, 2025
9459cd4
Merge pull request #2572 from nift4:jsyn
copybara-github Jul 14, 2025
27b0743
Fix ambiguous nullness declaration to fix checkerframework warning
tonihei Jul 14, 2025
ecb80bb
Add TrackSelectionParameters.selectTextByDefault
tonihei Jul 14, 2025
c490a9c
Add TrackSelectionParameters.preferredVideo/Audio/TextLabels
tonihei Jul 15, 2025
f894cd5
Clean up some preload timeout logic values in ImaAdsLoader
tonihei Jul 15, 2025
dd0afef
Add StuckPlayerException
tonihei Jul 15, 2025
bf46c0e
Fix duration clipping when updating placeholder period != first
tonihei Jul 15, 2025
cd45020
Fix HDR sequence being accidentally tonemapped to SDR
shahdDaghash Jul 15, 2025
5dae5b9
Make non-fatal replication of library errors the default
marcbaechinger Jul 15, 2025
dd4d293
Fix bug in SimpleBasePlayer logic for period offsets
tonihei Jul 16, 2025
ded7742
[HLS] Do not try to seek inside buffer when no chunks are in the buffer
tianyif Jul 16, 2025
ab3b23b
Refactor to have a single ad data holder for started sources
marcbaechinger Jul 16, 2025
823f77e
Make mime type optional in DefaultMediaItemConverter
AquilesCanta Jul 17, 2025
c4dd7e6
Prepare target player if source player was not idle at transfer
AquilesCanta Jul 17, 2025
c389d3e
Enable remote to local transfers by default
AquilesCanta Jul 17, 2025
5e0dc3e
Add more test cases for clipped start position
shahdDaghash Jul 17, 2025
3f03852
Avoid calling audioTrack.play() on stopped AudioTrack
tonihei Jul 17, 2025
8c2593a
Rollback of https://github.com/androidx/media/commit/9df933f07653d1fc…
shahdDaghash Jul 17, 2025
7cdd4ea
Add max time diff setting for auto-advancing FakeClock
tonihei Jul 17, 2025
3e21911
Provide context to onForegroundServiceStartNotAllowedException
nift4 Jul 17, 2025
bcd5854
Add relase notes
marcbaechinger Jul 18, 2025
9ce1603
Frame extractor: support custom GlObjectsProvider
ychaparov Jul 18, 2025
7db91f8
Remove the inexistant module
MGaetan89 Jul 19, 2025
2345eab
Rollback of https://github.com/androidx/media/commit/311f76d92735a917…
tonihei Jul 21, 2025
3e8377c
Add `AnalyticsListener.onDroppedSeeksWhileScrubbing`
icbaker Jul 21, 2025
9c5e046
Merge pull request #2633 from MGaetan89:remove-httpengine-datasource
copybara-github Jul 21, 2025
eeae96c
Catch SecurityException when binding to Service
tonihei Jul 21, 2025
2fb60c8
Ensure RobolectricUtil.runLooperUntil doesn't advance time too far
tonihei Jul 21, 2025
82fbbf2
Tighten FLAC header detection
icbaker Jul 21, 2025
5bb86b9
Deprecate old API and delegate to deprecated method
marcbaechinger Jul 21, 2025
9dad660
Fix a `ParsableByteArray` limit bug in `FlacFrameReader`
icbaker Jul 21, 2025
176e67a
Add multiple effects to the demo app in runtime
a-googler Jul 22, 2025
b82be5b
Don't override playback exception when creating the playback state
marcbaechinger Jul 22, 2025
74872d1
Try to officially disconnect controller in more cases
tonihei Jul 22, 2025
c3e8fc5
Fix missing onPositionAdvancing callback after AudioTrack is stopped
tonihei Jul 22, 2025
34f9d1b
Add detection for player stuck in BUFFERING state
tonihei Jul 22, 2025
600db98
Configure AudioProcessingPipeline with the current pendingStartTimeUs
ivanbuper Jul 22, 2025
ec6ac47
Add pre-caching functionality in DefaultPreloadManager
tianyif Jul 22, 2025
8de7ca3
Merge pull request #2625 from nift4:mbrcontext
copybara-github Jul 23, 2025
3d4d59e
Fix duplicated word in release notes
MGaetan89 May 15, 2025
ca47e72
Fix clipping + speed adjust
claincly Jul 23, 2025
4771273
Fix race condition in player states test
ychaparov Jul 23, 2025
0b17a67
Use pre-caching feature of DefaultPreloadManager in demo-shortform app
tianyif Jul 23, 2025
6c74e5c
Unflake MediaControllerListenerTest and MediaBrowserListenerTest
marcbaechinger Jul 23, 2025
c2a09a0
Merge pull request #2425 from MGaetan89:fix_release_notes
copybara-github Jul 23, 2025
33dfe7d
Add CompositionPlayer API to use a custom AudioMixer.Factory
ychaparov Jul 23, 2025
03e9a6b
Fix typo
claincly Jul 23, 2025
b3d9138
Add DefaultLoadControl parameters specific to local playback
tonihei Jul 24, 2025
b7fb7a3
Use MediaMetadata media type to infer Cast's media type
AquilesCanta Jul 24, 2025
78a16fb
Add support for media_type in session demo app
AquilesCanta Jul 24, 2025
abb6db1
Handle non-integer `Format.id` when setting `KEY_TRACK_ID`
rohitjoins Jul 24, 2025
efc0f25
Bump version number for 1.8.0-rc02
icbaker Jul 24, 2025
abfd494
Reset live configuration to media item instance when source is released
marcbaechinger Jul 24, 2025
3e2ee25
Log the presentation time when throwing an error
claincly Jul 24, 2025
619890e
Update release notes for 1.8.0-rc02 release
icbaker Jul 24, 2025
13d08fb
[BasePreloadManager] Remove the checkState in MediaSourceHolderMap.put
tianyif Jul 24, 2025
bd2b1a4
Set frame rate on the edited media items in Composition demo
shahdDaghash Jul 24, 2025
4ced085
Fix typo in 1.8.0-rc02 release notes
icbaker Jul 25, 2025
7231528
Rollback of https://github.com/androidx/media/commit/2345eabfdcd20101…
tonihei Jul 25, 2025
27624bd
Use audio sample rate as timescale
SheenaChhabra Jul 25, 2025
df6b9a0
Move audio edit list with `InAppMp4Muxer` test to Robolectric
SheenaChhabra Jul 25, 2025
50df607
Allow `setComposition()` to start from any position
claincly Jul 25, 2025
d011c27
Move utility method to CompositionPlayer
claincly Jul 25, 2025
fa48895
Fix Gradle-only failure in `MkvPlaybackTest` with muxed subrip subs
icbaker Jul 25, 2025
c3a235e
Implement generic untilPendingCommandsAreFullyHandled()
ivanbuper Jul 25, 2025
b2d49be
Rollback of https://github.com/androidx/media/commit/c3a235e0bb8a618c…
a-googler Jul 25, 2025
7a473e8
Rollback of https://github.com/androidx/media/commit/d011c27a243906c1…
a-googler Jul 25, 2025
8faee05
Rollback of https://github.com/androidx/media/commit/50df607cbf6b21cc…
a-googler Jul 26, 2025
5c1db9d
Rollback of https://github.com/androidx/media/commit/b2d49bed6ba98126…
claincly Jul 28, 2025
0b86223
Fix issue where ProgressStateJob enters an infinite loop
tonihei Jul 28, 2025
b10fb4a
Update stuck buffering detection to look at buffer in other periods
tonihei Jul 28, 2025
5ec7152
Mp4Extractor : Validate CSD of IAMF.
a-googler Jul 28, 2025
46e9c7e
Add volume control ID to PlaybackInfoCompat and use it for conversions
marcbaechinger Jul 28, 2025
f99b4e7
Set channel mask when available
rohitjoins Jul 28, 2025
6c40889
Rollback of https://github.com/androidx/media/commit/8faee05d2564f2c9…
claincly Jul 28, 2025
c059fce
Add some fuzziness to Mp3Extractor's ID3 tag searching
icbaker Jul 29, 2025
c49b774
Unignore test for already fixed bug
tonihei Jul 29, 2025
1d40f4d
Make some tests less prone to flakiness
tonihei Jul 29, 2025
1700c70
Update release notes for 1.8.0 stable
SheenaChhabra Jul 29, 2025
04f7564
Add listener bookkeeping to ForwardingPlayer
nift4 Jul 27, 2025
230c032
Small clean-ups in preparation for internal review
icbaker Jul 29, 2025
82d3b1a
Add release note
icbaker Jul 29, 2025
e33f6d4
Filter action up events only after letting the callback handle them
marcbaechinger Jul 29, 2025
c08d8ab
Make sure VideoFrameMetadataListener is always set
claincly Jul 29, 2025
9574ffa
Version bump to media3:1.8.0
SheenaChhabra Jul 29, 2025
a567b63
Fix internal review comments
icbaker Jul 30, 2025
55eaa00
Merge pull request #2676 from nift4:fwplistener
copybara-github Jul 30, 2025
ae57e5f
Update minSdk to 23
tonihei Jul 30, 2025
4836cea
Refactor ExoPlayer AudioFocus tests into PlayerAudioFocusContractTest
ivanbuper Jul 30, 2025
01eca16
Add ControllerInfo.isPackageNameVerfied
tonihei Jul 30, 2025
7905001
Clean up code for minSdk 23
tonihei Jul 30, 2025
ec8589e
Update audio renderer isReady logic
tonihei Jul 30, 2025
309a9f5
Optimize MP4 metadata retrieval memory usage
rohitjoins Jul 30, 2025
488fd51
Fix audio being disabled when `forceVideoTrack` is set to true
shahdDaghash Jul 30, 2025
af21d3b
Ensure setting an empty playlist moves to STATE_ENDED
tonihei Jul 30, 2025
7f5e4c4
Fix method visibility
tonihei Jul 30, 2025
3fad16d
Fixes CanvasOverlay Bitmap Recycle Bug
snow2405 Jul 30, 2025
d9d5a3e
Adds basic Lottie support to the Composition Demo.
snow2405 Jul 30, 2025
9c12c07
Don't call getCurrentTimeline when access is not granted
marcbaechinger Jul 31, 2025
5325a3d
Forecast whether a frame will be dropped after effects
ychaparov Jul 31, 2025
651c5e0
Make DownloadService ready for API 35
marcbaechinger Jul 31, 2025
7b73533
Make test less flaky
claincly Jul 31, 2025
8e67590
Use trackGroupIndex instead of assuming the index
shahdDaghash Jul 31, 2025
ed06e58
MotionPhoto POC
SheenaChhabra Jul 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ body:
options:
- Media3 main branch
- Media3 pre-release (alpha, beta or RC not in this list)
- Media3 1.8.0
- Media3 1.7.1 (same as 1.6.1)
- Media3 1.7.0 (do not use)
- Media3 1.6.1
Expand Down
450 changes: 318 additions & 132 deletions RELEASENOTES.md

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ package androidx.media3.common {
}

public final class AudioAttributes {
method public androidx.media3.common.AudioAttributes.AudioAttributesV21 getAudioAttributesV21();
method public static androidx.media3.common.AudioAttributes fromPlatformAudioAttributes(android.media.AudioAttributes);
method @Deprecated public androidx.media3.common.AudioAttributes.AudioAttributesV21 getAudioAttributesV21();
method public android.media.AudioAttributes getPlatformAudioAttributes();
field public static final androidx.media3.common.AudioAttributes DEFAULT;
field @androidx.media3.common.C.AudioAllowedCapturePolicy public final int allowedCapturePolicy;
field @androidx.media3.common.C.AudioContentType public final int contentType;
Expand All @@ -35,8 +37,8 @@ package androidx.media3.common {
field @androidx.media3.common.C.AudioUsage public final int usage;
}

public static final class AudioAttributes.AudioAttributesV21 {
field public final android.media.AudioAttributes audioAttributes;
@Deprecated public static final class AudioAttributes.AudioAttributesV21 {
field @Deprecated public final android.media.AudioAttributes audioAttributes;
}

public static final class AudioAttributes.Builder {
Expand Down
8 changes: 4 additions & 4 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
project.ext {
releaseVersion = '1.8.0-alpha01'
releaseVersionCode = 1_008_000_0_01
minSdkVersion = 21
releaseVersion = '1.8.0'
releaseVersionCode = 1_008_000_3_00
minSdkVersion = 23
// See https://developer.android.com/training/cars/media/automotive-os#automotive-module
automotiveMinSdkVersion = 28
appTargetSdkVersion = 34
// Upgrading this requires [Internal ref: b/193254928] to be fixed, or some
// additional robolectric config.
targetSdkVersion = 31
compileSdkVersion = 35
compileSdkVersion = 36
dexmakerVersion = '2.28.3'
// Use the same JUnit version as the Android repo:
// https://cs.android.com/android/platform/superproject/main/+/main:external/junit/METADATA
Expand Down
2 changes: 0 additions & 2 deletions core_settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ include modulePrefix + 'lib-datasource'
project(modulePrefix + 'lib-datasource').projectDir = new File(rootDir, 'libraries/datasource')
include modulePrefix + 'lib-datasource-cronet'
project(modulePrefix + 'lib-datasource-cronet').projectDir = new File(rootDir, 'libraries/datasource_cronet')
include modulePrefix + 'lib-datasource-httpengine'
project(modulePrefix + 'lib-datasource-httpengine').projectDir = new File(rootDir, 'libraries/datasource_httpengine')
include modulePrefix + 'lib-datasource-rtmp'
project(modulePrefix + 'lib-datasource-rtmp').projectDir = new File(rootDir, 'libraries/datasource_rtmp')
include modulePrefix + 'lib-datasource-okhttp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Text
Expand All @@ -47,6 +47,7 @@ import androidx.media3.common.Player
import androidx.media3.demo.compose.buttons.ExtraControls
import androidx.media3.demo.compose.buttons.MinimalControls
import androidx.media3.demo.compose.data.videos
import androidx.media3.demo.compose.indicator.HorizontalLinearProgressIndicator
import androidx.media3.demo.compose.layout.CONTENT_SCALES
import androidx.media3.demo.compose.layout.noRippleClickable
import androidx.media3.exoplayer.ExoPlayer
Expand Down Expand Up @@ -133,14 +134,11 @@ private fun MediaPlayerScreen(player: Player, modifier: Modifier = Modifier) {

if (showControls) {
// drawn on top of a potential shutter
MinimalControls(player, scaledModifier.fillMaxWidth().align(Alignment.Center))
ExtraControls(
player,
Modifier.fillMaxWidth()
.align(Alignment.BottomCenter)
.background(Color.Gray.copy(alpha = 0.4f))
.navigationBarsPadding(),
)
MinimalControls(player, Modifier.fillMaxWidth().align(Alignment.Center))
Column(Modifier.fillMaxWidth().align(Alignment.BottomCenter)) {
HorizontalLinearProgressIndicator(player, Modifier.fillMaxWidth())
ExtraControls(player, Modifier.fillMaxWidth().background(Color.Gray.copy(alpha = 0.4f)))
}
}

Button(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ package androidx.media3.demo.compose.buttons

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.media3.common.Player
import androidx.media3.demo.compose.indicator.TextProgressIndicator

@Composable
internal fun ExtraControls(player: Player, modifier: Modifier = Modifier) {
Expand All @@ -30,8 +32,11 @@ internal fun ExtraControls(player: Player, modifier: Modifier = Modifier) {
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically,
) {
TextProgressIndicator(player, Modifier.align(Alignment.CenterVertically))
Spacer(Modifier.weight(1f))
PlaybackSpeedPopUpButton(player)
ShuffleButton(player)
RepeatButton(player)
MuteButton(player)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.media3.demo.compose.buttons

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.VolumeOff
import androidx.compose.material.icons.automirrored.filled.VolumeUp
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.media3.common.Player
import androidx.media3.demo.compose.R
import androidx.media3.ui.compose.state.rememberMuteButtonState

@Composable
internal fun MuteButton(player: Player, modifier: Modifier = Modifier) {
val state = rememberMuteButtonState(player)
val icon =
if (state.showMuted) Icons.AutoMirrored.Default.VolumeOff
else Icons.AutoMirrored.Default.VolumeUp
val contentDescription =
if (state.showMuted) stringResource(R.string.mute_button_shown_muted)
else stringResource(R.string.mute_button_shown_unmuted)
IconButton(onClick = state::onClick, modifier = modifier, enabled = state.isEnabled) {
Icon(icon, contentDescription = contentDescription, modifier = modifier)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/*
* Copyright 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.media3.demo.compose.indicator

import androidx.annotation.IntRange
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.times
import androidx.media3.common.Player
import androidx.media3.ui.compose.state.rememberProgressStateWithTickCount

@Composable
fun HorizontalLinearProgressIndicator(
player: Player,
modifier: Modifier = Modifier,
@IntRange(from = 0) totalTickCount: Int = 0,
) {
var ticks by remember(totalTickCount) { mutableIntStateOf(totalTickCount) }
val progressState = rememberProgressStateWithTickCount(player, ticks)
HorizontalLinearProgressIndicator(
modifier,
currentPositionProgress = { progressState.currentPositionProgress },
bufferedPositionProgress = { progressState.bufferedPositionProgress },
onLayoutWidthChanged = { widthPx -> if (totalTickCount == 0) ticks = widthPx },
)
}

@Composable
private fun HorizontalLinearProgressIndicator(
modifier: Modifier = Modifier,
currentPositionProgress: () -> Float,
bufferedPositionProgress: () -> Float = currentPositionProgress,
onLayoutWidthChanged: (Int) -> Unit = {},
playedColor: Color = Color.Red,
bufferedColor: Color = Color.LightGray,
unplayedColor: Color = Color.DarkGray,
scrubberColor: Color = playedColor,
scrubberShape: Shape = CircleShape,
rectHeightDp: Dp = 10.dp,
) {
// the following X-coordinates are relative to the size of the Canvas, not the whole HLPI
var positionX by remember { mutableFloatStateOf(0f) }
var scrubberX by remember { mutableFloatStateOf(0f) }
var bufferX by remember { mutableFloatStateOf(0f) }
var barSize by remember { mutableStateOf(Size(0f, 0f)) }
val rectHeightPx = with(LocalDensity.current) { rectHeightDp.roundToPx() }
val scrubberBoxSizeDp = 2 * rectHeightDp
val scrubberBoxSizePx = 2 * rectHeightPx
val canvasTopDownPaddingDp = 5.dp
val canvasTopDownPaddingPx = with(LocalDensity.current) { canvasTopDownPaddingDp.roundToPx() }
val canvasLeftRightPaddingDp = scrubberBoxSizeDp / 2 + canvasTopDownPaddingDp
val canvasLeftRightPaddingPx = scrubberBoxSizePx / 2 + canvasTopDownPaddingPx

Box(
contentAlignment = Alignment.CenterStart,
modifier =
modifier
.background(Color.Gray.copy(alpha = 0.4f))
.height(scrubberBoxSizeDp + 2 * canvasTopDownPaddingDp),
) {
Canvas(
Modifier.padding(
start = canvasLeftRightPaddingDp,
top = canvasTopDownPaddingDp,
bottom = canvasTopDownPaddingDp,
end = canvasLeftRightPaddingDp,
)
.fillMaxWidth()
.height(rectHeightDp)
.onSizeChanged { (w, _) -> onLayoutWidthChanged(w) }
) {
positionX = (currentPositionProgress() * size.width).coerceAtLeast(0f)
scrubberX = positionX
bufferX = (bufferedPositionProgress() * size.width).coerceAtLeast(0f)
// Canvas.size.height = 0, hence need our own height
barSize = Size(size.width, rectHeightDp.toPx())

drawRect(unplayedColor, size = barSize)
drawRect(bufferedColor, size = barSize.copy(width = bufferX))
drawRect(playedColor, size = barSize.copy(width = positionX))
}

val absoluteThumbX = canvasLeftRightPaddingPx + scrubberX
val scrubberTopLeftX = absoluteThumbX - scrubberBoxSizePx / 2
Box(
Modifier.offset { IntOffset(x = scrubberTopLeftX.toInt(), y = 0) }
.size(scrubberBoxSizeDp)
.background(scrubberColor, scrubberShape)
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package androidx.media3.demo.compose.indicator

import androidx.annotation.IntRange
import androidx.compose.foundation.text.BasicText
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.media3.common.Player
import androidx.media3.common.util.Util.getStringForTime
import androidx.media3.ui.compose.state.ProgressStateWithTickInterval
import androidx.media3.ui.compose.state.rememberProgressStateWithTickInterval

/**
* An example of a progress indicator that represents the [Player's][Player]
* [ProgressStateWithTickInterval] in textual form.
*
* It displays the up-to-date current position and duration of the media at the granularity of the
* provided [timeStepSeconds]. For example, for shorter videos, a 1-second granularity
* (`timeSecondsStep = 1`) might be more appropriate, whereas for a multiple-hour long movie, a
* 1-minute granularity (`timeSecondsStep = 60`) might be enough. Tuning this parameter can help you
* avoid unnecessary recompositions.
*
* @param timeStepSeconds Delta of the media time that constitutes a progress step, in seconds.
*/
@Composable
fun TextProgressIndicator(
player: Player,
modifier: Modifier = Modifier,
@IntRange(from = 0) timeStepSeconds: Int = 1,
) {
val progressState =
rememberProgressStateWithTickInterval(
player,
tickIntervalMs = timeStepSeconds.toLong().times(1000),
)
val current = getStringForTime(progressState.currentPositionMs)
// duration will not change as often as current position
val duration by remember { derivedStateOf { getStringForTime(progressState.durationMs) } }
BasicText("$current - $duration", modifier)
}
4 changes: 4 additions & 0 deletions demos/compose/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,8 @@
<string name="shuffle_button_shuffle_off">Enable shuffle mode</string>
<!-- Accessibility description for a playback speed selection button. The button is shown with the current playback speed. If a user clicks it, the list of possible playback speeds will be shown. [CHAR_LIMIT=NONE] -->
<string name="playback_speed">Speed</string>
<!-- Accessibility description for a mute button in the unmuted state. If a user clicks it, the player's volume will be changed to zero. [CHAR_LIMIT=NONE] -->
<string name="mute_button_shown_unmuted">Mute</string>
<!-- Accessibility description for a mute button in the muted state. If a user clicks it, the player's volume will be changed to whatever it was previously before muting. [CHAR_LIMIT=NONE] -->
<string name="mute_button_shown_muted">Unmute</string>
</resources>
4 changes: 2 additions & 2 deletions demos/composition/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ android {

lintOptions {
// This demo app isn't indexed and doesn't have translations.
disable 'GoogleAppIndexingWarning','MissingTranslation'
disable 'GoogleAppIndexingWarning', 'MissingTranslation'
}

buildFeatures {
Expand All @@ -69,7 +69,6 @@ dependencies {
implementation project(modulePrefix + 'lib-ui')
implementation project(modulePrefix + 'lib-ui-compose')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation 'androidx.lifecycle:lifecycle-livedata:' + androidxLifecycleVersion
implementation 'androidx.lifecycle:lifecycle-viewmodel:' + androidxLifecycleVersion
implementation 'androidx.activity:activity-compose:1.9.0'
implementation platform('androidx.compose:compose-bom:2024.12.01')
Expand All @@ -80,6 +79,7 @@ dependencies {
implementation 'androidx.compose.material3.adaptive:adaptive'
implementation 'androidx.compose.material3.adaptive:adaptive-layout'
implementation 'androidx.compose.material3.adaptive:adaptive-navigation'
implementation 'com.airbnb.android:lottie:6.6.0'
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
Expand Down
Loading