3

I am trying to have a video with the url being from other site on my Angular 5 application. The video is not being played.

var myUrl = "example.com/myvideo.mp4";
var safeUrl = this._sanitizer.bypassSecurityTrustUrl(myUrl);

this.videoUrl = safeUrl;

In the view I am trying to add the src to videoUrl.

James Z
  • 12,209
  • 10
  • 24
  • 44
Ram
  • 51
  • 6

1 Answers1

1

My bad, I had used value binding instead of property binding which solved the issue.

Ram
  • 51
  • 6