The video loaded in the iframe doesn't have a play button, link back to the post, or any fb info that would be displayed if you get the embed code from facebook.

The embed code iframe url from facebook is:
https://www.facebook.com/plugins/video.php?href=FULL_URL_TO_VIDEO_POST

The module is currently using:
https://www.facebook.com/video/embed?video_id=VIDEO_ID

I can imagine plenty of cases where the current implementation is preferred, however at the very least, the lack of a play icon is not good for UX. I think an option to pick between formats would be preferred - it's unclear to me if that can be done with the other attributes on the iframe.

It also seems like further customization might have to be done with the js api instead of the iframe. Alternatively, there may be a way to load a thumbnail with a play icon.

Comments

mortona2k created an issue. See original summary.

mortona2k’s picture

Title: Update iframe used in url » Update url used in iframe
mortona2k’s picture

This patch adds a new video provider, FacebookNew, which is a copy of Facebook with an updated url:

'src' => sprintf('https://www.facebook.com/plugins/video.php?href=%s', $this->getInput())

mortona2k’s picture

Clean patch.

dak5859’s picture

Hi mortona2k - can you explain in more detail how your patch should be used. I applied the patch, and do see the new provider "Facebook new" as an option on my video embed field. But when I add the same FB video URL (e.g. https://www.facebook.com/DailyMailAust/videos/662843860782620/UzpfSTE0MD...) i still get the same video embedded with no play button until the still video image is selected and the video starts playing. Should I be using a different video embed URL? And do I need to select both "Facebook" and "Facebook new" as my providers on that video embed field? Any assistance on this issue would be greatly appreciated.

mortona2k’s picture

Issue summary: View changes

Try using the 2 urls at the top to view your video. They serve the video in 2 different ways apparently. I think one loads a player, and the other is just a video.

Here's a url with the play button showing:
https://www.facebook.com/plugins/video.php?href=https://www.facebook.com...

The second URL just loads a static image that plays the video when clicked instead of showing the play button:
https://www.facebook.com/video/embed?video_id=1666411736815653

The iframe for your video should be using:
https://www.facebook.com/plugins/video.php?href=https://www.facebook.com...

I see the play button there.

caspervoogt’s picture

I tried the patch just now, and it does the trick. Previously I was seeing no play button. The Facebook NEW provider fixes this.

ilianoz’s picture

StatusFileSize
new1.05 KB

Me and (https://www.drupal.org/u/ggkapanadze) created patch for this.

andrew answer’s picture

Status: Active » Needs review
StatusFileSize
new702 bytes

Removed width and height, styling not needed here, imho.

guntervs’s picture

Applied the patch in #9 and works as expected.

guntervs’s picture

Status: Needs review » Reviewed & tested by the community
jeffschuler’s picture

Yes. Patch in #9 is working.
Can we please get a commit and release?
Thank you!