You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/maui/views/MediaElement.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,38 @@ By default, the media that is defined by the `Source` property doesn't immediate
153
153
154
154
Platform provided media playback controls are enabled by default, and can be disabled by setting the `ShouldShowPlaybackControls` property to `false`.
155
155
156
+
### Play remote media with custom HTTP headers
157
+
158
+
A `MediaElement` can send custom HTTP headers when loading remote media. This is useful for authenticated streams that require an `Authorization` header or other custom headers.
> HTTP headers are applied to all HTTP requests made for the media source, including manifest and segment downloads for adaptive streams (HLS/DASH). This feature is supported on Android, iOS, macOS, and Windows. Tizen does not support custom HTTP headers.
184
+
185
+
> [!IMPORTANT]
186
+
> On iOS and macOS, the `AVURLAssetHTTPHeaderFieldsKey` option requires iOS 16.0+ / macOS 13.0+.
187
+
156
188
### Use Rich Media Notifications
157
189
A `MediaElement` can show rich media notifications on Android, iOS, Mac Catalyst, and Windows when media is playing in the background. To enable rich media notifications, the following steps are required:
158
190
1. Enable background video playback by setting the `enableForegroundService` parameter to `true` when calling the `UseMauiCommunityToolkitMediaElement` method in *MauiProgram.cs*. Refer to the **Initializing the package** section above for more information.
@@ -245,6 +277,7 @@ A `MediaElement` can play media by setting its `Source` property to a remote or
0 commit comments