Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

html - Embedding video player html5 iframe in facebook share like YouTube

When something is shared from youtube to facebook, facebook is now showing the youtube html5 player.

If you look up one of their urls (https://www.youtube.com/watch?v=uuS5ZyQhvsk) in the open graph debugger you can see that they are now providing open graph meta data for their html player as well as the flash one. Facebook youtube open graph screenshot

I also have a player that sits in an iframe, and am now including the same tags that youtube is, minus the flash ones as we don't have a flash player, but it isn't working and facebook is giving me this error which doesn't make sense:

Share has playable media but will not play inline because it would cause a mixed content warning if embedded. Add a secure_src or make the video src secure to fix this.

open graph error for our site

This is the information facebook is reading: facebook open graph screenshot for our site

This is the url as an example that is generating that error: https://www.la1tv.co.uk/player/124/260

All I can think is that Facebook has made some kind of deal with youtube and this isn't available for everyone yet, but that isn't clear from that error.

All of the content on our site is served over https.

Anyone know what's going on or got this working?

I can't find any documentation anywhere on facebook how to do this.

I posted a similar question a while back when I was trying to get this working but at this time youtube was still only providing the flash player to facebook.

It looks like someone else was having a similar issue here.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

According to WizKid this is currently in a trial period for YouTube and hopefully will be rolled out to everyone at a future date.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...