-
Notifications
You must be signed in to change notification settings - Fork 453
Labels
newproposalA fully fleshed out proposal describing a new feature in syntactic and semantic detailA fully fleshed out proposal describing a new feature in syntactic and semantic detail📽️ MediaElementIssue/PR that has to do with MediaElementIssue/PR that has to do with MediaElement
Description
Feature name
Media Element Foreground Service Options
Link to discussion
Progress tracker
- Android Implementation
- iOS Implementation
- MacCatalyst Implementation
- Windows Implementation
- Tizen Implementation
- Unit Tests
- Samples
- Documentation
Summary
Add support to disable Media Element Android service as a Builder option in MediaElement Options class
Motivation
Allow developers to choose whether they want to have a foreground service and if they want to have notifications. Not all use case scenarios need the service or notifications.
Detailed Design
API:
MediaElementOptions
/// <summary>
/// Set Android Foreground Service for MediaElement on construction
/// </summary>
internal static bool AndroidForeServiceEnabled { get; private set; } = true;
Usage Syntax
Here is an example of `AndroidForegroundServiceEnabled`
XAML:
<toolkit:MediaElement
x:Name="MediaElement"
ShouldAutoPlay="True"
AndroidForegroundServiceEnabled="True"
Source="{x:Static constants:StreamingVideoUrls.BuckBunny}"
/>
Drawbacks
None. If users choose to ignore setting option it will default to current behavior. The current behavior is service is enabled by default.
Alternatives
If we do not add this it will continue to always be on and leave less choice for developers. I have seen many use cases where the current always on service may not be optimal.
Unresolved Questions
No response
Metadata
Metadata
Assignees
Labels
newproposalA fully fleshed out proposal describing a new feature in syntactic and semantic detailA fully fleshed out proposal describing a new feature in syntactic and semantic detail📽️ MediaElementIssue/PR that has to do with MediaElementIssue/PR that has to do with MediaElement