Skip to content

chore: update MediaElement docs to include custom http headers feature#639

Draft
Kaaybi wants to merge 2 commits intoMicrosoftDocs:mainfrom
Kaaybi:mediaelement-custom-http-headers
Draft

chore: update MediaElement docs to include custom http headers feature#639
Kaaybi wants to merge 2 commits intoMicrosoftDocs:mainfrom
Kaaybi:mediaelement-custom-http-headers

Conversation

@Kaaybi
Copy link

@Kaaybi Kaaybi commented Mar 20, 2026

Adds documentation on MediaElement new feature custom http headers

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 493e3c0:

✅ Validation status: passed

File Status Preview URL Details
docs/maui/views/MediaElement.md ✅Succeeded View

For more details, please refer to the build report.

@Kaaybi
Copy link
Author

Kaaybi commented Mar 20, 2026

@microsoft-github-policy-service agree

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the .NET MAUI Community Toolkit MediaElement documentation to describe the new capability to send custom HTTP headers when playing remote media.

Changes:

  • Added a new “Play remote media with custom HTTP headers” scenario section, including code samples.
  • Documented the MediaSource.FromUri(Uri, IDictionary<string, string>) overload for passing HTTP headers.
  • Expanded UriMediaSource description to mention the HttpHeaders property and its behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments, please double-check if this is all in order, exists and make sure the code is clear. Ideally ready to copy and paste for as much as possible.

The note about iOS and macOS is not super clear to me as AVURLAssetHTTPHeaderFieldsKey is never mentioned but I do need to watch out for it...?

@learn-build-service-prod
Copy link

Learn Build status updates of commit 43391ee:

✅ Validation status: passed

File Status Preview URL Details
docs/maui/views/MediaElement.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@Kaaybi
Copy link
Author

Kaaybi commented Mar 20, 2026

Hi Gerald, thanks for reading through 🙏

See comments, please double-check if this is all in order, exists and make sure the code is clear. Ideally ready to copy and paste for as much as possible.

Fixed!

The note about iOS and macOS is not super clear to me as AVURLAssetHTTPHeaderFieldsKey is never mentioned but I do need to watch out for it...?

It was indeed ambiguous, I rephrased the sentence, is it clear enough now?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 278 to 281
- `FromFile`, returns a `FileMediaSource` instance from a `string` argument.
- `FromUri`, returns a `UriMediaSource` instance from a `Uri` argument.
- `FromUri(Uri, IDictionary<string, string>)`, returns a `UriMediaSource` instance from a `Uri` argument with custom HTTP headers applied to all requests.
- `FromResource`, returns a `ResourceMediaSource` instance from a `string` argument.
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MediaSource static-method list mixes a bare method name (FromUri) with a full signature for the overload (FromUri(Uri, IDictionary<string, string>)). To keep the docs consistent/clear, consider listing both overloads with signatures (e.g., FromUri(Uri) and FromUri(Uri, IDictionary<string,string>)), or list only method names and note that FromUri has an overload accepting headers.

Suggested change
- `FromFile`, returns a `FileMediaSource` instance from a `string` argument.
- `FromUri`, returns a `UriMediaSource` instance from a `Uri` argument.
- `FromUri(Uri, IDictionary<string, string>)`, returns a `UriMediaSource` instance from a `Uri` argument with custom HTTP headers applied to all requests.
- `FromResource`, returns a `ResourceMediaSource` instance from a `string` argument.
- `FromFile(string)`, returns a `FileMediaSource` instance from a `string` argument.
- `FromUri(Uri)`, returns a `UriMediaSource` instance from a `Uri` argument.
- `FromUri(Uri, IDictionary<string, string>)`, returns a `UriMediaSource` instance from a `Uri` argument with custom HTTP headers applied to all requests.
- `FromResource(string)`, returns a `ResourceMediaSource` instance from a `string` argument.

Copilot uses AI. Check for mistakes.
@jfversluis jfversluis marked this pull request as draft March 23, 2026 15:41
@jfversluis
Copy link
Contributor

Converting to draft until the actual feature is merged, otherwise looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants