diff --git a/src/app/xtream/vod-details/safe.pipe.ts b/src/app/xtream/vod-details/safe.pipe.ts new file mode 100644 index 000000000..d91d2fcec --- /dev/null +++ b/src/app/xtream/vod-details/safe.pipe.ts @@ -0,0 +1,11 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import { DomSanitizer } from '@angular/platform-browser'; + +@Pipe({ name: 'safe', standalone: true }) +export class SafePipe implements PipeTransform { + constructor(private sanitizer: DomSanitizer) {} + + transform(url: string) { + return this.sanitizer.bypassSecurityTrustResourceUrl(url); + } +} diff --git a/src/app/xtream/vod-details/vod-details.component.html b/src/app/xtream/vod-details/vod-details.component.html index ce1068d46..0995035fd 100644 --- a/src/app/xtream/vod-details/vod-details.component.html +++ b/src/app/xtream/vod-details/vod-details.component.html @@ -85,3 +85,18 @@ +
+

YouTube Trailer

+ +
diff --git a/src/app/xtream/vod-details/vod-details.component.ts b/src/app/xtream/vod-details/vod-details.component.ts index 25e4adf36..fa5ce5b4a 100644 --- a/src/app/xtream/vod-details/vod-details.component.ts +++ b/src/app/xtream/vod-details/vod-details.component.ts @@ -13,13 +13,14 @@ import { ActivatedRoute } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { XtreamVodDetails } from '../../../../shared/xtream-vod-details.interface'; import { PlaylistsService } from '../../services/playlists.service'; +import { SafePipe } from './safe.pipe'; @Component({ selector: 'app-vod-details', templateUrl: './vod-details.component.html', styleUrls: ['../detail-view.scss'], standalone: true, - imports: [MatButtonModule, NgIf, MatIconModule, TranslateModule], + imports: [MatButtonModule, NgIf, MatIconModule, SafePipe, TranslateModule], }) export class VodDetailsComponent implements OnInit { @Input({ required: true }) item: XtreamVodDetails;