Skip to content

Commit

Permalink
Merge pull request #23 from bharathravi-in/scrom-fix-cbp
Browse files Browse the repository at this point in the history
Scrom fix cbp
  • Loading branch information
vishnubansaltarento authored Aug 22, 2024
2 parents 9fc4deb + 20eb6b9 commit b9d8066
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class AppTocHomeComponent implements OnInit, OnDestroy, AfterViewChecked,

if (this.content) {
const contentName = this.content.name.trim()
if(this.content.creatorContacts) {
if (this.content.creatorContacts) {
this.contentCreatorData = this.handleParseJsonData(this.content.creatorContacts)

}
Expand Down
40 changes: 23 additions & 17 deletions project/ws/viewer/src/lib/plugins/html/html.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
// a.click()
// URL.revokeObjectURL(objectUrl)
// })
if (this.htmlContent.mimeType !== 'text/x-url' && this.htmlContent.mimeType !== 'video/x-youtube') {
if (this.htmlContent &&
this.htmlContent.mimeType !== 'text/x-url' &&
this.htmlContent.mimeType !== 'video/x-youtube') {
// if (this.htmlContent.status === 'Live') {
// this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// // `https://igot.blob.core.windows.net/content/content/html/${this.htmlContent.identifier}-latest/index.html`
Expand All @@ -358,26 +360,30 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
// `${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
// )
// }
if (this.htmlContent.streamingUrl && this.htmlContent.initFile) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line:max-line-length
`${this.generateUrl(this.htmlContent.streamingUrl)}/${this.htmlContent.initFile}?timestamp='${new Date().getTime()}`
)
if (this.htmlContent.streamingUrl.includes(environment.azureHost)) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(this.htmlContent.streamingUrl)
} else {
if (environment.production) {
if (this.htmlContent.streamingUrl && this.htmlContent.initFile) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line: max-line-length
// `${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
// tslint:disable-next-line: max-line-length
`${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
// tslint:disable-next-line:max-line-length
`${this.generateUrl(this.htmlContent.streamingUrl)}/${this.htmlContent.initFile}?timestamp='${new Date().getTime()}`
)
} else {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line: max-line-length
// `${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
// tslint:disable-next-line: max-line-length
`/abcd/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
)
if (environment.production) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line: max-line-length
// `${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
// tslint:disable-next-line: max-line-length
`${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
)
} else {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line: max-line-length
// `${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
// tslint:disable-next-line: max-line-length
`/abcd/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-snapshot/index.html?timestamp='${new Date().getTime()}`
)
}
}
}
} else {
Expand Down

0 comments on commit b9d8066

Please sign in to comment.