mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
c200020e55
Adds #89
20 lines
607 B
TypeScript
20 lines
607 B
TypeScript
import { Component } from "@angular/core";
|
|
import { ActivatedRoute } from "@angular/router";
|
|
import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
|
|
|
|
@Component({
|
|
selector: "my-video-widget-wrapper",
|
|
templateUrl: "video.component.html",
|
|
styleUrls: ["video.component.scss"],
|
|
})
|
|
export class VideoWidgetWrapperComponent {
|
|
|
|
public embedUrl: SafeUrl = null;
|
|
|
|
constructor(activatedRoute: ActivatedRoute, sanitizer: DomSanitizer) {
|
|
let params: any = activatedRoute.snapshot.queryParams;
|
|
this.embedUrl = sanitizer.bypassSecurityTrustResourceUrl(params.url);
|
|
}
|
|
|
|
}
|