@eluvio/elv-player-js 1.0.84 → 1.0.86
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.
- package/package.json +1 -1
- package/src/PlayerControls.js +4 -4
- package/src/index.js +4 -2
- package/src/static/stylesheets/player.scss +11 -9
package/package.json
CHANGED
package/src/PlayerControls.js
CHANGED
|
@@ -107,7 +107,7 @@ const Time = (time, total) => {
|
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
class PlayerControls {
|
|
110
|
-
constructor(target, video, playerOptions, posterUrl) {
|
|
110
|
+
constructor(target, video, playerOptions, posterUrl, className) {
|
|
111
111
|
this.target = target;
|
|
112
112
|
this.video = video;
|
|
113
113
|
this.playerOptions = playerOptions;
|
|
@@ -128,7 +128,7 @@ class PlayerControls {
|
|
|
128
128
|
this.controlsHover = false;
|
|
129
129
|
this.progressHidden = false;
|
|
130
130
|
|
|
131
|
-
this.InitializeControls();
|
|
131
|
+
this.InitializeControls(className);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
FadeOut(key, elements, delay=250, callback) {
|
|
@@ -251,7 +251,7 @@ class PlayerControls {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
InitializeControls() {
|
|
254
|
+
InitializeControls(className="") {
|
|
255
255
|
this.target.setAttribute("tabindex", "0");
|
|
256
256
|
|
|
257
257
|
if(this.playerOptions.watermark) {
|
|
@@ -385,7 +385,7 @@ class PlayerControls {
|
|
|
385
385
|
const controls = CreateElement({
|
|
386
386
|
parent: this.target,
|
|
387
387
|
type: "div",
|
|
388
|
-
classes: ["eluvio-player__controls"]
|
|
388
|
+
classes: ["eluvio-player__controls", className]
|
|
389
389
|
});
|
|
390
390
|
|
|
391
391
|
this.controls = controls;
|
package/src/index.js
CHANGED
|
@@ -114,10 +114,11 @@ const DefaultParameters = {
|
|
|
114
114
|
settings: EluvioPlayerParameters.settings.ON,
|
|
115
115
|
posterUrl: undefined,
|
|
116
116
|
className: undefined,
|
|
117
|
+
controlsClassName: undefined,
|
|
117
118
|
hlsjsOptions: undefined,
|
|
118
119
|
dashjsOptions: undefined,
|
|
119
120
|
// eslint-disable-next-line no-unused-vars
|
|
120
|
-
playerCallback: ({videoElement, hlsPlayer, dashPlayer, posterUrl}) => {},
|
|
121
|
+
playerCallback: ({player, videoElement, hlsPlayer, dashPlayer, posterUrl}) => {},
|
|
121
122
|
errorCallback: (error) => {
|
|
122
123
|
// eslint-disable-next-line no-console
|
|
123
124
|
console.error("ELUVIO PLAYER: Error");
|
|
@@ -540,7 +541,7 @@ export class EluvioPlayer {
|
|
|
540
541
|
|
|
541
542
|
const controlsPromise = this.PosterUrl().then(posterUrl => {
|
|
542
543
|
this.posterUrl = posterUrl;
|
|
543
|
-
this.controls = new PlayerControls(this.target, this.video, this.playerOptions, posterUrl);
|
|
544
|
+
this.controls = new PlayerControls(this.target, this.video, this.playerOptions, posterUrl, this.playerOptions.controlsClassName);
|
|
544
545
|
});
|
|
545
546
|
|
|
546
547
|
if(this.clientOptions.promptTicket && !this.clientOptions.ticketCode) {
|
|
@@ -732,6 +733,7 @@ export class EluvioPlayer {
|
|
|
732
733
|
|
|
733
734
|
if(this.playerOptions.playerCallback) {
|
|
734
735
|
this.playerOptions.playerCallback({
|
|
736
|
+
player: this,
|
|
735
737
|
videoElement: this.video,
|
|
736
738
|
hlsPlayer,
|
|
737
739
|
dashPlayer,
|
|
@@ -592,11 +592,13 @@ $button-height: 35px;
|
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
.eluvio-player__controls__button {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
595
|
+
&:not(.eluvio-player__big-play-button) {
|
|
596
|
+
height: CALC(#{$button-height} * 0.9);
|
|
597
|
+
max-height: CALC(#{$button-height} * 0.9);
|
|
598
|
+
max-width: CALC(#{$button-height} * 0.9);
|
|
599
|
+
min-height: CALC(#{$button-height} * 0.9);
|
|
600
|
+
min-width: CALC(#{$button-height} * 0.9);
|
|
601
|
+
}
|
|
600
602
|
}
|
|
601
603
|
|
|
602
604
|
.eluvio-player__controls__volume-container {
|
|
@@ -604,10 +606,10 @@ $button-height: 35px;
|
|
|
604
606
|
}
|
|
605
607
|
|
|
606
608
|
.eluvio-player__big-play-button {
|
|
607
|
-
max-height:
|
|
608
|
-
max-width:
|
|
609
|
-
min-height:
|
|
610
|
-
min-width:
|
|
609
|
+
max-height: 55px;
|
|
610
|
+
max-width: 55px;
|
|
611
|
+
min-height: 55px;
|
|
612
|
+
min-width: 55px;
|
|
611
613
|
}
|
|
612
614
|
|
|
613
615
|
.eluvio-player__ticket-modal {
|