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.

0

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.