From e041e483887f2237c6156078993d8bfe3462e9de Mon Sep 17 00:00:00 2001 From: master312 Date: Tue, 3 Jun 2025 16:12:22 +0200 Subject: [PATCH] Panel will now pass subfolder to the player if there is one set. --- src/app/app.page/app.definitions.ts | 1 + src/app/app.page/app.page.component.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/app/app.page/app.definitions.ts b/src/app/app.page/app.definitions.ts index de8021f..506bcf4 100644 --- a/src/app/app.page/app.definitions.ts +++ b/src/app/app.page/app.definitions.ts @@ -254,6 +254,7 @@ export class AppSettings { public apnKeyId: string, public apnPrivateKey: string, public apnsServer: string, + public subFolder: string, ) {} } diff --git a/src/app/app.page/app.page.component.ts b/src/app/app.page/app.page.component.ts index b1fb827..7ff0221 100644 --- a/src/app/app.page/app.page.component.ts +++ b/src/app/app.page/app.page.component.ts @@ -940,12 +940,19 @@ export class AppPageComponent implements OnInit, OnDestroy, AfterViewInit { animation: false, showCloseButton: true, onOpen: () => { + + // Prepend subfolder to streamId if configured (and not VOD - dose not contain dot) + var streamIdForPlayer = streamId; + if (this.appSettings && this.appSettings.subFolder && this.appSettings.subFolder.trim() !== '' && !streamId.includes(".")) { + streamIdForPlayer = this.appSettings.subFolder + '/' + streamId; + } + //the error in this callback does not show up in browser console. if (hasSubTracks) { //play with multirack player var iframe = $('#' + objectId); - - iframe.prop('src', HTTP_SERVER_ROOT + 'multitrack-play.html?id=' + streamId + '&app='+this.appName+'&token='+tokenId); + + iframe.prop('src', HTTP_SERVER_ROOT + 'multitrack-play.html?id=' + streamIdForPlayer + '&app='+this.appName+'&token='+tokenId); //multitrack-play.html is deployed in the solution in the enterprise edition CI pipeline //Even if it's not a good solution, it helps us play the multitrack streams. @@ -959,7 +966,7 @@ export class AppPageComponent implements OnInit, OnDestroy, AfterViewInit { } embeddedPlayer = new WebPlayer({ - streamId: streamId, + streamId: streamIdForPlayer, httpBaseURL: httpBaseUrlForStream, token: tokenId, playOrder: playOrderLocal,