New Landing How can we help? Themeforest Theme Support Dante fullscreenviedo – Remove YouTube related videos

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #230081
    ttcrtv
    Member
    Post count: 6

    Is there a way to add the additional YouTube parameters to the “videourl”?

    e.g. We want to remove 1. suggested videos when the video finishes and 2. remove video title and player actions.

    As soon as we add the “rel=0&showinfo=0” to the end of the url, the fullscreen functionality no longer works.

    #230094
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try to use this plugin https://wordpress.org/plugins/hide-youtube-related-videos/.
    Thanks
    Mohammad

    #230381
    ttcrtv
    Member
    Post count: 6
    This reply has been marked as private.
    #230385
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    function sf_get_embed_src($url) {
    			if (strpos($url,'youtube')){
    				preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id);
    				if (isset($video_id[1])) {
    					if ( is_ssl() ) {
    						return 'https://www.youtube.com/embed/'. $video_id[1] .'?autoplay=1&wmode=transparent&rel=0';
    					} else {
    						return 'http://www.youtube.com/embed/'. $video_id[1] .'?autoplay=1&wmode=transparent&rel=0';					
    					}
    				}
    			} else {
    				preg_match('/http:\/\/vimeo.com\/(\d+)$/', $url, $video_id);
    				if (isset($video_id[1])) {
    					if ( is_ssl() ) {
    						return 'https://player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0&autoplay=1&wmode=transparent';
    					} else {
    						return 'http://player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0&autoplay=1&wmode=transparent';
    					}
    				}
    			}
    		}
    

    Thanks
    Mohammad

    #234426
    ttcrtv
    Member
    Post count: 6
    This reply has been marked as private.
    #234432
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Is causing to broken the video to play?
    Thanks
    Mohammad

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register