Jump to content
digitex

video embed through API

Recommended Posts

I'm working on a site that's using a background video on the home page. I've run into a problem though. I created a file field to hold the video and call it in with the following:

<video class="video-background" loop no-controls autoplay src="<?php echo $hp->video->url;?>" poster=""></video>

This doesn't work and throws this error: HTTP load failed with status 403. BUT when I upload the video to a sub-directory in Templates and use this code:

<video class="video-background" loop no-controls autoplay src="<?php echo $config->urls->templates?>css/images/WB5.m4v" poster=""></video>

It works. I expect it's an htaccess thing but I can't understand why since any other file works fine why is video different and what do I need to do to get around it?

Share this post


Link to post
Share on other sites
13 hours ago, Zeka said:

Try to use $hp->video->httpUrl.

Why?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...