I am using IONIC and retrieving the URL from the server, I can see the URL when using <p>
tags as follows:
<p>{{URL}}</p>
but when I try the following:
<video width="320" height="240" controls>
<source src="{{URL}}" type="video/mp4">
</video>
I get an error (Get
request error) that says "Unsafe url"
I find people suggesting to use sanitizer.bypassSecurityTrustResourceUrl
like in this page but unfortunately, it didn't work for me
NOTE: the video is located inside the project folders, and the URL is retrieved from the database.
How can I enable the <video>
tag to play videos from the project directory?
It can be permission issue, try to change the project directory to a different drive, for example, if it is located in "C" drive, move it elsewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With