I'm trying to understand the EMBED component

I can make a YouTune video viewable with the Video component but not with the embed component. Is this because of YourTube or because of Glide?

And is there a way to embed tweets? Not via the Embed component, it seems

It is possible to embed a Youtube video using the Webview component, you just need to use a slightly modified URL format:

https://www.youtube.com/embed/ID

Where ID is the video ID.

3 Likes

Nice to know, it would be so nice if Glide could have context based help!
Do you know if Twitter is possible too? Or Instagram?

Well, this is really nothing to do with Glide.

Both Twitter & Instagram require authentication, so I suspect not.

Well, if you can use in Glide in one option (video) one url and in the webview you need another one, i think it wouldnt be strange if Glide helped users with that.

You can only embed YT videos if the owner allows them to be embedded. I have many videos on my channel that I prevent from this to protect them from being shown where I don’t have control of the context.

2 Likes

The embed option is pretty open ended, where you can do what you want and embed millions of other websites, provided they allow embedding and you know the proper way to embed each one. It’s up to you to find out if a website can be embedded and the proper way to embed them based on each website’s rules. I don’t think it’s reasonable for glide to vet every possible website and give you instructions for each one.

The video component, on the other hand, is much more finite and controlled. For most videos, such as those hosted by glide, It’s really a standard HTML element as opposed to a component made by glide. However, YouTube videos are a little different and I think glide has some custom code that does you a favor and converts a youtube url to the embed url and essentially creates an iframe webview in place of the standard html video player (still not a glide component). By using a video component, glide is actually doing the work for you of determining the correct iframe embed code to display the youtube video.

What you do with an embed webview is kind of up to you. It’s handy if you need it, but the nature of embedding requires some understanding of web code and html.

6 Likes

I can confirm this. Tried doing it myself in Pages with HTML and it didn’t work. The underlying code of a proper YouTube embed is way more complex.

1 Like

In my case I tested Video-component and Webview-component with the same url. One worked, the other didnt. But @Darren_Murphy explained why.

1 Like

And I don’t think it’s reasonable to do as if YouTube is one of the million websites people want to embed :slight_smile: YouTube is one of the most popular websites in the world.

To be honest, I didn’t do a whole lot of research. I saw your question and I was curious, so I had a quick Google and found this. I tested it with a couple of Youtube videos in a Pages webview component and it worked for both. But I suspect that I just got lucky. As others have pointed out in this thread, that probably can’t be guaranteed to work for all Youtube videos.

But even then, wouldnt it be nice to have an i button or ? button that said something like: ‘We make embedding external content possible, but it only works if the content-provider lets us. A lot of sites work, others don’t. It’s a matter of trying.’

Have you seen this?

2 Likes

Darren, Are you the creator of this Page? Looks Awesome!

No, it’s nothing to do with me. I assume that somebody in the Glide team created it.

1 Like

I haven’t! I am going to look, thanks!

This is all I need :wink: The big platforms explained. Thanks!

Oh no… The irony :smiling_face_with_tear:

5 Likes

haha yes, I saw that :rofl:

2 Likes

The least that the Glide team can do is to allow Glide pages or Apps or their websites to be embeddable within Glide Apps or Pages. I don’t think the “security issue” can hold water in that case unless there is more to it than just security reasons :thinking:

3 Likes