-
Notifications
You must be signed in to change notification settings - Fork 401
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
Update Media Element to use Media3 #2076
Open
ne0rrmatrix
wants to merge
95
commits into
CommunityToolkit:main
Choose a base branch
from
ne0rrmatrix:Media3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 88 commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
ed2aebc
Migrate to AndroidX Media3 library
ne0rrmatrix 712a022
Update AndroidX packages and refactor MediaManager
ne0rrmatrix d097e97
Refactor MediaManager and update to AndroidX Media3
ne0rrmatrix 524c3e0
Update AndroidX packages and enhance MediaManager
ne0rrmatrix 13e8144
Refactor MediaManager and update package references
ne0rrmatrix 643f7f4
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 86fbb29
Add TODO and note with request for help solving async issue with seek…
ne0rrmatrix 81bf905
Merge branch 'main' into Media3
ne0rrmatrix 92fdcd9
Simplify player state handling and seeking operations
ne0rrmatrix 02a7520
Merge branch 'main' into Media3
ne0rrmatrix 294f6d2
Update .NET version, playback states, and error handling
ne0rrmatrix 7139e1a
Refactor player control and resource disposal
ne0rrmatrix 9992bcf
Merge branch 'main' into Media3
ne0rrmatrix 5743aff
Merge branch 'main' into Media3
ne0rrmatrix 5b39d8a
Merge branch 'main' into Media3
ne0rrmatrix c967d6b
Merge branch 'main' into Media3
ne0rrmatrix 56ce4ba
Update changes from media2 for playerView poster to media3 version th…
ne0rrmatrix e306d86
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 9d2aca9
Add `SafeFireAndForget`
brminnick 391422e
Merge branch 'main' into Media3
ne0rrmatrix a9803df
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 25d1a83
Update nuget version and apply fixes for changes
ne0rrmatrix c091d74
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix 3491641
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix a077367
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix eb760b9
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 6f7227f
Merge branch 'main' into Media3
ne0rrmatrix 86d0339
Merge branch 'main' into Media3
ne0rrmatrix 0a833d9
Merge branch 'main' into Media3
brminnick e966505
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 8f42eea
Merge branch 'main' into Media3
ne0rrmatrix e772a54
Update .NET, Maui, and AndroidX versions; refactor MediaManager
ne0rrmatrix 7da3e66
Refactor media controls to use modern Android APIs
ne0rrmatrix f2d7c66
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix 2ce91d9
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 4ce68b2
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 817f74b
Refactor notification handling with INotificationService
ne0rrmatrix 23d9b1b
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix 1786dd0
Merge branch 'main' into Media3
ne0rrmatrix 041a06c
- Fix dependancy chain for Media Element after switching from local t…
ne0rrmatrix 34537a0
Remove duplicate `PackageReference`
ne0rrmatrix 8028abe
Update media session to use random id.
ne0rrmatrix 58c5b70
Merge branch 'main' into Media3
ne0rrmatrix d31e5b9
- Fix buttons receiver log error.
ne0rrmatrix d27bdb9
removed commented code that is no longer relevent
ne0rrmatrix 3410f00
Remove unused method
ne0rrmatrix f3b372e
Merge branch 'main' into Media3
ne0rrmatrix 2f51474
Update src/CommunityToolkit.Maui.MediaElement/Views/MediaManager.andr…
ne0rrmatrix 4d97679
Merge branch 'main' into Media3
ne0rrmatrix 419329e
- Remove `INotiifcation` Interface
ne0rrmatrix f8e82cd
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix 1ef0f9b
- Fix issue with variable name mismatch
ne0rrmatrix 457d31c
- Update all classes to use a single type of check for API level on A…
ne0rrmatrix 4f4d2ad
- Fix one more API check
ne0rrmatrix c29f3f5
- Remove suppression no longer required
ne0rrmatrix c72e80d
Merge branch 'main' into Media3
ne0rrmatrix f0be701
Add comment about `p0` event args parameter
ne0rrmatrix 2347e4f
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix 6ead14e
Merge branch 'CommunityToolkit:main' into Media3
ne0rrmatrix 251be66
Refactor MediaManager to use AndroidX libraries
ne0rrmatrix 627c102
Refactor Code
brminnick 853705c
Delete CommunityToolkit.Maui.MediaElement.sln
brminnick 6c7d86b
Improve resource management and notifications
ne0rrmatrix f1b6e13
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix b9699ff
Merge branch 'main' into Media3
ne0rrmatrix 9070895
Refactor media handling and notification updates
ne0rrmatrix 24b2086
Migrate to AndroidX Media3 and enhance media controls
ne0rrmatrix c7616e0
Remove fonts added for testing
ne0rrmatrix e858911
Merge branch 'main' into Media3
ne0rrmatrix b245c92
Refactored media service to inherit player. Behavior previously was M…
ne0rrmatrix 785df3f
Refactor MediaElement and MediaControlsService
ne0rrmatrix 12332c3
remove unused variable. Added null checks.
ne0rrmatrix c3bbe8e
Enhance null safety and refactor notification updates
ne0rrmatrix 11bd2d4
Refactor notification ID handling in MediaControlsService
ne0rrmatrix bb55fe8
Merge branch 'main' into Media3
ne0rrmatrix f97ebd0
Merge branch 'main' into Media3
ne0rrmatrix 76ecf47
Update service behavior. If notifications are disabled do not start s…
ne0rrmatrix 75ffa0d
Merge branch 'Media3' of https://github.com/ne0rrmatrix/MauiOld into …
ne0rrmatrix 3b0eec4
Remove unused using directives in MediaControlsService
ne0rrmatrix 005eb79
Updated to address null intent. Added rebind override to add notifica…
ne0rrmatrix 6b8c952
Update nugets for media 3
ne0rrmatrix ab9cb9d
Merge branch 'main' into Media3
ne0rrmatrix 1d4dbf0
Merge branch 'main' into Media3
ne0rrmatrix ad2edac
Merge branch 'main' into Media3
ne0rrmatrix 31417c6
Merge branch 'main' into Media3
ne0rrmatrix 2b430f2
Merge branch 'main' into Media3
ne0rrmatrix 46bd46b
Merge branch 'main' into Media3
ne0rrmatrix 1f2a35c
Merge branch 'main' into Media3
ne0rrmatrix b2fbdad
Merge branch 'main' into Media3
ne0rrmatrix ceae648
Make Bound Service immutable
ne0rrmatrix 0d0e241
Update bound service connection to not use private set.
ne0rrmatrix 2825a67
Merge branch 'main' into Media3
ne0rrmatrix d98555f
Merge branch 'main' into Media3
ne0rrmatrix c74f4b1
Merge branch 'main' into Media3
ne0rrmatrix 4e24338
Merge branch 'main' into Media3
ne0rrmatrix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/CommunityToolkit.Maui.MediaElement/AppBuilderExtensions.shared.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/CommunityToolkit.Maui.MediaElement/Handlers/MediaElementHandler.android.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/CommunityToolkit.Maui.MediaElement/Primitives/PlayerViewChangedEventArgs.android.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using AndroidX.Media3.UI; | ||
|
||
namespace CommunityToolkit.Maui.Primitives; | ||
|
||
public sealed class PlayerViewChangedEventArgs(PlayerView playerView) : EventArgs | ||
{ | ||
public PlayerView UpdatedPlayerView { get; } = playerView; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/CommunityToolkit.Maui.MediaElement/Services/BoundServiceBinder.android.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Android.OS; | ||
using CommunityToolkit.Maui.Media.Services; | ||
|
||
namespace CommunityToolkit.Maui.Services; | ||
|
||
class BoundServiceBinder(MediaControlsService mediaControlsService) : Binder | ||
{ | ||
public MediaControlsService? Service { get; private set; } = mediaControlsService; | ||
pictos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/CommunityToolkit.Maui.MediaElement/Services/BoundServiceConnection.android.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Android.Content; | ||
using Android.OS; | ||
using CommunityToolkit.Maui.Core.Views; | ||
|
||
namespace CommunityToolkit.Maui.Services; | ||
class BoundServiceConnection(MediaManager mediaManager) : Java.Lang.Object, IServiceConnection | ||
{ | ||
public MediaManager? Activity { get; private set; } = mediaManager; | ||
|
||
public bool IsConnected { get; private set; } = false; | ||
|
||
public BoundServiceBinder? Binder { get; private set; } = null; | ||
|
||
void IServiceConnection.OnServiceConnected(ComponentName? name, IBinder? service) | ||
{ | ||
Binder = service as BoundServiceBinder; | ||
IsConnected = Binder is not null; | ||
Activity?.UpdatePlayer(); | ||
} | ||
|
||
void IServiceConnection.OnServiceDisconnected(ComponentName? name) | ||
{ | ||
IsConnected = false; | ||
Binder = null; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to a separate PR since it not related to
CommunityToolkit.Maui.MediaElement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try reverting the changes. It was only modified so that transient dependancies did not clash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just looked at the code and was unable to find the referenced code. It has been removed. Not sure when. Can you try updating your local source.