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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | video_embed_facebook-field_change_embed-123123-9.patch | 702 bytes | andrew answer |
Comments
Comment #2
mortona2k commentedComment #3
mortona2k commentedThis 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())
Comment #4
mortona2k commentedClean patch.
Comment #5
dak5859 commentedHi 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.
Comment #6
mortona2k commentedTry 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.
Comment #7
caspervoogt commentedI tried the patch just now, and it does the trick. Previously I was seeing no play button. The Facebook NEW provider fixes this.
Comment #8
ilianoz commentedMe and (https://www.drupal.org/u/ggkapanadze) created patch for this.
Comment #9
andrew answer commentedRemoved width and height, styling not needed here, imho.
Comment #10
guntervs commentedApplied the patch in #9 and works as expected.
Comment #11
guntervs commentedComment #12
jeffschulerYes. Patch in #9 is working.
Can we please get a commit and release?
Thank you!