Jump to content

How can I support embedding (Discord, Twitter) on my custom video site?

Hi. I'm trying to create a "video site template" for people who want to upload videos to their friends, or audience, but not use a 3rd party website. I've managed to make a system that is pretty simple to use, and works pretty well too, but I can't embed the video on apps like Discord, Twitter, or Facebook. I actually have no idea how those apps do their embedding thing, or if it's possible for me to create my own interface for them.

Can someone who is more knowledgeable help me out?
I'll show off what I got so far. It's at http://jackomail.com/videos/videotest/

 

If giving that link is frowned upon at all please let me know and I will remove it.

 

For those wondering I've been into programming for around 10 years, and I'm trying to do this project because I'm getting a little sick of how YouTube does things. I want a place where I can manage my own uploads, and handle my own DMCAs if need be. I also want other people to start doing this so someday maybe I can stop using YouTube to watch things too.

Link to comment
Share on other sites

Link to post
Share on other sites

Hey there,

services like Discord look for meta tags in the sites HTML you want to embed.

For example, Discord looks for multiple Sources.

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, svfox said:

Hey there,

services like Discord look for meta tags in the sites HTML you want to embed.

For example, Discord looks for multiple Sources.

 

Awesome, and thank you for your help. I managed to get a title and description to work on Discord, but not get the video on there. I was first trying to use this page: http://jackomail.com/videos/videotest/oembed.htm

 

But then I noticed that I could use a .json object, and a link tag. That one didn't embed anything though: http://jackomail.com/videos/videotest/

The oembed.json is here:
http://jackomail.com/videos/videotest/oembed.json

Any chance anyone knows what I'm doing wrong?

oembed.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

You must add the Code into the HTML File of your Page.

From AT. :x

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Required said:

You must add the Code into the HTML File of your Page.

I've added all the meta tags to the head, and the video is in the body. Normally meta tags don't go in the body, so I'm not sure what you mean. Sorry.

Link to comment
Share on other sites

Link to post
Share on other sites

Open the Page in an Editor and Copy the Code into the right Place and Upload the File to your Server.
You can see a Demo on my Page: http://refx.at/

There I copy the Code for an Ads Server into an HTML Page.

From AT. :x

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, Required said:

Open the Page in an Editor and Copy the Code into the right Place and Upload the File to your Server.
You can see a Demo on my Page: http://refx.at/

There I copy the Code for an Ads Server into an HTML Page.

Umm, it's a little hard to understand what to do, but I tried posting that url " http://refx.at/ " into Discord to see the demo, but it didn't embed anything. I'm also not seeing any code in there to embed something?

In any event I've managed to get Discord to see my oembed.json file from my page at http://jackomail.com/videos/videotest/ but no matter what I do for the "html" part it doesn't embed the video, and I also can't get anything but a really small thumbnail.

Link to comment
Share on other sites

Link to post
Share on other sites

Ok which CMS did you use? Joomla, phpBB, drupal,...?

From AT. :x

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Required said:

Ok which CMS did you use? Joomla, phpBB, drupal,...?

I'm not using a CMS.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Required said:

What else plain old HTML?!

Pretty much. HTML, and a json object.

Link to comment
Share on other sites

Link to post
Share on other sites

it seem that your page is still working.

From AT. :x

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Required said:

it seem that your page is still working.

I'm going to go out on a limb here and say we're talking about 2 different things...

Link to comment
Share on other sites

Link to post
Share on other sites

I just looked at the oEmbed Specs and found something interesting for you!

 

https://oembed.com/

@ 5. -> 5.1

 

{
	"version": "1.0",
	"type": "video",
	"provider_name": "YouTube",
	"provider_url": "http://youtube.com/",
	"width": 425,
	"height": 344,
	"title": "Amazing Nintendo Facts",
	"author_name": "ZackScott",
	"author_url": "http://www.youtube.com/user/ZackScott",
	"html":
		"<object width=\"425\" height=\"344\">
			<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
			<param name=\"allowFullScreen\" value=\"true\"></param>
			<param name=\"allowscriptaccess\" value=\"always\"></param>
			<embed src=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"
				type=\"application/x-shockwave-flash\" width=\"425\" height=\"344\"
				allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>
		</object>",
}

look at the html property, just embed your video into the oembed :)

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/25/2018 at 1:06 AM, svfox said:

I just looked at the oEmbed Specs and found something interesting for you!

 

https://oembed.com/

@ 5. -> 5.1

 


{
	"version": "1.0",
	"type": "video",
	"provider_name": "YouTube",
	"provider_url": "http://youtube.com/",
	"width": 425,
	"height": 344,
	"title": "Amazing Nintendo Facts",
	"author_name": "ZackScott",
	"author_url": "http://www.youtube.com/user/ZackScott",
	"html":
		"<object width=\"425\" height=\"344\">
			<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
			<param name=\"allowFullScreen\" value=\"true\"></param>
			<param name=\"allowscriptaccess\" value=\"always\"></param>
			<embed src=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"
				type=\"application/x-shockwave-flash\" width=\"425\" height=\"344\"
				allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>
		</object>",
}

look at the html property, just embed your video into the oembed :)

Thanks, but I actually can't even test this. I managed to get my embedding to look like it does in the attached pic, but for some reason nothing I change gets seen by Discord. I uploaded a index3.htm file which links to a oembed3.json file. Even so, Discord keeps seeing my "author_name" as whats in the image, and not the much more colorful value I added to reflect my current feelings on Discord "Hello, world! **** Discord!" So since Discord has decided my site will remain the same until the end of time I seem to just be SOL.

I'm just going to bang my head on my keyboard as hard as I can for a few hours while chanting the last part of my "author_name" as loud as I can.  [snipped] <-- Decided to remove this part.

currentembed.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×