Skip to content
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

Upgrade Video.js to v8.10.0 #453

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ yarn add @samvera/ramp
yarn add video.js@7.21.3
```

**NOTE**: `video.js@7.21.3` needs to be used until the [fix](https://github.com/silvermine/videojs-quality-selector/pull/93) to use the latest Video.js (v8.0.4) in `@silvermine/videojs-quality-selector` is merged and released.
**NOTE** (*Ramp <= v3.1.2*): `video.js@7.21.3` needs to be used because the included version of `@silvermine/videojs-quality-selector` is incompatible with Video.js >= v8.0.0.

**NOTE** (*Next release*): Ramp will be upgrading to `video.js@8.10.0` in its next release because `@silvermine/videojs-quality-selector` has been updated. If you are installing Ramp from the Main branch you need to run `yarn add video.js@8.10.0` in your ReactJS application to get the correct peer dependency.

### Example usage

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
"stream-browserify": "^3.0.0",
"style-loader": "^2.0.0",
"svg-url-loader": "^6.0.0",
"video.js": "^7.10.2",
"video.js": "^8.10.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
},
"dependencies": {
"@rollup/plugin-json": "^6.0.1",
"@silvermine/videojs-quality-selector": "^1.2.4",
"@silvermine/videojs-quality-selector": "^1.3.1",
"mammoth": "^1.4.19",
"manifesto.js": "^4.1.0",
"mime-db": "^1.52.0",
Expand All @@ -92,7 +92,7 @@
"peerDependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1",
"video.js": "^7.10.2"
"video.js": "^8.10.0"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,33 @@ import { fileDownload } from '@Services/utility-helpers';
const MenuButton = videojs.getComponent('MenuButton');
const MenuItem = videojs.getComponent('MenuItem');

const VideoJSFileDownload = videojs.extend(
MenuButton,
{
constructor: function (player, options) {
MenuButton.call(this, player, options);
// Add SVG icon through CSS class
this.addClass("vjs-file-download-icon");
this.setAttribute('data-testid', 'videojs-file-download');
},
createItems: function () {
const { options_, player_ } = this;
const { manifest, canvasIndex } = options_;
const rendering = getRenderingFiles(manifest, canvasIndex);
const files = (rendering.manifest).concat(rendering.canvas[canvasIndex]?.files);
class VideoJSFileDownload extends MenuButton {
constructor(player, options) {
super(player, options);
// Add SVG icon through CSS class
this.addClass("vjs-file-download-icon");
this.setAttribute('data-testid', 'videojs-file-download');
}

createItems() {
const { options_, player_ } = this;
const { manifest, canvasIndex } = options_;
const rendering = getRenderingFiles(manifest, canvasIndex);
const files = (rendering.manifest).concat(rendering.canvas[canvasIndex]?.files);

if (files?.length > 0) {
return files.map(function (file) {
let item = new MenuItem(player_, { label: file.label });
item.handleClick = function () {
fileDownload(file.id, file.filename, file.fileExt);
};
return item;
});
} else {
return [];
}
},
if (files?.length > 0) {
return files.map(function (file) {
let item = new MenuItem(player_, { label: file.label });
item.handleClick = function () {
fileDownload(file.id, file.filename, file.fileExt);
};
return item;
});
} else {
return [];
}
}
);
}

videojs.registerComponent('VideoJSFileDownload', VideoJSFileDownload);

Expand Down
29 changes: 0 additions & 29 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,35 +131,6 @@ video/poster area the controls are displayed correctly. */
border-bottom: 0.45rem ridge $primaryGreen !important;
}

/* captions font for android and tablet fullscreen */
@media screen and (orientation:portrait) {
.vjs-fullscreen.android {
// Force text track to bottom of screen but not overlapping control bar
.vjs-text-track-cue {
inset: auto 0px 20px !important;
height: auto !important;
font: 0px sans-serif !important;
}

.vjs-text-track-cue>div {
font: 22px sans-serif;
}
}

.vjs-fullscreen.tablet {
// Force text track to bottom of screen but not overlapping control bar
.vjs-text-track-cue {
inset: auto 0px 20px !important;
height: auto !important;
font: 0px sans-serif !important;
}

.vjs-text-track-cue>div {
font: 32px sans-serif;
}
}
}

/** End - Overrides for VideoJS related styling **/

// Webkit override for scroll bars for always-on display in Chrome and Safari
Expand Down
149 changes: 84 additions & 65 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1523,12 +1523,11 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@silvermine/videojs-quality-selector@^1.2.4":
version "1.2.5"
resolved "https://registry.yarnpkg.com/@silvermine/videojs-quality-selector/-/videojs-quality-selector-1.2.5.tgz#da48b6437bad5f8def2922cbf3d77c8c5e411a28"
integrity sha512-cielchUzL8r2EX01S7PfR54tTbxDZR53xIDJoUi9Wg6pM2X+ftdJD6XiIDVOjPlBoG94iuG9LJwUtjX5IhrWZQ==
"@silvermine/videojs-quality-selector@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@silvermine/videojs-quality-selector/-/videojs-quality-selector-1.3.1.tgz#23307dd3d5be442f7aa127c01820f16a3d9476a3"
integrity sha512-uo6gs2HVG2TD0bpZAl0AT6RkDXzk9PnAxtmmW5zXexa2uJvkdFT64QvJoMlEUd2FUUwqYqqAuWGFDJdBh5+KcQ==
dependencies:
class.extend "0.9.1"
underscore "1.13.1"

"@sinclair/typebox@^0.25.16":
Expand Down Expand Up @@ -1961,21 +1960,30 @@
dependencies:
"@types/yargs-parser" "*"

"@videojs/http-streaming@2.16.2":
version "2.16.2"
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-2.16.2.tgz#a9be925b4e368a41dbd67d49c4f566715169b84b"
integrity sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==
"@videojs/http-streaming@3.10.0":
version "3.10.0"
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-3.10.0.tgz#b20eaf7246cc014f2715c967a9cdc4240b6e7e61"
integrity sha512-Lf1rmhTalV4Gw0bJqHmH4lfk/FlepUDs9smuMtorblAYnqDlE2tbUOb7sBXVYoXGdbWbdTW8jH2cnS+6HWYJ4Q==
dependencies:
"@babel/runtime" "^7.12.5"
"@videojs/vhs-utils" "4.0.0"
aes-decrypter "4.0.1"
global "^4.4.0"
m3u8-parser "^7.1.0"
mpd-parser "^1.3.0"
mux.js "7.0.2"
video.js "^7 || ^8"

"@videojs/vhs-utils@4.0.0", "@videojs/vhs-utils@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz#4d4dbf5d61a9fbd2da114b84ec747c3a483bc60d"
integrity sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg==
dependencies:
"@babel/runtime" "^7.12.5"
"@videojs/vhs-utils" "3.0.5"
aes-decrypter "3.1.3"
global "^4.4.0"
m3u8-parser "4.8.0"
mpd-parser "^0.22.1"
mux.js "6.0.1"
video.js "^6 || ^7"
url-toolkit "^2.2.1"

"@videojs/vhs-utils@3.0.5", "@videojs/vhs-utils@^3.0.4", "@videojs/vhs-utils@^3.0.5":
"@videojs/vhs-utils@^3.0.5":
version "3.0.5"
resolved "https://registry.yarnpkg.com/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz#665ba70d78258ba1ab977364e2fe9f4d4799c46c"
integrity sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==
Expand Down Expand Up @@ -2217,10 +2225,10 @@ address@^1.0.1, address@^1.1.2:
resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e"
integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==

aes-decrypter@3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/aes-decrypter/-/aes-decrypter-3.1.3.tgz#65ff5f2175324d80c41083b0e135d1464b12ac35"
integrity sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==
aes-decrypter@4.0.1, aes-decrypter@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/aes-decrypter/-/aes-decrypter-4.0.1.tgz#c1a81d0bde0e96fed0674488d2a31a6d7ab9b7a7"
integrity sha512-H1nh/P9VZXUf17AA5NQfJML88CFjVBDuGkp5zDHa7oEhYN9TTpNLJknRY1ie0iSKWlDf6JRnJKaZVDSQdPy6Cg==
dependencies:
"@babel/runtime" "^7.12.5"
"@videojs/vhs-utils" "^3.0.5"
Expand Down Expand Up @@ -3159,11 +3167,6 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

class.extend@0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/class.extend/-/class.extend-0.9.1.tgz#b4ee417c693740a44a92a6d64f1c9540641b097a"
integrity sha512-Tzj+2kAkZs+iGiUOUoKvtj4c/SjeVdKZXg/NbLTGKu0kp66h69dyMHQwOSzuyIghXAUswuY24TZc0HdaJCXx2A==

clean-css@^5.2.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224"
Expand Down Expand Up @@ -5225,7 +5228,7 @@ global-prefix@^3.0.0:
kind-of "^6.0.2"
which "^1.3.1"

global@^4.3.1, global@^4.4.0, global@~4.4.0:
global@4.4.0, global@^4.3.1, global@^4.4.0, global@~4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406"
integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==
Expand Down Expand Up @@ -7082,10 +7085,10 @@ jszip@^3.7.1:
readable-stream "~2.3.6"
setimmediate "^1.0.5"

keycode@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.1.tgz#09c23b2be0611d26117ea2501c2c391a01f39eff"
integrity sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==
keycode@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
integrity sha512-ps3I9jAdNtRpJrbBvQjpzyFbss/skHqzS+eu4RxKLaEAtFqkjZaB6TZMSivPbLxf4K7VI4SjR0P5mRCX5+Q25A==

killable@^1.0.1:
version "1.0.1"
Expand Down Expand Up @@ -7303,10 +7306,10 @@ lz-string@^1.4.4:
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"
integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==

m3u8-parser@4.8.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/m3u8-parser/-/m3u8-parser-4.8.0.tgz#4a2d591fdf6f2579d12a327081198df8af83083d"
integrity sha512-UqA2a/Pw3liR6Df3gwxrqghCP17OpPlQj6RBPLYygf/ZSQ4MoSgvdvhvt35qV+3NaaA0FSZx93Ix+2brT1U7cA==
m3u8-parser@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/m3u8-parser/-/m3u8-parser-7.1.0.tgz#fa92ee22fc798150397c297152c879fe09f066c6"
integrity sha512-7N+pk79EH4oLKPEYdgRXgAsKDyA/VCo0qCHlUwacttQA0WqsjZQYmNfywMvjlY9MpEBVZEt0jKFd73Kv15EBYQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@videojs/vhs-utils" "^3.0.5"
Expand Down Expand Up @@ -7707,13 +7710,13 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

mpd-parser@0.22.1, mpd-parser@^0.22.1:
version "0.22.1"
resolved "https://registry.yarnpkg.com/mpd-parser/-/mpd-parser-0.22.1.tgz#bc2bf7d3e56368e4b0121035b055675401871521"
integrity sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==
mpd-parser@^1.2.2, mpd-parser@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/mpd-parser/-/mpd-parser-1.3.0.tgz#38c20f4d73542b4ed554158bc1f0fa571dc61388"
integrity sha512-WgeIwxAqkmb9uTn4ClicXpEQYCEduDqRKfmUdp4X8vmghKfBNXZLYpREn9eqrDx/Tf5LhzRcJLSpi4ohfV742Q==
dependencies:
"@babel/runtime" "^7.12.5"
"@videojs/vhs-utils" "^3.0.5"
"@videojs/vhs-utils" "^4.0.0"
"@xmldom/xmldom" "^0.8.3"
global "^4.4.0"

Expand Down Expand Up @@ -7763,10 +7766,18 @@ mute-stream@0.0.8:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==

mux.js@6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-6.0.1.tgz#65ce0f7a961d56c006829d024d772902d28c7755"
integrity sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==
mux.js@7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-7.0.2.tgz#410641dc922c5d173d7ce45fbdb2bb9e2a69137c"
integrity sha512-CM6+QuyDbc0qW1OfEjkd2+jVKzTXF+z5VOKH0eZxtZtnrG/ilkW/U7l7IXGtBNLASF9sKZMcK1u669cq50Qq0A==
dependencies:
"@babel/runtime" "^7.11.2"
global "^4.4.0"

mux.js@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-7.0.3.tgz#18fbbc607faeeaa8c897e0410d2067be2bdc7e1e"
integrity sha512-gzlzJVEGFYPtl2vvEiJneSWAWD4nfYRHD5XgxmB2gWvXraMPOYk+sxfvexmNfjQUFpmk6hwLR5C6iSFmuwCHdQ==
dependencies:
"@babel/runtime" "^7.11.2"
global "^4.4.0"
Expand Down Expand Up @@ -11241,39 +11252,47 @@ vfile@^4.0.0:
unist-util-stringify-position "^2.0.0"
vfile-message "^2.0.0"

"video.js@^6 || ^7", video.js@^7.10.2:
version "7.21.4"
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.21.4.tgz#362a2549467434b27507e0420b30eb4758feb128"
integrity sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==
"video.js@^7 || ^8", video.js@^8.10.0:
version "8.10.0"
resolved "https://registry.yarnpkg.com/video.js/-/video.js-8.10.0.tgz#603a49909ef33f839264da8b73513f9daf592b57"
integrity sha512-7UeG/flj/pp8tNGW8WKPP1VJb3x2FgLoqUWzpZqkoq5YIyf6MNzmIrKtxprl438T5RVkcj+OzV8IX4jYSAn4Sw==
dependencies:
"@babel/runtime" "^7.12.5"
"@videojs/http-streaming" "2.16.2"
"@videojs/vhs-utils" "^3.0.4"
"@videojs/http-streaming" "3.10.0"
"@videojs/vhs-utils" "^4.0.0"
"@videojs/xhr" "2.6.0"
aes-decrypter "3.1.3"
global "^4.4.0"
keycode "^2.2.0"
m3u8-parser "4.8.0"
mpd-parser "0.22.1"
mux.js "6.0.1"
aes-decrypter "^4.0.1"
global "4.4.0"
keycode "2.2.0"
m3u8-parser "^7.1.0"
mpd-parser "^1.2.2"
mux.js "^7.0.1"
safe-json-parse "4.0.0"
videojs-font "3.2.0"
videojs-vtt.js "^0.15.4"
videojs-contrib-quality-levels "4.0.0"
videojs-font "4.1.0"
videojs-vtt.js "0.15.5"

videojs-font@3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/videojs-font/-/videojs-font-3.2.0.tgz#212c9d3f4e4ec3fa7345167d64316add35e92232"
integrity sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==
videojs-contrib-quality-levels@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-4.0.0.tgz#faa8096594cdbfc3ccbefe8572fc20531ba23f3d"
integrity sha512-u5rmd8BjLwANp7XwuQ0Q/me34bMe6zg9PQdHfTS7aXgiVRbNTb4djcmfG7aeSrkpZjg+XCLezFNenlJaCjBHKw==
dependencies:
global "^4.4.0"

videojs-font@4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/videojs-font/-/videojs-font-4.1.0.tgz#3ae1dbaac60b4f0f1c4e6f7ff9662a89df176015"
integrity sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w==

videojs-markers-plugin@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/videojs-markers-plugin/-/videojs-markers-plugin-1.0.2.tgz#7e40da152504a0f1be0ee1cf608c7dccc4abf8b3"
integrity sha512-yxUp6hT0Czx7i7MMMxcqExhOcDp48vkJUMJccnb1XhUqc52gbnVipP10g2XG0ZDkJ2WBXKQw49JI+pZXZUkwPg==

videojs-vtt.js@^0.15.4:
version "0.15.4"
resolved "https://registry.yarnpkg.com/videojs-vtt.js/-/videojs-vtt.js-0.15.4.tgz#5dc5aabcd82ba40c5595469bd855ea8230ca152c"
integrity sha512-r6IhM325fcLb1D6pgsMkTQT1PpFdUdYZa1iqk7wJEu+QlibBwATPfPc9Bg8Jiym0GE5yP1AG2rMLu+QMVWkYtA==
videojs-vtt.js@0.15.5:
version "0.15.5"
resolved "https://registry.yarnpkg.com/videojs-vtt.js/-/videojs-vtt.js-0.15.5.tgz#567776eaf2a7a928d88b148a8b401ade2406f2ca"
integrity sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==
dependencies:
global "^4.3.1"

Expand Down