Adding video to text areas of presentation page

  • Author
    Posts
  • #36064
    Juan P

    I found the way to post a video, in my case an mp4 video, using the video tag; the problem is that the template elliminates the “source” tags, and that’s why it does not load, so I had to use javascript to insert, dynamically, the tag, but as it is also forbiddeen in javascript, i had to past the code as follows:

    in the Javascript section – the engine will remove the whole source tag, so i added two tags, the inner one wil be elliminated leaving the other one valid:

    document.getElementById(“HomeVideo”).innerHTML = “<source <source src=”VideoPATH/my video.mp4″ type=”video/mp4″> src=’VideoPATH/my video.mp4′ type=’video/mp4′>”;

    Note: replace the cahracter ” with ‘

    and in the text section you must add the video tag with the ID that will be used – example:
    <video id=”HomeVideo” width=”1024″ height=”748″ autoplay muted loop>
    </video>

    I hope you find this useful

    JP

    #36149
    Zed
    Cryout Creations mastermind

    Or use a widget as shortcode plugin, place your HTML in a text widget in a custom widget area and then load that widget in the presentation page using the shortcodes provided by the plugin.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Adding video to text areas of presentation page’ is closed to new replies.