Video-JS autoplay attribute is not working [duplicate]

I have an HTML video tag with video-JS (version 5.20.5) and this is my code:

<video id="my-video" class="video-js" controls="" autoplay="true" preload="auto" style="width:1006px;height:562px;" >
    <source id="mysource" src="{$movie}" type='video/mp4' controls='false' />
    <p class="vjs-no-js">
        To view this video please enable JavaScript, and consider upgrading to a web browser that
        <a href="" target="_blank">supports HTML5 video</a>

I need to force it to autoplay but am not being too much lucky. I tried autoplay="true"; autoplay="" and autoplay="autoplay".

No one of these worked.

I even tried only autoplay but since I am using it into a XML package it will crash my page with the error:

The expected token is '='

Any idea?

Read more here:

Content Attribution

This content was originally published by Yan Kleber at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: