I am trying to embed a youtube video on my app using the url in the firebase database. However, when I input my data in the database it changes the url and causes security frame errors.
the iframe html.
<iframe width="100%" height="100%" [src]="getSantizeUrl(feature.video)" frameborder="0" allowfullscreen></iframe>
example.
{title:"title", video:"https://www.youtube.com/embed/rtoxRg-kbt0"}
Once I click ENTER in firebase, it then changes to this…
{title:"title", video:"https://www.youtube.com/watch?v=vuc4dp0qHSc"}
As you can see the embed/
changed to watch?v=
.
This causes my application to show this error. Refused to display 'https://www.youtube.com/watch?v=vuc4dp0qHSc' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
Is there a way to stop firebase changing the url. Or is there an alternative for me to display videos on my app without getting that error?
Many thanks