@eluvio/elv-player-js 1.0.72 → 1.0.73
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-lock.json +1 -1
- package/package.json +1 -1
- package/src/index.js +16 -4
package/package-lock.json
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -97,7 +97,9 @@ const DefaultParameters = {
|
|
|
97
97
|
playoutType: undefined,
|
|
98
98
|
context: undefined,
|
|
99
99
|
hlsjsProfile: true,
|
|
100
|
-
authorizationToken: undefined
|
|
100
|
+
authorizationToken: undefined,
|
|
101
|
+
clipStart: undefined,
|
|
102
|
+
clipEnd: undefined
|
|
101
103
|
}
|
|
102
104
|
},
|
|
103
105
|
playerOptions: {
|
|
@@ -282,7 +284,15 @@ export class EluvioPlayer {
|
|
|
282
284
|
async PlayoutOptions() {
|
|
283
285
|
const client = await this.Client();
|
|
284
286
|
|
|
285
|
-
let offeringURI;
|
|
287
|
+
let offeringURI, options = {};
|
|
288
|
+
if(this.sourceOptions.playoutParameters.clipStart || this.sourceOptions.playoutParameters.clipEnd) {
|
|
289
|
+
options.clip_start = parseFloat(this.sourceOptions.playoutParameters.clipStart || 0);
|
|
290
|
+
|
|
291
|
+
if(this.sourceOptions.playoutParameters.clipEnd) {
|
|
292
|
+
options.clip_end = parseFloat(this.sourceOptions.playoutParameters.clipEnd);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
286
296
|
if(this.sourceOptions.playoutParameters.directLink) {
|
|
287
297
|
const availableOfferings = await client.AvailableOfferings({
|
|
288
298
|
objectId: this.sourceOptions.playoutParameters.objectId,
|
|
@@ -302,7 +312,8 @@ export class EluvioPlayer {
|
|
|
302
312
|
|
|
303
313
|
if(!this.sourceOptions.playoutOptions) {
|
|
304
314
|
this.sourceOptions.playoutOptions = await client.PlayoutOptions({
|
|
305
|
-
offeringURI
|
|
315
|
+
offeringURI,
|
|
316
|
+
options
|
|
306
317
|
});
|
|
307
318
|
|
|
308
319
|
window.playoutOptions = this.sourceOptions.playoutOptions;
|
|
@@ -310,7 +321,8 @@ export class EluvioPlayer {
|
|
|
310
321
|
} else {
|
|
311
322
|
if(!this.sourceOptions.playoutOptions) {
|
|
312
323
|
this.sourceOptions.playoutOptions = await client.PlayoutOptions({
|
|
313
|
-
...this.sourceOptions.playoutParameters
|
|
324
|
+
...this.sourceOptions.playoutParameters,
|
|
325
|
+
options
|
|
314
326
|
});
|
|
315
327
|
|
|
316
328
|
window.playoutOptions = this.sourceOptions.playoutOptions;
|