How To Add Embedded Links To Html 5 Videos
Solution 1:
You just post a youtube url like that
https://www.youtube.com/watch?v=kNpczxZLXo8
in the chat on https://discordapp.com/. Some time later, the chat window comes up with the embedded video from youtube.
This means they have special support for youtube links and as far as they do not explicitly provide a way to do the same for other websites, you do not have any chance to recreate the same functionality.
The options i see for you are: talk to support from discordapp.com or upload your stuff to youtube.
[Edit] After contacting support, we know now that they actually do explicitly support 3rdparties to embed videos and images.
The answer from https://discordapp.com/ support came quick and spot on:
We look for Facebook open graph tags, Twitter's card tags, or oembed more information:
Facebook Opengraph Example: Paste that link into chat window:
http://harry.x-dream-media.com/opengraph2.html
Code of opengraph2.html:
<!DOCTYPE html><html><metaproperty="og:type"content="article"><metaproperty="og:url"content="http://harry.x-dream-media.com/index.jsp"><metaproperty="fb:app_id"content="217926898242066"><metaproperty="og:video"content="http://harry.x-dream-media.com/test.m4v" /><metaproperty="og:video:width"content="640" /><metaproperty="og:video:height"content="426" /><metaproperty="og:video:type"content="application/mp4" /><metaproperty="og:video"content="http://harry.x-dream-media.com/test.m4v" /><metaproperty="og:video:type"content="video/mp4" /><metaproperty="og:video"content="http://harry.x-dream-media.com/test.m4v" /><metaproperty="og:video:type"content="text/html" /><metaproperty="og:title"content="title text"><metaproperty="og:image"content="http://harry.x-dream-media.com/test.png"/><metaproperty="og:description"content="description text"/><metaproperty="og:site_name"content="site name text"><body><styletype="text/css">video {
width:100%;
max-width:600px;
height:auto;
}
</style><videowidth="100%"src="http://harry.x-dream-media.com/test.m4v"controls>
Your browser does not support video
</video></body></html>
Twitter Example: http://harry.x-dream-media.com/twitter.html?random=123
Code of twitter.html:
<!DOCTYPE html><html><head><metacontent='text/html; charset=UTF-8'http-equiv='Content-Type' /><metaname="twitter:card"content="player" /><metaname="twitter:site"content="@harry" /><metaname="twitter:title"content="CUSTOM CONTENT" /><metaname="twitter:description"content="Custom Descriptions can be lengthy" /><metaname="twitter:image"content="https://peach.blender.org/wp-content/uploads/bbb-splash.png?x11217" /><metaname="twitter:player"content="https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4" /><metaname="twitter:player:width"content="320" /><metaname="twitter:player:height"content="180" /><metaname="twitter:player:stream"content="https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4" /><metaname="twitter:player:stream:content_type"content="video/mp4" /></head><!DOCTYPE html><html><body><styletype="text/css">video {
width:100%;
max-width:600px;
height:auto;
}
</style><body><videowidth="100%"controls><sourcesrc="http://harry.x-dream-media.com/test.m4v"type="video/mp4">
Your browser does not support video
</video></body></html>
Oembed Example:http://harry.x-dream-media.com/oembed.html?random=123
stay tuned...
Post a Comment for "How To Add Embedded Links To Html 5 Videos"