Results 1 to 3 of 3

Thread: YouTube Gallery Wall Close option for Videos?

  1. #1
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default YouTube Gallery Wall Close option for Videos?

    Hi,
    URL: http://dynamicdrive.com/dynamicindex...llery-wall.htm

    Thanks for another great script. I have installed the YouTube Gallery Wall and it works great however I was wondering if I can add a "Close Video" in the video window as although the video can be stopped and started no problems, the share option also works - clicking outside the video window to close the video only works sometimes and when viewing on a small device there is no room to click outside the window.

    Thanks and regards
    Glynne
    Last edited by ddadmin; 08-19-2016 at 07:12 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sure, try the below modified .js and .css files. It adds a Fontawesome based close button to the upper right corner of the screen to dismiss the player. In the .js file, you can modify the fontawesome font used here:

    Code:
    		+ '<i id="ytubeclose" class="fa fa-times-circle-o" aria-hidden="true"></i>'
    and to modify the color/size of button, here in the .css file:

    Code:
    #ytubeclose{ /* close button inside video player */
    	font-size: 60px;
    	position: absolute;
    	right: 5px;
    	top: 5px;
    	color: white;
    	z-index: 1000;
    	cursor: pointer;
    }
    Attached Files Attached Files
    DD Admin

  3. #3
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Addition.

    Hi

    Thanks very much for your answer. It successfully created the icon but it was on the thumbnail overlay which couldn't be accessed once the video is opened overtop of it. What I did in the end was to add a graphic elsewhere with a suitable "id" and add a line to the end of the function that creates the lightbox within youtubegallerywall.js that adds an onclick event to the graphic identified by id. The event calls the hidelightbox() function to close the running video and it works sweet across the range of devices - pcs, laptops, mobiles, tablets etc. I've attached the code.

    Thanks very much for your help.

    Regards
    Glynne
    Attached Files Attached Files

Similar Threads

  1. Initializing a Gallery Wall for Youtube videos
    By Luis Aristizabal in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-17-2016, 03:20 PM
  2. Using thumbnails for playing multiple YouTube videos
    By molendijk in forum Submit a DHTML or CSS code
    Replies: 4
    Last Post: 01-15-2015, 02:58 PM
  3. Playing 'watch_popup videos' using the YouTube Api for embedding videos
    By molendijk in forum Submit a DHTML or CSS code
    Replies: 1
    Last Post: 06-21-2013, 03:18 PM
  4. Loading YouTube videos using the most recent YouTube embed code
    By molendijk in forum Submit a DHTML or CSS code
    Replies: 11
    Last Post: 05-28-2012, 11:04 PM
  5. Replies: 5
    Last Post: 03-16-2007, 03:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •