✨ feat(amp-youtube): add data-channelid support for channel embeds#40377
Open
pranav200408 wants to merge 1 commit intoampproject:mainfrom
Open
✨ feat(amp-youtube): add data-channelid support for channel embeds#40377pranav200408 wants to merge 1 commit intoampproject:mainfrom
pranav200408 wants to merge 1 commit intoampproject:mainfrom
Conversation
|
Pranav Agone seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✨ New feature
Why
amp-youtube currently supports data-videoid and data-live-channelid, but there’s no direct way to embed a YouTube Channel. This adds first-class support for channel embeds to improve author experience and cover a common use case.
What
Linked issue
Closes #26304
Screenshots/Manual verification
Example:
Resulting iframe src contains:
.../embed/live_stream?channel=UC_x5XG1OV2P6uZZ5FSM9Ttw&enablejsapi=1&=1
Follow-ups included/remaining
📖 Docs: Add data-channelid to amp-youtube.md with example
✅ Tests: Unit tests for URL generation, exclusivity rule, and mutation behavior
🏗 Validator: Allow data-channelid and enforce “exactly one of” among data-videoid, data-live-channelid, data-channelid
Breaking changes
None
Risk/rollout
Low. New attribute; existing behavior for data-videoid and data-live-channelid unchanged.
Testing plan
Added/Will add unit tests.
Manually verified with a local example page; inspected iframe src and runtime assertions.
Checklist
✅ Code compiles locally
✅ Tests added/updated
✅ Documentation updated
✅ Validator config updated
✅ Linked to issue and used auto-close keyword