I'm not sure if this was a deliberate decision, but it seems that setting the thumb
attribute on embeds has no effect if the embed is from YouTube or any other web service. It seems to me that if the user sets the thumb
attribute, they want to override the thumbnail instead of use the one from the web service.
This patch simply gives the thumb
attribute precedence over the other methods for getting a thumbnail. So, if a user sets the thumb
attribute, it will be used instead of the thumbnail from whatever web service.
Let me know if there was some reason for having it the other way, and I can do some work to make this a setting or something.
Comment | File | Size | Author |
---|---|---|---|
mytube-thumb_attribute_override.patch | 2.51 KB | theunraveler | |
Comments
Comment #1
l@va CreditAttribution: l@va commentedThis decision was made a long time ago, before MyTube was available anyplace other than 2 websites (and to anyone who downloaded it from eff.org or opensource.osu.edu), but I believe the behavior you described was intentional. It's not a super-serious issue per se, but the idea behind that particular logic was to prevent a sort of bait-and-switch video embedding. The
thumb
attribute was more of a workaround for arbitrary embeds (like if EFF wanted to embed a video from colbertnation.com but still have a thumbnail) than a per-embed config setting.At the time, which was well before the module was pushed to drupal.org, the idea of linking the video source in the disclaimer hadn't been conceived of (just the top-level domain), and the thumbnail was the only clear indication to visitors of what a video might be. Since the local thumbnail essentially replaces any thumbnail the view would otherwise see from a preloaded YouTube, a content submitter could use the
thumb
attribute to mislead users into expecting a different video than was actually seen. At that time when thethumb
attribute was created, some of the mentality around it was flawed from a security standpoint, so this particular decision may not be valid or relevant anymore. I can't see a major problem with reversing that - since you'd need the appropriate permissions to post arbitrary embed code (which MyTube makes no promise on sanitizing) to be using thethumb
attribute anyway.I'll want to think it over a bit, but I'll probably end up incorporating your changes in the end. Being the submitter, would you like to share your take on all of this before I do anything else? Additionally, when you offer to make it a setting, what did you have in mind?
Comment #2
mfbMoving this feature request to supported branch.