feat: Add private video support with oEmbed-first API strategy#30
Open
lucasjahn wants to merge 3 commits intoluwes:mainfrom
Open
feat: Add private video support with oEmbed-first API strategy#30lucasjahn wants to merge 3 commits intoluwes:mainfrom
lucasjahn wants to merge 3 commits intoluwes:mainfrom
Conversation
- Add private/unlisted video support via privacy hash detection - Migrate to oEmbed API for all videos (V2 API deprecated) - Implement HD thumbnails (1280x720 vs 480x360) - Add comprehensive error handling and recovery strategies - Maintain 100% backward compatibility - Add new component events and public API methods New files: - lite-vimeo-embed-enhanced.js: Enhanced component with private video support - src/api/vimeo-api-client.js: oEmbed-first API client with fallback - src/utils/privacy-hash-parser.js: Privacy hash detection and validation - src/utils/error-handler.js: Error handling with recovery mechanisms Tested with real videos: - Public: 524933864 ✅ - Private: 1114813712/365e3d021c ✅
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Replace lite-vimeo-embed.js with enhanced version content - Backup original as lite-vimeo-embed-legacy.js for compatibility - Private video support now standard feature - oEmbed-first API strategy for all videos - HD thumbnails (1280x720) by default - 100% backwards compatible upgrade - Update package version to 0.4.0 - Update CHANGELOG.md with new features
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.
Overview
Private Video Support
privacy-hash,video-urlhttps://vimeo.com/123456789/abc123def456https://player.vimeo.com/video/123456789?h=abc123def456videoid="123456789" privacy-hash="abc123def456"Modern API Strategy
Enhanced Component
lite-vimeo-ready,lite-vimeo-play,lite-vimeo-errorrefresh(),getVideoInfo()🔧 Technical Implementation
New Files
lite-vimeo-embed-enhanced.js- Enhanced component with private video supportsrc/api/vimeo-api-client.js- oEmbed-first API client with fallback strategysrc/utils/privacy-hash-parser.js- Privacy hash detection and URL parsingsrc/utils/error-handler.js- Error handling with recovery mechanismsArchitecture
All Videos → oEmbed API (recommended)
↓
Success → HD thumbnails + metadata
↓
Fallback (public only) → Deprecated V2 API
↓
Final Fallback → Direct iframe embed
Why This Matters
Existing Users
No changes required - existing code works unchanged:
Private Video Users
Simply add privacy hash: