Reviewed & tested by the community
Project:
Video Embed Field
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2013 at 17:25 UTC
Updated:
18 Nov 2022 at 20:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wbobeirne commentedComment #2
Anonymous (not verified) commentedre-rolled patch against latest 7.x-2.x code
Comment #3
sheldonreed3 commentedThe patch seems to work as designed. While it addresses the issue, I think we should have an option to make this title more descriptive/definable, or grab it from the video. If there is interest I can roll some options around in my spare time. Any thoughts?
Comment #4
kleve commentedAgree with @sheldonreed3, it should be more descriptive. At least we should give the editor the ability to do so. The title should describe the contents of the embedded content, not that it is an embedded content.
A separate title field on the edit form with the fallback text "Embedded video" if left empty maybe?
Comment #5
karenann commentedThis is by no means a "fix" but I'm attaching a stop gap for Drupal 8.
Comment #7
WebbehI ended up pursuing the idea pitched in #4, which was to add a quick 'more descriptive' label for YouTube.
It's not a slam-dunk, but since the YouTube scraper already has the mechanism to collect and incorporate this metadata. This patch extends the YouTube handler to add in the title, array[0]['snippet']['title'], as output from video_embed_field_handle_youtube_data($url).
Comment #8
lias commentedAdding #7 patch worked and removed failing on iframe in audit for Drupal 7.61
Thanks
Comment #9
WebbehRealizing this needs a slide for review given #7: https://www.drupal.org/project/video_embed_field/issues/1888488#comment-...
Comment #10
streever commented#7 doesn't seem to be valid; it applies to a folder & file that doesn't exist in the latest version of the module?
Comment #11
micahw156Thanks for the patches!
The patch in #7 basically worked for me, although I made some customizations specific to our environment.
This patch should probably verify $data[0]['snippet']['title'] is set before using it, too. I discovered the hard way that video_embed_field_handle_youtube_data() needs an API key, which we hadn't been using prior to this.
There's another iframe in this file around line 524 to embed Vimeo player. That should probably be addressed, too.
Comment #12
WebbehPushing back to Needs Work for next steps as outlined in #11:
I wonder if we should encourage an agnostic backup if the API key does not exist.
Comment #13
micahw156@webbeh, that's a good question, and possibly a new issue to update video_embed_field_handle_youtube_data(), which does not verify the key exists before making the API call.
Comment #16
wranvaud commentedChanging status to needs review. Please see merge request https://git.drupalcode.org/project/video_embed_field/-/merge_requests/2.
Comment #17
micahw156+1 for the merge request from wranvaud. I was (finally) able to test these changes, and everything worked as expected.
Comment #18
wranvaud commentedThank you for testing! Moving this to RTBC.
Comment #19
robloachThose following along for Drupal 8, the solution is over at https://www.drupal.org/project/video_embed_field/issues/3200253#comment-... .