Merged
Conversation
Replace promotional language with neutral, factual descriptions: **Section introductions (5 changes):** - "draws significant inspiration... pioneered" → "uses patterns from" - "heavily rooted... pioneering" → "uses patterns from" - "heavily inspired by" → "follows patterns from" - "draws its most significant inspiration" → "follows/uses" **Subsection headers (6 changes):** - "Innovation" → "Pattern" (Media Elements, Media Chrome) - "Innovation" → "Approach" (VJS-10, VidStack) - "Contribution" → "Pattern" (Media Chrome) - "Key Innovation" → "Key Difference" **Other changes:** - "Pioneered" → "Introduced" (line 412) - "significant architectural evolution" → "is a media player component library" Result: Technical documentation with neutral, factual tone throughout. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Correct inaccurate claims about media-elements extending HTMLVideoElement/
HTMLAudioElement. The actual implementation extends HTMLElement and wraps
native media elements in shadow DOM due to Safari's Web Components limitation.
**Corrections made:**
1. **Core Architecture Pattern** (lines 38-48):
- Changed from `extends HTMLVideoElement` to `extends HTMLElement`
- Added comment explaining Safari limitation
- Clarified `nativeEl` is wrapped in shadow DOM
2. **Key Architectural Assumptions** (lines 65-71):
- Changed "Media state owner must be an HTMLElement" to
"Must extend HTMLElement (Safari limitation)"
- Added "Wraps native <video> or <audio> element in shadow DOM"
- Added "Proxies HTMLMediaElement properties/methods to wrapped native element"
3. **Interface Abstraction** (lines 214-219):
- Changed from "Must extend HTMLVideoElement or HTMLAudioElement"
- Added Safari limitation explanation
- Added shadow DOM wrapping detail
4. **Contract Comparison Table** (lines 229-235):
- Base Class: "HTMLVideoElement required" → "HTMLElement with wrapped native video"
- HTMLMediaElement Contract: "Full native implementation" → "Proxied to wrapped native element"
- Extension Method: "Class inheritance" → "Class inheritance from HTMLElement"
**Why this matters**: Safari doesn't support extending built-in elements in Web
Components, so media-elements uses a wrapper pattern instead. The previous
documentation incorrectly suggested direct inheritance from HTMLVideoElement.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tion Restructure documentation to clearly separate two related but distinct concepts: 1. MediaStateOwner - The interface custom elements implement (Media Elements) 2. State Mediators - The transformation layer between store and media element (Media Chrome) **Media Elements Section Changes:** Subsection 5 renamed: "MediaStateOwner Contract and State Management" - Added opening explanation of two-concept relationship - Clarified MediaStateOwner as HTMLMediaElement-like interface - Updated Media Elements Pattern: custom elements IMPLEMENT MediaStateOwner - Updated VJS-10 Pattern: state mediators READ/WRITE MediaStateOwner interface - Added key characteristics for both patterns **Media Chrome Section Changes:** New subsection 4: "State Mediator Architecture and MediaStateOwner" - Added architectural layer diagram showing relationship: UI → Store → State Mediators → MediaStateOwner - Explained what state mediators encapsulate (get/set, events, side effects, validation) - Showed how state mediators interact with MediaStateOwner interface - Called out DOM-dependent complexities (fullscreen, PiP, remote playback) - Documented VJS-10's pragmatic approach: optional `element` property for DOM access - Explained platform-specific handling (HTML, React, React Native) Renumbered subsequent Media Chrome subsections (5-7). **Why This Matters:** Previously, the section conflated custom elements AS state mediators with the actual state mediator pattern from Media Chrome. Now it's clear that: - Custom elements implement the MediaStateOwner CONTRACT - State mediators are a separate LAYER that works with that contract This clarifies why relaxing HTMLElement requirements matters across the entire architecture, and acknowledges practical limitations (some APIs need DOM access). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…undancy - Tighten section 1 (Extended HTMLMediaElement Contract) with reference to Media Elements - Merge sections 2 + 4 into comprehensive State Mediator Pattern section - Remove section 3 and fold examples into merged state mediator section - Rename section 4 to "Event-Driven State Updates and Action Dispatch" with terminology note explaining media events vs action dispatches (XState vs Redux semantics) - Rename section 5 to "Web Component Foundation (vs. Common Core)" to emphasize architectural contrast with VidStack - Remove incorrect MEDIA_CHROME_MIGRATION.md reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
No description provided.