@eluvio/elv-player-js 1.0.127 → 1.0.128
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 +1 -1
- package/src/index.js +16 -4
package/package.json
CHANGED
package/src/PlayerControls.js
CHANGED
package/src/index.js
CHANGED
|
@@ -21,7 +21,8 @@ export const EluvioPlayerParameters = {
|
|
|
21
21
|
},
|
|
22
22
|
playerProfile: {
|
|
23
23
|
DEFAULT: "default",
|
|
24
|
-
LOW_LATENCY: "low_latency"
|
|
24
|
+
LOW_LATENCY: "low_latency",
|
|
25
|
+
CUSTOM: "custom"
|
|
25
26
|
},
|
|
26
27
|
drms: {
|
|
27
28
|
FAIRPLAY: "fairplay",
|
|
@@ -157,6 +158,18 @@ export class EluvioPlayer {
|
|
|
157
158
|
this.warnings = false;
|
|
158
159
|
this.reloads = [];
|
|
159
160
|
|
|
161
|
+
try {
|
|
162
|
+
if(
|
|
163
|
+
parameters.playerOptions.hlsjsOptions &&
|
|
164
|
+
Object.keys(parameters.playerOptions.hlsjsOptions).length > 0
|
|
165
|
+
) {
|
|
166
|
+
this.customHLSOptions = parameters.playerOptions.hlsjsOptions;
|
|
167
|
+
parameters.playerOptions.playerProfile = EluvioPlayerParameters.playerProfile.CUSTOM;
|
|
168
|
+
}
|
|
169
|
+
} catch(error) {
|
|
170
|
+
this.Log(error, true);
|
|
171
|
+
}
|
|
172
|
+
|
|
160
173
|
this.DetectRemoval = this.DetectRemoval.bind(this);
|
|
161
174
|
|
|
162
175
|
this.Initialize(target, parameters);
|
|
@@ -802,12 +815,11 @@ export class EluvioPlayer {
|
|
|
802
815
|
playoutUrl.searchParams.delete("authorization");
|
|
803
816
|
|
|
804
817
|
const profileSettings = (PlayerProfiles[this.playerOptions.playerProfile] || {}).hlsSettings || {};
|
|
805
|
-
const customProfileSettings = this.playerOptions.playerProfile ===
|
|
818
|
+
const customProfileSettings = this.playerOptions.playerProfile === EluvioPlayerParameters.playerProfile.CUSTOM ? this.customHLSOptions : {};
|
|
806
819
|
|
|
807
820
|
this.hlsOptions = {
|
|
808
821
|
capLevelToPlayerSize: this.playerOptions.capLevelToPlayerSize,
|
|
809
822
|
...profileSettings,
|
|
810
|
-
...(this.playerOptions.hlsjsOptions || {}),
|
|
811
823
|
...customProfileSettings
|
|
812
824
|
};
|
|
813
825
|
|
|
@@ -933,7 +945,7 @@ export class EluvioPlayer {
|
|
|
933
945
|
}
|
|
934
946
|
};
|
|
935
947
|
|
|
936
|
-
if(key ===
|
|
948
|
+
if(key === EluvioPlayerParameters.playerProfile.CUSTOM) {
|
|
937
949
|
this.controls.ShowHLSOptionsForm({
|
|
938
950
|
hlsOptions: this.hlsOptions,
|
|
939
951
|
SetPlayerProfile,
|