@srgssr/pillarbox-web 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/dist/pillarbox-core.cjs.js +307 -0
  3. package/dist/pillarbox-core.cjs.min.js +2 -0
  4. package/dist/pillarbox-core.cjs.min.js.map +1 -0
  5. package/dist/pillarbox-core.es.js +305 -0
  6. package/dist/pillarbox-core.es.min.js +2 -0
  7. package/dist/pillarbox-core.es.min.js.map +1 -0
  8. package/dist/pillarbox-core.umd.js +68327 -0
  9. package/dist/pillarbox-core.umd.min.js +35 -0
  10. package/dist/pillarbox-core.umd.min.js.map +1 -0
  11. package/dist/pillarbox.cjs.js +3571 -0
  12. package/dist/pillarbox.cjs.min.js +2 -0
  13. package/dist/pillarbox.cjs.min.js.map +1 -0
  14. package/dist/pillarbox.es.js +3569 -0
  15. package/dist/pillarbox.es.min.js +2 -0
  16. package/dist/pillarbox.es.min.js.map +1 -0
  17. package/dist/pillarbox.min.css +1 -0
  18. package/dist/pillarbox.min.css.map +1 -0
  19. package/dist/pillarbox.umd.js +71591 -0
  20. package/dist/pillarbox.umd.min.js +35 -0
  21. package/dist/pillarbox.umd.min.js.map +1 -0
  22. package/dist/types/build.es.d.ts +5 -0
  23. package/dist/types/build.es.d.ts.map +1 -0
  24. package/dist/types/src/analytics/SRGAnalytics.d.ts +414 -0
  25. package/dist/types/src/analytics/SRGAnalytics.d.ts.map +1 -0
  26. package/dist/types/src/components/player.d.ts +116 -0
  27. package/dist/types/src/components/player.d.ts.map +1 -0
  28. package/dist/types/src/components/typedef.d.ts +14 -0
  29. package/dist/types/src/components/typedef.d.ts.map +1 -0
  30. package/dist/types/src/dataProvider/model/MediaComposition.d.ts +154 -0
  31. package/dist/types/src/dataProvider/model/MediaComposition.d.ts.map +1 -0
  32. package/dist/types/src/dataProvider/model/typedef.d.ts +1485 -0
  33. package/dist/types/src/dataProvider/model/typedef.d.ts.map +1 -0
  34. package/dist/types/src/dataProvider/services/DataProvider.d.ts +40 -0
  35. package/dist/types/src/dataProvider/services/DataProvider.d.ts.map +1 -0
  36. package/dist/types/src/lang/de.d.ts +2 -0
  37. package/dist/types/src/lang/de.d.ts.map +1 -0
  38. package/dist/types/src/lang/en.d.ts +2 -0
  39. package/dist/types/src/lang/en.d.ts.map +1 -0
  40. package/dist/types/src/lang/fr.d.ts +2 -0
  41. package/dist/types/src/lang/fr.d.ts.map +1 -0
  42. package/dist/types/src/lang/it.d.ts +2 -0
  43. package/dist/types/src/lang/it.d.ts.map +1 -0
  44. package/dist/types/src/lang/rm.d.ts +2 -0
  45. package/dist/types/src/lang/rm.d.ts.map +1 -0
  46. package/dist/types/src/middleware/srgssr.d.ts +271 -0
  47. package/dist/types/src/middleware/srgssr.d.ts.map +1 -0
  48. package/dist/types/src/middleware/typedef.d.ts +67 -0
  49. package/dist/types/src/middleware/typedef.d.ts.map +1 -0
  50. package/dist/types/src/pillarbox.d.ts +11 -0
  51. package/dist/types/src/pillarbox.d.ts.map +1 -0
  52. package/dist/types/src/utils/AkamaiTokenService.d.ts +73 -0
  53. package/dist/types/src/utils/AkamaiTokenService.d.ts.map +1 -0
  54. package/dist/types/src/utils/Drm.d.ts +31 -0
  55. package/dist/types/src/utils/Drm.d.ts.map +1 -0
  56. package/dist/types/src/utils/Image.d.ts +33 -0
  57. package/dist/types/src/utils/Image.d.ts.map +1 -0
  58. package/dist/types/src/utils/PlayerEvents.d.ts +177 -0
  59. package/dist/types/src/utils/PlayerEvents.d.ts.map +1 -0
  60. package/dist/types/src/utils/typedef.d.ts +17 -0
  61. package/dist/types/src/utils/typedef.d.ts.map +1 -0
  62. package/package.json +109 -0
  63. package/scss/components/_big-play.scss +30 -0
  64. package/scss/components/_captions-settings.scss +71 -0
  65. package/scss/components/_control-bar.scss +15 -0
  66. package/scss/components/_control-spacer.scss +9 -0
  67. package/scss/components/_control.scss +8 -0
  68. package/scss/components/_error.scss +10 -0
  69. package/scss/components/_layout.scss +63 -0
  70. package/scss/components/_loading.scss +34 -0
  71. package/scss/components/_progress.scss +70 -0
  72. package/scss/components/_slider.scss +9 -0
  73. package/scss/components/_text-track.scss +8 -0
  74. package/scss/components/_time.scss +29 -0
  75. package/scss/components/_title-bar.scss +9 -0
  76. package/scss/components/_volume.scss +16 -0
  77. package/scss/components/menu/_menu-popup.scss +30 -0
  78. package/scss/components/menu/_menu.scss +26 -0
  79. package/scss/pillarbox.scss +26 -0
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Exhaustive list of player events.
3
+ *
4
+ * See below the documentation related to the media events
5
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#events
6
+ *
7
+ * @namespace {Object} PlayerEvents
8
+ */
9
+ /**
10
+ * Triggered when the media can start playing.
11
+ *
12
+ * @event PlayerEvents#CAN_PLAY
13
+ * @type {string}
14
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event
15
+ */
16
+ export const CAN_PLAY: string;
17
+ /**
18
+ * Triggered when the media can be played through to the end without buffering.
19
+ *
20
+ * @event PlayerEvents#CAN_PLAY_THROUGH
21
+ * @type {string}
22
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplaythrough_event
23
+ */
24
+ export const CAN_PLAY_THROUGH: string;
25
+ /**
26
+ * Triggered when the duration of the media changes.
27
+ *
28
+ * @event PlayerEvents#DURATION_CHANGE
29
+ * @type {string}
30
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/durationchange_event
31
+ */
32
+ export const DURATION_CHANGE: string;
33
+ /**
34
+ * Triggered when the media element is emptied (e.g., reset as part of the seeking process).
35
+ *
36
+ * @event PlayerEvents#EMPTIED
37
+ * @type {string}
38
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/emptied_event
39
+ */
40
+ export const EMPTIED: string;
41
+ /**
42
+ * Triggered when the media playback has ended.
43
+ *
44
+ * @event PlayerEvents#ENDED
45
+ * @type {string}
46
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event
47
+ */
48
+ export const ENDED: string;
49
+ /**
50
+ * Triggered when an error occurs during media playback.
51
+ *
52
+ * @event PlayerEvents#ERROR
53
+ * @type {string}
54
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error_event
55
+ */
56
+ export const ERROR: string;
57
+ /**
58
+ * Triggered when the media data has been loaded.
59
+ *
60
+ * @event PlayerEvents#LOADED_DATA
61
+ * @type {string}
62
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadeddata_event
63
+ */
64
+ export const LOADED_DATA: string;
65
+ /**
66
+ * Triggered when metadata for the media has been loaded.
67
+ *
68
+ * @event PlayerEvents#LOADED_METADATA
69
+ * @type {string}
70
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event
71
+ */
72
+ export const LOADED_METADATA: string;
73
+ /**
74
+ * Triggered when the browser starts looking for media data.
75
+ *
76
+ * @event PlayerEvents#LOAD_START
77
+ * @type {string}
78
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadstart_event
79
+ */
80
+ export const LOAD_START: string;
81
+ /**
82
+ * Triggered when the media playback is paused.
83
+ *
84
+ * @event PlayerEvents#PAUSE
85
+ * @type {string}
86
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event
87
+ */
88
+ export const PAUSE: string;
89
+ /**
90
+ * Triggered when the media playback is resumed or started.
91
+ *
92
+ * @event PlayerEvents#PLAY
93
+ * @type {string}
94
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event
95
+ */
96
+ export const PLAY: string;
97
+ /**
98
+ * Triggered when the media playback is in progress.
99
+ *
100
+ * @event PlayerEvents#PLAYING
101
+ * @type {string}
102
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playing_event
103
+ */
104
+ export const PLAYING: string;
105
+ /**
106
+ * Triggered as the media is being loaded.
107
+ *
108
+ * @event PlayerEvents#PROGRESS
109
+ * @type {string}
110
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/progress_event
111
+ */
112
+ export const PROGRESS: string;
113
+ /**
114
+ * Triggered when the playback rate changes.
115
+ *
116
+ * @event PlayerEvents#RATE_CHANGE
117
+ * @type {string}
118
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ratechange_event
119
+ */
120
+ export const RATE_CHANGE: string;
121
+ /**
122
+ * Triggered when a seek operation is completed.
123
+ *
124
+ * @event PlayerEvents#SEEKED
125
+ * @type {string}
126
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeked_event
127
+ */
128
+ export const SEEKED: string;
129
+ /**
130
+ * Triggered when a seek operation is in progress.
131
+ *
132
+ * @event PlayerEvents#SEEKING
133
+ * @type {string}
134
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking_event
135
+ */
136
+ export const SEEKING: string;
137
+ /**
138
+ * Triggered when the media playback is stalled.
139
+ *
140
+ * @event PlayerEvents#STALLED
141
+ * @type {string}
142
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/stalled_event
143
+ */
144
+ export const STALLED: string;
145
+ /**
146
+ * Triggered when media loading is suspended.
147
+ *
148
+ * @event PlayerEvents#SUSPEND
149
+ * @type {string}
150
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/suspend_event
151
+ */
152
+ export const SUSPEND: string;
153
+ /**
154
+ * Triggered when the current playback position is updated.
155
+ *
156
+ * @event PlayerEvents#TIME_UPDATE
157
+ * @type {string}
158
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/timeupdate_event
159
+ */
160
+ export const TIME_UPDATE: string;
161
+ /**
162
+ * Triggered when the volume is changed.
163
+ *
164
+ * @event PlayerEvents#VOLUME_CHANGE
165
+ * @type {string}
166
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volumechange_event
167
+ */
168
+ export const VOLUME_CHANGE: string;
169
+ /**
170
+ * Triggered when the media playback is waiting for data.
171
+ *
172
+ * @event PlayerEvents#WAITING
173
+ * @type {string}
174
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/waiting_event
175
+ */
176
+ export const WAITING: string;
177
+ //# sourceMappingURL=PlayerEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlayerEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/PlayerEvents.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,uBAHU,MAAM,CAGkB;AAElC;;;;;;GAMG;AACH,+BAHU,MAAM,CAGiC;AAEjD;;;;;;GAMG;AACH,8BAHU,MAAM,CAGgC;AAEhD;;;;;;GAMG;AACH,sBAHU,MAAM,CAGiB;AAEjC;;;;;;GAMG;AACH,oBAHU,MAAM,CAGa;AAE7B;;;;;;GAMG;AACH,oBAHU,MAAM,CAGa;AAE7B;;;;;;GAMG;AACH,0BAHU,MAAM,CAGwB;AAExC;;;;;;GAMG;AACH,8BAHU,MAAM,CAGgC;AAEhD;;;;;;GAMG;AACH,yBAHU,MAAM,CAGsB;AAEtC;;;;;;GAMG;AACH,oBAHU,MAAM,CAGa;AAE7B;;;;;;GAMG;AACH,mBAHU,MAAM,CAGW;AAE3B;;;;;;GAMG;AACH,sBAHU,MAAM,CAGiB;AAEjC;;;;;;GAMG;AACH,uBAHU,MAAM,CAGmB;AAEnC;;;;;;GAMG;AACH,0BAHU,MAAM,CAGwB;AAExC;;;;;;GAMG;AACH,qBAHU,MAAM,CAGe;AAE/B;;;;;;GAMG;AACH,sBAHU,MAAM,CAGiB;AAEjC;;;;;;GAMG;AACH,sBAHU,MAAM,CAGiB;AAEjC;;;;;;GAMG;AACH,sBAHU,MAAM,CAGiB;AAEjC;;;;;;GAMG;AACH,0BAHU,MAAM,CAGwB;AAExC;;;;;;GAMG;AACH,4BAHU,MAAM,CAG4B;AAE5C;;;;;;GAMG;AACH,sBAHU,MAAM,CAGiB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Represents the result of building key systems.
3
+ */
4
+ export interface KeySystems {
5
+ /**
6
+ * A mapping of DRM types to their corresponding key systems information.
7
+ * For "FAIRPLAY" type, it includes a structure with certificate and license URIs;
8
+ * for other types, it's a string representing the license URL.
9
+ */
10
+ keySystems: {
11
+ [x: string]: {
12
+ certificateUri: string;
13
+ licenseUri: string;
14
+ } | string;
15
+ };
16
+ }
17
+ //# sourceMappingURL=typedef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../../../src/utils/typedef.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,UAAU,EAAE;QACV,CAAC,CAAC,EAAE,MAAM,GAAG;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,UAAU,EAAE,MAAM,CAAC;SACpB,GAAG,MAAM,CAAC;KACZ,CAAC;CACH"}
package/package.json ADDED
@@ -0,0 +1,109 @@
1
+ {
2
+ "name": "@srgssr/pillarbox-web",
3
+ "description": "Pillarbox is the modern SRG SSR player",
4
+ "version": "1.12.2",
5
+ "type": "module",
6
+ "module": "dist/pillarbox.es.js",
7
+ "main": "dist/pillarbox.cjs.js",
8
+ "style": "./dist/pillarbox.min.css",
9
+ "types": "./dist/types/build.es.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/pillarbox.es.js",
13
+ "require": "./dist/pillarbox.cjs.js"
14
+ },
15
+ "./core": {
16
+ "import": "./dist/pillarbox-core.es.js",
17
+ "require": "./dist/pillarbox-core.cjs.js"
18
+ },
19
+ "./*": "./*"
20
+ },
21
+ "files": [
22
+ "dist/*",
23
+ "scss/*"
24
+ ],
25
+ "directories": {
26
+ "doc": "docs"
27
+ },
28
+ "targets": {
29
+ "main": false,
30
+ "github-page": {
31
+ "publicUrl": "./",
32
+ "isLibrary": false,
33
+ "outputFormat": "esmodule"
34
+ }
35
+ },
36
+ "scripts": {
37
+ "build": "npm run build:lib && npm run build:typings && npm run build:css",
38
+ "build:css": "sass ./scss/pillarbox.scss:dist/pillarbox.min.css --style compressed --source-map --load-path node_modules",
39
+ "build:lib": "rollup -c",
40
+ "build:typings": "npx -p typescript tsc",
41
+ "eslint": "eslint --ext .js src",
42
+ "generate:docs": "jsdoc --configure docs/api/jsdoc.json --verbose",
43
+ "github:page": "parcel build index.html --target github-page && npm run generate:docs",
44
+ "outdated": "npm outdated",
45
+ "prebuild": "rimraf dist",
46
+ "release:ci": "semantic-release",
47
+ "start": "parcel -p 6969 index.html",
48
+ "stylelint": "stylelint **/*.scss --custom-syntax --allow-empty-input",
49
+ "stylelint:fix": "stylelint **/*.scss --fix",
50
+ "test": "jest --verbose",
51
+ "test:watch": "jest --watch --verbose"
52
+ },
53
+ "keywords": [],
54
+ "author": "SRG SSR",
55
+ "license": "MIT",
56
+ "bugs": {
57
+ "url": "https://github.com/SRGSSR/pillarbox-web/issues"
58
+ },
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/SRGSSR/pillarbox-web.git"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public"
65
+ },
66
+ "homepage": "https://srgssr.github.io/pillarbox-web-demo/",
67
+ "devDependencies": {
68
+ "@babel/core": "^7.24.1",
69
+ "@babel/preset-env": "^7.24.1",
70
+ "@commitlint/cli": "^18.4.3",
71
+ "@commitlint/config-conventional": "^18.4.3",
72
+ "@parcel/transformer-sass": "^2.11.0",
73
+ "@rollup/plugin-babel": "^6.0.4",
74
+ "@rollup/plugin-commonjs": "^25.0.7",
75
+ "@rollup/plugin-json": "^6.1.0",
76
+ "@rollup/plugin-node-resolve": "^15.2.3",
77
+ "@rollup/plugin-terser": "^0.4.4",
78
+ "@semantic-release/changelog": "^6.0.3",
79
+ "@semantic-release/git": "^10.0.1",
80
+ "@semantic-release/github": "^ 9.2.5",
81
+ "@semantic-release/npm": "^11.0.2",
82
+ "@types/jest": "^29.5.12",
83
+ "babel-jest": "^29.5.0",
84
+ "better-docs": "^2.7.3",
85
+ "buffer": "^6.0.3",
86
+ "clean-jsdoc-theme": "^4.2.17",
87
+ "eslint": "^8.55.0",
88
+ "eslint-plugin-jest": "^27.2.2",
89
+ "husky": "^8.0.3",
90
+ "jest": "^29.5.0",
91
+ "jest-environment-jsdom": "^29.6.1",
92
+ "jsdoc": "^4.0.2",
93
+ "jsdoc-tsimport-plugin": "^1.0.5",
94
+ "parcel": "^2.11.0",
95
+ "rimraf": "^5.0.5",
96
+ "rollup": "^4.9.6",
97
+ "rollup-plugin-filesize": "^10.0.0",
98
+ "sass": "^1.70.0",
99
+ "semantic-release": "^23.0.0",
100
+ "stylelint": "^16.2.1",
101
+ "stylelint-config-rational-order": "^0.1.2",
102
+ "stylelint-order": "^6.0.4",
103
+ "typescript": "^5.3.3"
104
+ },
105
+ "dependencies": {
106
+ "video.js": "^8.11.8",
107
+ "videojs-contrib-eme": "^3.11.2"
108
+ }
109
+ }
@@ -0,0 +1,30 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Big play button: Initial play button shown before the video has played
4
+ ******************************************************************************
5
+ */
6
+ &:hover .vjs-big-play-button {
7
+ background-color: #16161688;
8
+ transition: background-color .25s ease;
9
+ }
10
+
11
+ // Refer to https://github.com/videojs/video.js/pull/8398
12
+ .vjs-big-play-button {
13
+ width: 2em;
14
+ height: 2em;
15
+ margin: 0;
16
+ font-size: 2.25em;
17
+ background: transparent;
18
+ border: 0.1em solid #fff;
19
+ border-radius: 50%;
20
+ transform: translate(-50%, -50%);
21
+ transition: background-color .25s ease;
22
+ }
23
+
24
+ .vjs-big-play-button .vjs-icon-placeholder::before {
25
+ position: initial;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ font-size: 1.75em;
30
+ }
@@ -0,0 +1,71 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Text track settings: Displayed when editing text track parameters
4
+ ******************************************************************************
5
+ */
6
+ .vjs-modal-dialog.vjs-text-track-settings {
7
+ top: 50%;
8
+ left: 50%;
9
+ max-width: 25em;
10
+ max-height: 50em;
11
+ background: rgba(22,22,22,.95);
12
+ border-radius: 0.5em;
13
+ box-shadow: 2px 2px 3px #0005;
14
+ transform: translate(-50%, -50%);
15
+ overscroll-behavior: contain;
16
+ }
17
+
18
+ .vjs-text-track-settings .vjs-modal-dialog-content {
19
+ display: flex;
20
+ flex-direction: column;
21
+ padding: 1em 1.5em 0;
22
+ }
23
+
24
+ .vjs-text-track-settings legend {
25
+ font-size: 1em;
26
+ }
27
+
28
+ .vjs-text-track-settings fieldset span {
29
+ padding-inline: 0;
30
+ }
31
+
32
+ .vjs-text-track-settings fieldset {
33
+ display: flex;
34
+ margin: 0 0 1em 0;
35
+ padding: 0;
36
+ }
37
+
38
+ &.video-js .vjs-text-track-settings select {
39
+ margin: 0.25em 0 0 0;
40
+ padding: 0.5em;
41
+ color: #fff;
42
+ background: #3f3f3f;
43
+ border: none;
44
+ appearance: auto;
45
+
46
+ &:focus-within {
47
+ outline: solid;
48
+ }
49
+ }
50
+
51
+ .vjs-track-settings-controls {
52
+ display: flex;
53
+ flex-direction: row;
54
+ gap: 1em;
55
+ justify-content: end;
56
+
57
+ button {
58
+ margin-block: 1em;
59
+ padding: .25em .5em;
60
+ color: #fff;
61
+ background: #3f3f3f;
62
+
63
+ &:hover {
64
+ background: #5c5c5c;
65
+ }
66
+ }
67
+
68
+ .vjs-default-button {
69
+ margin-right: 0;
70
+ }
71
+ }
@@ -0,0 +1,15 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Control bar: Contains the main controls of the player
4
+ ******************************************************************************
5
+ */
6
+ &:not(.vjs-audio-only-mode) .vjs-control-bar {
7
+ align-items: flex-end;
8
+ height: 6em;
9
+ padding-inline: 1em;
10
+ background: linear-gradient(#000 0%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
11
+ }
12
+
13
+ &.vjs-audio-only-mode .vjs-control-bar {
14
+ background-color: #1e232c;
15
+ }
@@ -0,0 +1,9 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Spacer control: Spacer used as an insertion point
4
+ ******************************************************************************
5
+ */
6
+ &:not(.vjs-audio-only-mode) .vjs-custom-control-spacer {
7
+ display: block;
8
+ flex: auto;
9
+ }
@@ -0,0 +1,8 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Control: Control bar components
4
+ ******************************************************************************
5
+ */
6
+ .vjs-control {
7
+ height: 3em;
8
+ }
@@ -0,0 +1,10 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Error: Displayed when an error occurs
4
+ ******************************************************************************
5
+ */
6
+ .vjs-error-display .vjs-modal-dialog-content {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ }
@@ -0,0 +1,63 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Title bar : Defines the default player size for each break point
4
+ ******************************************************************************
5
+ */
6
+ &.vjs-layout-tiny {
7
+ font-size: 8px;
8
+ }
9
+
10
+ &.vjs-layout-x-small {
11
+ font-size: 10px;
12
+ }
13
+
14
+ &.vjs-layout-small {
15
+ font-size: 12px;
16
+ }
17
+
18
+ &.vjs-layout-medium {
19
+ font-size: 14px;
20
+ }
21
+
22
+ &.vjs-layout-large {
23
+ font-size: 16px;
24
+ }
25
+
26
+ &.vjs-layout-x-large {
27
+ font-size: 18px;
28
+ }
29
+
30
+ &.vjs-layout-huge {
31
+ font-size: 20px;
32
+ }
33
+
34
+ /*
35
+ ******************************************************************************
36
+ -- Time control
37
+ ******************************************************************************
38
+ */
39
+ // Avoid displaying the time controls if the source is a live stream and is small layouts
40
+ &:not(.vjs-layout-tiny, .vjs-layout-x-small, .vjs-live) .vjs-time-divider,
41
+ &:not(.vjs-layout-tiny, .vjs-layout-x-small, .vjs-live) .vjs-current-time,
42
+ &:not(.vjs-layout-tiny, .vjs-layout-x-small, .vjs-live) .vjs-duration {
43
+ display: block;
44
+ padding: 0;
45
+ font-weight: bold;
46
+ }
47
+
48
+ /*
49
+ ******************************************************************************
50
+ -- Progress control
51
+ ******************************************************************************
52
+ */
53
+ // Avoid hiding the progress control
54
+ &.vjs-layout-tiny,
55
+ &.vjs-layout-x-small {
56
+ .vjs-progress-control {
57
+ display: flex;
58
+ }
59
+ }
60
+
61
+ &.vjs-layout-x-small.vjs-audio-only-mode .vjs-custom-control-spacer {
62
+ display: none;
63
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Loading spinner: Displayed while the media is loading
4
+ ******************************************************************************
5
+ */
6
+ // Refer to https://github.com/videojs/video.js/pull/8369
7
+ & .vjs-loading-spinner {
8
+ border: 0.25em solid transparent;
9
+ }
10
+
11
+ .vjs-loading-spinner,
12
+ .vjs-loading-spinner {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ }
17
+
18
+ @keyframes vjs-spinner-fade {
19
+ 0% {
20
+ border-top-color: #333;
21
+ }
22
+ 20% {
23
+ border-top-color: #333;
24
+ }
25
+ 35% {
26
+ border-top-color: #fff;
27
+ }
28
+ 60% {
29
+ border-top-color: #333;
30
+ }
31
+ 100% {
32
+ border-top-color: #333;
33
+ }
34
+ }
@@ -0,0 +1,70 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Progress control: Contains the load progress, and play progress
4
+ ******************************************************************************
5
+ */
6
+ &:not(.vjs-audio-only-mode) .vjs-progress-control {
7
+ position: absolute;
8
+ bottom: 3em;
9
+ width: calc(100% - 2em);
10
+ height: 1em;
11
+ }
12
+
13
+ .vjs-progress-holder {
14
+ margin: 0;
15
+ }
16
+
17
+ .vjs-load-progress {
18
+ background: rgba(255, 255, 255, 0.3);
19
+ border-radius: 1em;
20
+
21
+ div {
22
+ background: transparent;
23
+ }
24
+ }
25
+
26
+ &.vjs-scrubbing,
27
+ &.vjs-seeking {
28
+ .vjs-play-progress .vjs-time-tooltip {
29
+ display: none;
30
+ }
31
+ }
32
+
33
+ .vjs-play-progress {
34
+ color: #af001e;
35
+ background: #af001e;
36
+ border-radius: 1em;
37
+ }
38
+
39
+ .vjs-play-progress::before {
40
+ font-size: 0px;
41
+ text-shadow: 0px 0px 1px #000;
42
+ }
43
+
44
+ .vjs-progress-control:hover {
45
+ .vjs-play-progress::before {
46
+ font-size: .9em;
47
+ }
48
+
49
+ // Avoids recalculation of time tooltip position
50
+ .vjs-time-tooltip {
51
+ right: 0% !important;
52
+ transform: translateX(50%);
53
+ }
54
+ }
55
+
56
+ .vjs-progress-holder:focus-visible {
57
+ .vjs-play-progress::before {
58
+ font-size: .9em;
59
+ }
60
+ }
61
+
62
+ .vjs-time-tooltip,
63
+ .vjs-mouse-display .vjs-time-tooltip {
64
+ top: -3em;
65
+ padding: 0.4em;
66
+ color: #fff;
67
+ font-weight: bold;
68
+ text-shadow: 1px 1px 3px #000, 1px 1px 2px #000;
69
+ background-color: transparent;
70
+ }
@@ -0,0 +1,9 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Slider: Provides base functionality for sliders like the seek bar
4
+ ******************************************************************************
5
+ */
6
+ .vjs-slider {
7
+ background-color: rgba(255, 255, 255, 0.3);
8
+ border-radius: 1em;
9
+ }
@@ -0,0 +1,8 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Text track display: Displays text track cues
4
+ ******************************************************************************
5
+ */
6
+ .vjs-text-track-display {
7
+ inset: 0 0 4em;
8
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Time control: Provides media-related time information
4
+ ******************************************************************************
5
+ */
6
+ .vjs-current-time {
7
+ margin-left: 1em;
8
+ }
9
+
10
+ .vjs-time-divider {
11
+ min-width: 1em;
12
+ text-align: center;
13
+ }
14
+
15
+ .vjs-remaining-time {
16
+ display: none;
17
+ }
18
+
19
+ &.vjs-audio-only-mode {
20
+ .vjs-current-time,
21
+ .vjs-time-divider,
22
+ .vjs-duration {
23
+ order: 1;
24
+ }
25
+
26
+ .vjs-duration {
27
+ margin-right: 1em;
28
+ }
29
+ }
@@ -0,0 +1,9 @@
1
+ /*
2
+ ******************************************************************************
3
+ -- Title bar: Displays the title and/or description of the current media
4
+ ******************************************************************************
5
+ */
6
+ .vjs-title-bar {
7
+ padding-bottom: 2em;
8
+ background: linear-gradient(rgba(0, 0, 0, 0.6) 0%, transparent 100%);
9
+ }