// CodeB softphone -- Angular wrapper (iframe embed) // Docs: https://www.aloaha.com/softphone-embed-cookbook.html // European Digital Identity Wallet: embedded page handles OIDC autofill. import { Component, Input } from "@angular/core"; import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser"; @Component({ selector: "codeb-softphone", template: ` ` }) export class CodeBSoftphoneComponent { @Input() tenantOrigin = "https://phone.your-tenant.example"; @Input() engine: "sipjs" | "jssip" | "native" = "sipjs"; @Input() width = 820; @Input() height = 1100; safeSrc: SafeResourceUrl; constructor(private sanitizer: DomSanitizer) { this.safeSrc = this.buildSrc(); } private buildSrc(): SafeResourceUrl { const page = this.engine === "jssip" ? "jssip.html" : this.engine === "native" ? "office.html" : "sip-js.html"; return this.sanitizer.bypassSecurityTrustResourceUrl( `${this.tenantOrigin}/${page}` ); } }