Video not loading in angular

Viewed 1376

I am working on a project in angular, I have a component which should run a video in full screen and loop only once with autoplay, I tried to follow this link. But it the video is not working inside angular, I have the video in assets/videos folder.

This is my html

<video autoplay muted id="myVideo">
   <source src="/assets/videos/copro.mp4" type="video/mp4">
   Your browser does not support HTML5 video.
 </video>
</div>

This is the CSS I used

#myVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
  }

Thanks for the help in advance :)

2 Answers

you should use prefix to see it. you need to write correct way. You says that your asset folder insede your component folder same level with your html.

<source src="../../assets/videos/copro.mp4" type="video/mp4">

This may help you. just change the video URL in

data-ephox-embed-iri="https://youtu.be/"

src="https://www.youtube.com/embed/" for embedded

<div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.25%; max-width: 1280px; max-height: 720px;" data-ephox-embed-iri="https://youtu.be/aYPaso1zHow"><iframe style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" src="https://www.youtube.com/embed/aYPaso1zHow?rel=0" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div>
Related