Why not add a choice that would link the thumbnail to the video embed field trough ajax to display
the video at the same place of the thumbnail without to reload the page/view, as an alternative to link to the content (node) or provider url ? It would be also an interesting alternative to colorbox.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2832209-6.patch | 10.68 KB | sam152 |
Comments
Comment #2
sam152 commentedThis would be quite easy, the colorbox approach is a good example of combining two formatters into one. Also possibly some speed benefits for loading pages where the video isn't the focus of the page. This does however fall into the 20% use-case not the 80, so it would probably belong in another contrib module. Feel free to build it and post it in this issue, I would be happy to review it.
Comment #3
scuba_flyI'm starting a module for this: https://www.drupal.org/project/vefta
Any help is welcome.
Comment #4
scuba_flyHi Sam,
If you have some time, could you review my module?
I'm happy to fix any issues you find.
Thank you,
Jack
Comment #5
sam152 commentedWhoops, this dropped off my radar. It's on my list to review tomorrow. Thanks for the nudge.
Comment #6
sam152 commentedAdding the module as a patch to this issue for easy review.
Comment #7
sam152 commentedI just realised reviewing this that is similar to to #2888635: Add a lazy load formatter, which was a feature request that was committed. Sorry for messing you around in #2 :(
Few minor points, but all in all this module looks great, nice work!
Lookups in behaviors should look something like:
$('.vefta-outer', context).once().each(...This ensures events aren't bound multiple times to the same element. Behaviors can be run and attached multiple times per page load.
Hm, I wonder if these will only work with YouTube.
Are these settings relevant for a non modal formatter?
Comment #8
scuba_flyThanks for the review.
I see the once() requirement, nice find!
The autoplay option is tested with youtube, but I'll have to retest it with vimeo.
Number 3 I'm not sure. Wrote this some time ago. Have to look into that as well.
Apearantly I could not find the lazy load option. Maybe a documentation update is needed? Or I need better glasses ;)
Anyway I see if I can get this working tomorrow without my own module.
There may be a different use case for EU users that don't accept cookies, so the video can not be loaded since youtube sets a cookie.
But I guess It can be a new feature request / different module.
Do you think my module enhances the video embed module, or is it more a duplicate of the lazy loading function?
Comment #9
sam152 commentedWith the advent of Media in core, the Video Embed Field module has moved to being minimally maintained. Only issues which assist in the migration to Media in core will be committed. To read more about this decision, please see: #3089599: Maintenance status for Video Embed Field now that media is in core.