'How is SoundCloud embedding an HTML5/JS widget on Facebook?

Here's the scenario I'm seeing -

  • You click to post a sound from SoundCloud to Facebook
  • It embeds a player in the post that can either be clicked on to take you to the original item on SoundCloud OR you can click a Play icon to play the sound right in your feed.
  • The player is a Javascript/HTML5 player (which you can see by viewing source) HOWEVER if you take the embedded URL and put it in the Facebook open graph debugger you'll see that it appears to be directing to embed a Flash SWF

How is SoundCloud doing, what appears to be, some kind of redirect trick to get a "og:video" SWF to turn into a JS/HTML5 player?

I notice that there is an "og:type" of "soundcloud:sound" so is it some kind of whitelist/Facebook application scenario?

Try it yourself with this:

I did find this bit of info from the SoundCloud site about how they've switched to JS players (that fall back to Flash on older browsers): http://help.soundcloud.com/customer/portal/articles/1219149-where-has-the-flash-widget-gone-



Solution 1:[1]

This may only be a partial answer. But there exists a special Facebook Open Graph Music program which "is only available to whitelisted partners at this time". This includes a bridge which has the goal to "enable play buttons on feed stories on Facebook.com that can play and pause tracks and indicate which is playing."

However, apparently you can include both Flash (application/x-shockwave-flash) and HTML5 video (video/mp4) formats in the og:video:type property.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mb21