Hi Eric,
We're in process of having Vidyard part of our websites. And it seems your contrib module will simplify our integration, so thank you! :)
As I am going through Vidyard documentation, I noticed they have updated their embed code markup. Not sure how recent that change is, but some of their documentation is still has references to older versions.
However, this the most recent markup I could find on Vidyard:
<!-- The script tag should live in the head of your page if at all possible -->
<script type="text/javascript" async src="https://play.vidyard.com/embed/v4.js"></script>
<!-- Put this wherever you would like your player to appear -->
<img
style="width: 100%; margin: auto; display: block;"
class="vidyard-player-embed"
src="https://play.vidyard.com/VIDEO_ID.jpg"
data-uuid="VIDEO_ID"
data-v="4"
data-type="inline"
/>
With the new version, they also seem to support responsive embed by default, which is perfect.
I created a patch to reflect those changes. Let me know what you think of it.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | interdiff-11-15.txt | 3.27 KB | amourow |
| #15 | update-vidyard-embed-code-3055041-15.patch | 5.95 KB | amourow |
| #11 | interdiff-10-11.txt | 646 bytes | zaporylie |
| #11 | 3055041-11.patch | 5.72 KB | zaporylie |
| #10 | interdiff-8-10.txt | 1.46 KB | zaporylie |
Comments
Comment #2
osmanComment #3
eric115 commentedThanks for your patch! I haven't worked with vidyard in quite some time now, do you have a link to the documentation relating to this change?
This new syntax looks like it might be more suited to a twig file, which might be easier to override at a theme level as well, do you have any thoughts about something like that?
Comment #4
zaporylieI don't think this change belongs here as of #3035286: Update Dependencies to new Format in .info.yml
Re #3 - this doesn't sound like a bad idea.
How much of a disruption would this change cause to existing userverse. I wonder if users will suffer from broken styling when updating from 8.x-1.0 to 8.x-1.1? If so - should this change target 8.x-2.0 for the sake of sanity even if upgrade path is non-existing due to a full compatibility between major versions.
Comment #5
osmanAgreed, dependency change should have been part of #3035286: Update Dependencies to new Format in .info.yml, I'll post an updated patch without it.
The styles removed by this patch (#2) was used to create a responsive embed experience.
Vidyard's v4 implementation introduced in this patch, already creates a responsive embed markup. Though I opted to remove the inline CSS
width: 100%; margin: auto; display: block;introduced by Vidyard's official responsive embed code. Drupal doesn't need that inline CSS, IMO.Comment #6
osmanComment #7
osmanEric, at first glance I overlooked the existence of the
video_embed_field/templates/video-embed-iframe.html.twig, then thought a template could be added as a new feature in a separate issue.But, I'll see if I can update the patch with a twig template, later in the day.
Do you see any other issues may need addressing?
Comment #8
osmanComment #9
osmanWith added patch, the template variables can now be altered as defined in video_embed_field.
Comment #10
zaporylieAdding new pattern and updating test
Comment #11
zaporylieok. the watch pattern that is failing is actually allowed so I'm removing failing test.
Comment #12
amourow#11 works with the latest dev
Comment #13
amourowvideo_embed_fieldmodule has responsive video option which will add.video-embed-field-responsive-videoto the video container. It will cause extra padding-bottom in the container despite the vidyard player has responsive layout.I add only one css back to revert the extra padding from
video_embed_fieldcss.Comment #14
amourowAdd missing library definition for css.
Comment #15
amourowComment #16
nnminhthao@gmail.com commentedI was working with the 2.0 branch and create a patch for that based on #11 https://www.drupal.org/project/video_embed_vidyard/issues/3444212
Thank you zaporylie!