Search code examples
javascriptangularmediaelementmediaelement.js

mediaelement don't show play video after 2 sec. in angular 8


I have a problem with Mediaelement js for play video(ext.: .m3u8). My slider has multi video that could be play videos. My problem: When i clicked on play image in every video, only show 2 sec. video and after that my video is hide.

please help me :(

enter image description here


Solution

  • You are trying to access data on a computer (https://ir13.live21.ir) different from your host (http://localhost:4200). At this point some CORS security settings built into the browser kick in. They require the server to provide an Access-Control-Allow-Origin header that lists the allowed origins (i.e. hosts) that can access this resource. If you can't adapt the server's configuration you could use a proxy server to access the video files.