1 year ago

#381911

test-img

Tufail Ahmad

How can I make my HTML webpage that has HTML5 video to share the link to Facebook in order to play inline?

I have an HTML webpage that has HTML5 video. I have included all the necessary meta tags that are following:

<meta property="og:video" content="http://www.trending-videos.epizy.com/myvideo.mp4" />
<meta property="og:video:secure_url" content="https://www.trending-videos.epizy.com/myvideo.mp4" /> 
<meta property="og:video:type"       content="video/mp4" /> 
<meta property="og:video:width"      content="500" /> 
<meta property="og:video:height"     content="280" />

My full HTML code of the page is following:

<html>
    <head>
        <title>Video Title</title>
        <meta property="og:image" content="https://picsum.photos/200" />
        <meta property="og:video" content="http://www.trending-videos.epizy.com/myvideo.mp4" />
        <meta property="og:video:secure_url" content="https://www.trending-videos.epizy.com/myvideo.mp4" /> 
        <meta property="og:video:type"       content="video/mp4" /> 
        <meta property="og:video:width"      content="500" /> 
        <meta property="og:video:height"     content="280" />
    </head>
<body>
     
    <video width="320" height="240" controls>
        <source src="https://www.trending-videos.epizy.com/myvideo.mp4" type="video/mp4">
        <source src="movie.ogg" type="video/ogg">
        Your browser does not support the video tag.
    </video>
    
</body>
</html>

I have searched on stackoverflow and applied many solutions but none of them worked. Some of them are following:

Share html5 video on website to facebook

Embedding video player html5 iframe in facebook share like YouTubeEmbed html5 video player in facebook

Make og:video play inline whatsapp and facebook

And many more but none of them worked for me. I can see the og:image when I debug my link at Facebook Debugger

I just want to make my webpage to be shareable on facebook. And when I share the link to facebook, this video on my webpage should play in Facebook along with the thumbnail of the video. I don't want to show image thumbnail instead of the video thumbnail.

NOTE: I got Free SSL from zeroSSL. Now getting this message in Facebook debugger

Can't validate SSL Certificate. Either it is self-signed (which will cause browser warnings) or it is invalid.

javascript

php

html

facebook-graph-api

html5-video

0 Answers

Your Answer

Accepted video resources