By calid
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @calid,
Are you able to access the htttp://IPADRESS/webdav.m3u8 video directly if you visit it via your browser?
If not, what I could suggest is using a subdomain name and creating a new separate virtual host that maps to the /var/www/webdav folder so that then you could use the subdomain name in your JavaScript file.
Let me know how it goes. Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.