embed is not working correctly

(Jacob Chapel) #1

I am not sure why this is causing problems, but when I try to embed a stream (just by linking it) the url is messed up in the iframe causing it to load a page from my domain and 404.

Here is what happens:

(Jacob Chapel) #2

Note above, the iframe src link is

(Jeff Atwood) #3

Interesting, @techapj can you have a look?

(Arpit Jalan) #4

Okay, I looked into it, and it seems like Twitch recently broke the Video URL they provide via Open Graph:

<meta content='' property='og:video'>
<meta content='' property='og:video:secure_url'>

Notice, instead it should be

I’ll try to communicate this to Twitch Developers.


Don’t you love it when it’s not your fault!


(Jacob Chapel) #6

Odd, when I went to check myself, it was properly formatted.

Okay, so when going to the video urls are formatted properly.

When going to it shows the above.

What is causing it to use the embed url, I don’t see anything in onebox specific to Twitch.

(Arpit Jalan) #7

Onebox uses Open Graph protocol to embed Twitch video stream. When you will view page source for, you will see:

<meta content='video.other' property='og:type'>
<meta content='' property='og:video'>
<meta content='' property='og:video:secure_url'>
<meta content='application/x-shockwave-flash' property='og:video:type'>

Onebox will detect that it has to embed video, by seeing property og:type which has content video:other. Then it will look for video url in property og:video which has content

Now since the video url is broken, the Onebox embed is creating trouble.

Hope, this makes clear how Twitch embed works. :slight_smile:

(Jacob Chapel) #8

I understand how it works. My point is if you go to the base user page, without /embed, the og:video links are correct and have the // as they should.

This is definitely a issue, but its not always showing the incorrect meta tags.

(Arpit Jalan) #9

Weird, when I view source for base user page (without /embed), it has broken og:video links:

(Jeff Atwood) #10

Did Twitch fix this?

(Arpit Jalan) #11

Not yet, just created a new issue for this:

(Arpit Jalan) #12 fixed the issue! :smile:

(Arpit Jalan) #13