-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Implements Chromecast functionality for Video.js with remoteplayback API #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
judicaelandria
wants to merge
17
commits into
silvermine:master
Choose a base branch
from
judicaelandria:mandriamahandry/add-chromecast-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: Implements Chromecast functionality for Video.js with remoteplayback API #3
judicaelandria
wants to merge
17
commits into
silvermine:master
from
judicaelandria:mandriamahandry/add-chromecast-support
Conversation
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
- Update vite.config.ts with library build settings for UMD and ESM outputs - Add vite-plugin-dts for TypeScript declaration generation with bundled types - Create vite.dev.config.ts for development server serving examples from dist - Configure proper asset handling and CSS compilation for plugin distribution
- Add @silvermine/video.js as peer dependency for plugin integration - Configure package.json exports for proper UMD and ESM module resolution - Update package metadata for remote playback functionality - Add necessary development dependencies for TypeScript and Vite build process
- Create comprehensive TypeScript type definitions for Video.js integration - Add plugin constants for events, CSS classes, and configuration - Implement utility functions for media element handling and logging - Add AirPlay icon asset and SCSS styling following Silvermine standards - Establish proper project structure with modular organization
- Add AirPlayButton component with proper Video.js Button inheritance - Implement AirPlayManager with Remote Playback API and WebKit fallback - Add Safari/Apple device detection to show button only when appropriate - Create comprehensive state management for connection status visualization - Include proper error handling with user-friendly feedback messages - Add support for both standard and large button variants with labels
- Create RemotePlaybackPlugin class with proper lifecycle management - Implement automatic plugin registration using videojs.hook for seamless integration - Add Video.js control bar integration with proper button placement - Enable automatic initialization for all Video.js players without manual setup - Provide clean plugin architecture following Video.js best practices
- Create AirPlayManager tests with proper browser detection mocking - Add enhanced Video.js mock supporting plugin architecture and hooks - Test device availability detection and state management - Validate proper error handling and user feedback scenarios - Ensure plugin initialization and lifecycle work correctly
40bab87 to
dd83b05
Compare
- Create interactive test pages for AirPlay, Chromecast, and Remote Playback API - Add detailed README with usage instructions and browser compatibility matrix - Include development server setup for real-time testing during development - Provide clear installation and integration examples - Add examples documentation with testing guidelines and troubleshooting
- Update vite.dev.config.ts with proper file serving permissions - Add dev:build script that builds plugin before starting dev server - Ensure dist files are properly served at root path (/videojs-remoteplayback.*) - Fix development workflow to eliminate asset loading issues - Maintain clean separation between development and production builds
- Add Chromecast interfaces and type definitions - Add component names and CSS classes constants - Extend VideoJsPlayer interface with chromecast property - Add Chromecast event constants and log messages
- Add ChromecastManager class with availability detection - Implement Chromecast device discovery and connection - Add browser detection utilities (Chrome, Google Cast support) - Move hasRemotePlaybackSupport to shared lib directory - Support both Remote Playback API and Google Cast SDK fallback
- Add ChromecastButton class extending Video.js Button component - Implement proper DOM structure with icon placeholder and control text - Add Chromecast SCSS styling with hover states and icon support - Include Chromecast SVG icons (default and connected states) - Add click handler integration with ChromecastManager
- Add Chromecast button initialization alongside AirPlay - Implement Chromecast availability detection and button management - Add proper button positioning in Video.js control bar - Extend plugin to support both AirPlay and Chromecast simultaneously
dd83b05 to
fe3ba58
Compare
- Add dedicated Chromecast test page with Google Cast SDK integration - Add comprehensive remote playback test page for cross-browser testing - Update existing test suite to include Chromecast functionality - Provide interactive examples for development and debugging
- Remove deprecated AirPlay files from old structure - Delete unused constants and utility files - Update AirPlay button import paths to new structure - Remove duplicate silvermine-videojs.d.ts declarations - Update SCSS asset paths to use src/assets directory - Clean up obsolete image files and consolidate assets
fe3ba58 to
f92a3dc
Compare
- Add @types/**/* to tsconfig.json include and vite.config.ts dts plugin - Simplify @silvermine/video.js module declaration to use standard video.js types - Remove unnecessary ButtonComponent casting workarounds - Fix options_ property access with proper type casting
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.