Video Education: What is an iframe?
An iframe is someone else's
website on your website.
You make a beautiful website,
but you just need something
that you don't have.
So you can use something
called an iframe to punch
a hole in your website and
show somebody else's website.
If you're using an iframe,
maybe that's the only thing
you can use, or maybe you
are working in a low code
or no code environment.
But you've also gotta be
careful when using an iframe.
This is at the end of the
day, somebody else's website.
They can make changes
without you knowing and
it'll pop up on your website.
Maybe that's good because you
don't want to maintain that
part of your website, but it
is something to keep in mind.
You should also know it's an
early web technology, which
means that there's some kind
of weird limitations about
how you can style it with CSS.
Just expect to deal
with some CSS pain.
When do you want to punch
a hole in your website to
somebody else's website?
When somebody else is better
at something than you are.
For example, if you don't
wanna deal with video players.
Maybe use an iframe for
somebody else's video player.
So how can you use
an iframe to add a
video to your website?
I'm so glad you asked.
Here at Mux, we now
have an iframe option.
If you've heard of Mux before,
you may know that we already
offer our very robust Mux
Player as a web component.
This allows you to host
your player directly
from your website.
But we heard from some
of you that you want an
iframe and to you we say,
"we have an iframe." Just
upload your video to Mux
and copy this code snippet
and we've got some secret
Mux sauce that makes the
iframe version of the player
just a little bit nicer.
We can do a little
bit more work for you.
Lemme tell you about that.
So this is Mux Player.
You can't even tell
that this isn't coming
from your website.
This is coming
from our website.
This is coming from
player.mux.com.
Let's take a look What?
There it is.
In an iframe.
Because it's coming from
our website, we can make
your player look delicious
to social media and SEO.
Here in the head,
we've got all of your favorite
OG tags and Twitter tags
so that when you share your
video, it looks fantastic.
For example, here, I want
to tell people about my
favorite dogs on my favorite
social media website.
Because of those OG
tags, we've got a title
and we've got a little
preview of our video.
We also make the iframe look
really good to search engines.
If you take a look at the
very bottom of the iframe,
there's a little bit of secret
code called LD-JSON, and
this tells Google a little
bit more about your video.
There's even more about
the iframe that we
haven't talked about yet.
For that, there's
a whole blog post.
Check it out.
And if you like your blog
posts, definitely subscribe
to our newsletter for more hot
topics on making video easy.