Dieter Blancke
Dieter Blancke

Reputation: 82

How to embed videos in Discord

I'm working on a clips system that serves short video files. I'm trying to have these video's embedded inside Discord so people can just send the link inside a Discord chat and you can watch the video in an embedded video player.

As far as I gathered, this should be possible by using OpenGraph and serving an MP4 video (unless I need my own video player?)

I am currently providing the following OpenGraph tags, and I'm wondering if I'm doing something wrong:

<meta property="og:site_name" content="Outplays">
<meta property="og:url" content="https://outplays.eu/Q5THkfY3">
<meta property="og:type" content="video.other">
<meta property="og:title" content="Mini rengar xD">
<meta property="og:image" content="https://outplays.eu/Q5THkfY3/thumbnail.png">
<meta property="og:video" content="https://outplays.eu/Q5THkfY3/video">
<meta property="og:video:type" content="video/mp4">
<meta property="og:video:secure_url" content="https://outplays.eu/Q5THkfY3/video">
<meta property="og:video:height" content="720">
<meta property="og:video:width" content="1280">
<meta property="og:image:height" content="720">
<meta property="og:image:width" content="1280">

(this is for the following clip: https://outplays.eu/Q5THkfY3)

But once sent in Discord, it comes out like this, without an inline video player:

1

At the same time I just found out through Sentry that when I send this link in Discord, I get an java.io.IOException: Connection reset by peer exception thrown.

I've spent hours trying to figure this out and googling about it but I can't really seem to find why it doesn't work.

Upvotes: 1

Views: 38723

Answers (0)

Related Questions