Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

pranav200408
Copy link

✨ 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

  • Introduces a new attribute: data-channelid.
  • Exactly one of data-videoid, data-live-channelid, or data-channelid is required; runtime asserts on conflicts.
  • When data-channelid is present, amp-youtube uses the YouTube live_stream endpoint to render the channel.
  • Handles attribute mutations: switches player source appropriately.

Linked issue
Closes #26304

Screenshots/Manual verification
Example:

Resulting iframe src contains:
.../embed/live_stream?channel=UC_x5XG1OV2P6uZZ5FSM9Ttw&enablejsapi=1&amp=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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

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.

Request to include channel in <amp-youtube>

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.