Skip to content

Panel will now pass subfolder to the player if there is one set. #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/app.page/app.definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export class AppSettings {
public apnKeyId: string,
public apnPrivateKey: string,
public apnsServer: string,
public subFolder: string,

) {}
}
Expand Down
13 changes: 10 additions & 3 deletions src/app/app.page/app.page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -959,7 +966,7 @@ export class AppPageComponent implements OnInit, OnDestroy, AfterViewInit {
}

embeddedPlayer = new WebPlayer({
streamId: streamId,
streamId: streamIdForPlayer,
httpBaseURL: httpBaseUrlForStream,
token: tokenId,
playOrder: playOrderLocal,
Expand Down