How to access the webdav folder from html (video streaming)
I have set up a webdav folder using this tutorial: https://www.digitalocean.com/community/tutorials/how-to-configure-webdav-access-with-apache-on-ubuntu-14-04
To confuse issues I have multiple sites on the server. I am able to record a live stream to the files webdav folder, located at /var/www/webdav. But I am unable to access it within the HTML using video.js, and with a video js plugin that supports HLS.
My script files are:
<script src="js/video.js"></script> <script src="js/videojs-http-streaming.min.js"></script> <script> var player = videojs('vid1'); player.play(); </script> My html: <video-js id=vid1 width=600 height=300 class="vjs-default-skin" controls> <source src="htttp://IPADRESS/webdav.m3u8" type="application/x-mpegURL"> </video-js>
I am getting an error which says:
ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported.
I have tried multiple ways of adding:
Header set Access-Control-Allow-Origin "example.com"
And nothing is working. After many hours of struggling to get a live stream working, I would be extremely grateful for some ideas of what I can do.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×