iMessage allows rich previews, including embedded videos, in iMessage chats. Traditionally, the open graph tags og:video
or og:video_url
has an mp4 video url for it's value. However, YouTube has the following tags:
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="https://www.youtube.com/embed/NUTGr5t3MoY">
<meta property="og:video:type" content="text/html">
Instead of an mp4 file, YouTube using og:video:type
text/html with og:video_url
of an HTML page (with a <video>
embedded on it).
I seem unable to replicate this behavior. If I don't specify an mp4 file url, the preview fails to show a video. I am wondering how to replicate https://www.youtube.com/embed/NUTGr5t3MoY
's behavior.
I've also taken a look at Embedding html5 video with opengraph on facebook, however it is about Facebook not iMessage, the answer seems outdated, and the question lacks specific details.