Skip to content

Commit

Permalink
feat: make plugin compatible with Video.js 8.x
Browse files Browse the repository at this point in the history
The plugin is now built in ES6.

BREAKING CHANGES:
- Only Video.js v8.x.x is supported
- Only browsers supported by Video.js v8.x.x are supported
  • Loading branch information
phloxic committed May 19, 2023
1 parent 37f08d5 commit 75a4e5c
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 76 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Plugin to display thumbnails from a sprite image when hovering over the progress

## Compatibility

This plugin version is compatible with Video.js v7.x and v6.x.
This plugin version is compatible with Video.js v8.x.

## Features

Expand Down
188 changes: 123 additions & 65 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "videojs-sprite-thumbnails",
"version": "1.0.0",
"version": "2.0.0-dev",
"description": "Plugin to display thumbnails from a sprite image when hovering over the progress bar.",
"repository": {
"type": "git",
Expand All @@ -12,8 +12,13 @@
"version": "9.0.0"
},
"browserslist": [
"defaults",
"ie 11"
">0.2%",
"not dead",
"not op_mini all",
"not safari < 10",
"not chrome < 51",
"not android < 5",
"not ie < 12"
],
"engines": {
"node": ">=14",
Expand Down Expand Up @@ -71,11 +76,11 @@
"version": "is-prerelease || npm run update-changelog && git add CHANGELOG.md",
"watch": "npm-run-all -p watch:*",
"watch:js": "npm run build:js -- -w",
"prepublishOnly": "npm-run-all build-prod && vjsverify --verbose"
"prepublishOnly": "npm-run-all build-prod && vjsverify --verbose --skip-es-check"
},
"dependencies": {
"global": "^4.4.0",
"video.js": "^6 || ^7"
"video.js": "^8"
},
"devDependencies": {
"@babel/runtime": "^7.14.0",
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SpriteThumbnails extends Plugin {
// the parent class will add player under this.player
super(player, options);

this.options = videojs.mergeOptions(defaults, options);
this.options = videojs.obj.merge(defaults, options);

this.player.ready(() => {
this.setState(this.defaultState);
Expand Down
Loading

0 comments on commit 75a4e5c

Please sign in to comment.