Merged
Conversation
- split responsibilities into separate areas to create different bundles in the near future - removed old bundler packages to use modern bundler (rollup) - unit test suite upgrading replacing old one with Jest/JSDOM, and increased coverage to ~80% - replaced IMA SDK with @dailymotion/vast-client and @dailymotion/vmap libraries - prepared HLS.js bundle to be a separate element to load - modified UMD files to prepare them for future addition of media engines and plugins - added new event manager to unify events among player => engines => controls
- Upgraded ESLint and configuration, as well as installed new plugins/parsers to enhance code quality - Fixed issue with controls not being rendered for audio tag - Added new `main` area to add elements, to comply with what old player already supports - Added new configuration file to extract default values that could be reused
…intstaged commands
- Switched parameters in method to avoid setting main layer in audio media - Added default configuration and integrated it inside controls, play button and core - Added `datetime` attribute to current time and duration controls - Added new workflow in duration control for Live streaming - Added accessor for media engine to access custom methods - Cleaned up CSS stylesheet - Integrated Ad events to be dispatched by player.on method - Fixed workflow when using keyboard for video and audio - Created time control for backward compatibility - Fixed unit tests after changes
…functionality - Unified flag to use ads with or without custom player, unified way to set ad sources, and fixed unit tests related to ads after changes - Cleaned up unit tests that had useless/dead code introduced for the sake of increasing coverage - Fixed issues with ads not rendering skip ads - Added new destroy method for UI and events - Added new event to check when controls change to dispatch new effects - Revamped core destroy - Added core methods to add captions, elements, controls and ads - Updated styles for VTT cues to adapt properly to control bar visibility - Added sanitization of XML content and some parts of code where pure text was required to avoid XSS injections - Fixed behaviors of progress bar on mobile devices
…of canPlay for HLS
…fixes - Add flag for Jest command to avoid issues when committing files that don't have unit tests attached too them - Added new workflow to check if media can be autoplayed, and split responsibilities between core and ui - Revisited events/state layers and simplified them for future development relying on few new commands and HTML5 media events - Clamp volume to [0..1] to avoid passing that threshold - Removed SIMID support for now and enhanced ad setup to consider the preload="auto"/autoplay attributes coming from main media to dispatch ads - Fixed issues with complex VMAP elements (such as pre-roll + bump/bump + mid-rolls + bump/bump + post-roll) - Added more secure cleaning of Ads content to avoid XSS attacks - Better TS typing in many files - Fixed issue with Settings control to be re-rendered if ads play first - Removed duplicity of play() calls that were unnecessary - Fixed failing unit tests after changes
…eanup - Added new layer to dispose all events from various layers when invoking destroy() - Removed as many `any` types as possible and assigned proper types - Removed `aria-label` in all places in favor of hidden spans for better accessibility with screen readers - Added new configuration for ads to render companions outside of player - Fixed issue with ads plugin not being able to render 2 or more skippable ads - Updated unit tests, specially adding more robust cases when dealing with URL samples
- Added support to pause media when clicking on the main area - Changed his.js bundle name to make it more explicit - Moved labels object inside configuration file
- Split all src folder into packages with each one containing its own `tsconfig` file, `README` documentation and related unit tests - Deprecated CHANGELOG in favor of new one (coming up) - Expanded UMD bundle to add missing methods supported in older version - Fixed multiple issues across code when media preload is set to `none` or `metadata` - Fixed issues when using player.load() and not rendering new source - Added new GitHub action to check for lint errors as part of coding standards
- Fixed issues with non-linear ads being treated as VAST files - Added missing header in unit tests - Removed unnecessary comments - Fixed unit test inherently wrong related to ad samples - Removed duplicated files left in previous iterations - Added more paths to ignore in Jest configuration
…d and not backward
- Initial pass in documentation for new features in v3 and migration docs - Modified package.json files to prepare them to send files without src ones - Removed `peerDependenciesMeta` element not needed in package files - Modified `build:css` command to set the stylesheet inside package/ui to avoid broken package - Modified main README to include links to other packages' README files and main info about new version - Include code snippets and main migration guide from v2 to v3 - Added workflow to add custom ads methods in UMD player - Added new cookbook with more references and samples - Added support to embed methods from ads inside main player in UMD files - Cleaned up types in some unit tests files
- Added new tsconfig file to serve as base for existing ones - Added dedicated tsconfig and modified file to create types without having dependency issues with aliased imports - Added new tsconfig file for Rollup operations, and enabled minification only on UMD files - Modified tsconfig and package files per package to generate dist folder correctly - Fixed regression issue with ads current time not in sync with countdown
…ipeline; upgraded packages
…ocumentation - Added default config for UMD ads file to always use custom controls and avoid issues - Renamed package `ui` to `player` - Renamed file `core/player` to `core/index`, as well as its class across the platform (`Player` to `Core`) for better readability - Added release-it + turbo + pnpm to manage multi-deployment in mono repository, with scripts to customize the CHANGELOG file if needed - Removed `docs` folder by merging documentation inside each package, and refined migration files
…mand for both packages and stylesheet
…port pnpm version in package.json
…l configuration; added flag to other commands
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Moved per-package compilerOptions into tsconfig.build.json using TS 5.5 ${configDir} keeping each package's unique references/include
- Removed .release-it.changelog.cjs and scripts/init-release-notes.mjs not needed
- Fixed eslint.config.mjs by removing drop non-existent tsconfig.types.json reference and prettier rules duplicated from .prettierrc
- Fixed typo in Jest configuration (@openplayerjs/ui -> @openplayerjs/player)
- Fixed stale @openplayer/ui references in player README and source comments
…nal parameter for controls factories and better documentation - Renamed bundles to remove `.umd` from their names - Fixed issue with calling non-existent stylesheet in documentation - Added better documentation related to how to use `buildControls` method and fixed code snippets - Added optional argument when using `createXXControl()` methods to override their placement - Fixed issue with non-linear ads not playing along with main media - Added links to all CodePens available for v3
…for preload/autoplay policies, and controls/UI fixes - Added support for sources in preload to use breaks correctly - Fixed issue with non-linear ads not allowing media to be played using only Core - Fixed way to resume media in any circumstance after ad finishes playing - Removed autoplay policy that considered preload="auto" as a way to autoplay - Removed unnecessary volume/muted setters that caused wrong behaviors when attempting to autoplay - Fixed way to use registerControl by allowing null value for factory to auto install default controls - Added missing event for volume control to set controls depending on the muted/volume on media - Fixed control styles to have proper space between controls depending on layers
- Added support for `layers` and `alwaysVisible` elements - Added default controls configuration in UMD to avoid setting them all the time - Added paragraph in Code Samples section for better readability
…r UMD, refactor controls.layers implementation and last minor fixes - Moved implementation of control layers and alwaysShow flag in ESM to be available for both ESM and UMD - Added currentTime, duration, src, volume, muted and playbackRate getters/setters - Updated unit tests by cleaning up TS types - Fixed issues with import in ads test files not found - Upgraded packages to latest versions
…bscriptions per instance, instead of globally
- Added conditional to avoid autohiding controls when media is paused or ended - Adjusted CSS styles for control bar to avoid conflicts between ads media - Removed adjustment for ads countdown not showing the proper UI - Added element in ads sanitizer to increase security when treating all executable or dangerous schemes - Updated CONTRIBUTING guidelines to be more in tune with new version
- Updated CONTRIBUTING guidelines to indicate how to create new packages - Disabled body max length for commits - Added new commit-msg hook to run commitlint when attempting to commit in the repository to enforce guidelines - Added new GitHub Action to enforce package naming conventions
…s when installing packages
- Replaced GitHub Action with a direct commitlint call to dispatch it from v3.0.0-alpha.0 and going forward - Added new hook that runs commitlint on the exact range being pushed before the network call happens
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.
Summary
This PR is a complete architectural rewrite of OpenPlayerJS.
Most relevant changes
replaced by a small, composable core with optional packages layered on top — giving you
full control over what lands in your bundle.
Testing
From 47% of coverage, this version has increased to 80% or more, putting more emphasis on branch coverage