Problem/Motivation

Add support for modal popup. The modal popup is used for displaying Youtube embeds.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 Screenshot_5_11_21__2_10_PM.png253.83 KBbaldwinlouie
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Status: Active » Needs review
StatusFileSize
new253.83 KB

@yas I've added support for videos inside a modal popup.

I've added support for both buttons and links.

For example:

<button class="btn btn-primary video" data-src="https://www.youtube.com/embed/Ukde63dIU0k?autoplay=1&amp;showinfo=0&amp;modestbranding=1&amp;rel=0" data-target="#modal" data-toggle="modal" type="button">Play Video 1</button>

and

<a class="video" data-src="https://www.youtube.com/embed/58wKMN7ROgw?autoplay=1&amp;showinfo=0&amp;modestbranding=1&amp;rel=0" data-target="#modal" data-toggle="modal" href="https://www.youtube.com/embed/58wKMN7ROgw">Click for video</a>

With this patch, all you need to do is create a link or button with the syntax above, and the videos will popup.

I've decided to let the user who create these links to configure the youtube embed parameters in the data-src attribute according to: https://developers.google.com/youtube/player_parameters

I've attached a screenshot of what the end result looks like.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@baldwinlouie

Thank you for adding the feature. Great patch, I'll merge the patch to 8.x-1.x and 2.x, and close this issue as Fixed.

  • yas committed 7957fc7 on 2.x authored by baldwinlouie
    Issue #3213300 by baldwinlouie, yas: Add support for modal video pop-up
    

  • yas committed 6fe86ed on 8.x-1.x authored by baldwinlouie
    Issue #3213300 by baldwinlouie, yas: Add support for modal video pop-up
    

yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.