Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Youtube Video querystring values?
New Landing › How can we help? › Atelier › Youtube Video querystring values?
- This topic has 15 replies, 2 voices, and was last updated 9 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
August 9, 2015 at 11:23 pm #202171
I’m seeing that if I drop in a Youtube video link, I get a nice player. However, if I try to add querystring variables, they are getting stripped off. Especially, I want to put in a link that disables the YouTube recommended videos like this:
https://youtu.be/wMwnbgbILMA?rel=0
Ideally, I’d love to have the videos show in HTML 5.
Is there already a default video player built into WordPress or Atelier that might be impacting the final display from these naked video links? If so, how can I tweak the settings?
I tried installing a plugin called Hide YouTube Recommended Videos, and that worked for hiding the recommendations, but it seems to have a conflict somewhere. When I disabled it, the feature was “stuck”. I had to restore my site to clear that out. Want to do this the right way now.
I’d be willing to use Wistia to get solid video, but prefer that everything just run off of YouTube if I can get a nice HTML5 responsive video with no recommended videos at the end.
Lastly, I’d love to have video high up on my page. It seems like placements are limited. Do you have any examples of people using videos in a cool way on product pages, and whatever tricks they might have used to achieve that?
Thanks a bunch!
MarkAugust 10, 2015 at 1:02 am #202183I decided to enable the swift page builder for product pages. I included a youtube video as shown. The product page loads correctly, but the video won’t play:
What am I doing wrong?
I have the latest version of the them installed, and all other plugins are current as well.
August 10, 2015 at 3:08 am #202190Here’s the image of how I set the pagebuilder…
Attachments:
You must be logged in to view attached files.August 10, 2015 at 3:27 am #202193I then tried using a plan .mp4 link hosted on my site, and now I have screen saying “Oops! The embed code for this video is not valid”:
August 10, 2015 at 3:47 am #202194Solution – only one style of link seems to work, e.g.
https://www.youtube.com/watch?v=wMwnbgbILMA
Now, how do I defeat YouTube adding their recommended videos. I tried this link and it didn’t work:
https://www.youtube.com/watch?v=wMwnbgbILMA&rel=0August 10, 2015 at 4:58 am #202209If I use the recommended embed code I get the viewer fail again:
https://youtube.com/watch?v=wMwnbgbILMA%3Frel%3D0August 10, 2015 at 8:13 am #202239Hi,
Please use this plugin https://wordpress.org/plugins/hide-youtube-related-videos/. Hope it should help to you.
Thanks
MohammadAugust 10, 2015 at 12:16 pm #202353I installed the Hide YouTube Related Videos plugin (again).
When using the Swift Video Player, the plugin does not hide related videos in any configuration of YouTube link.
If I just put the current standard YouTube link (e.g. https://youtu.be/wMwnbgbILMA) in a text box, the player works fine, but the video is not full width.
So,
1. Can you please tell me if there is a way to defeat “related videos” from inside of the Swift Video Player?
2. As a workaround, is there a way to create a full width video in a full width text box just using the standard YouTube link?I am hoping you can examine this question carefully and provide a tested solution as I want to solve this problem before a major promotion I have scheduled to push out in 24 hours.
August 10, 2015 at 12:28 pm #202362Hi,
Please provide me wordpress admin login detail after installing WPIDE plugin.
Thanks
MohammadAugust 10, 2015 at 12:34 pm #202369Do you mean this plugin: https://wordpress.org/plugins/wpide/
Can you please tell me your plans?
If you’re going to add code to the child theme, I’d rather you give me the instructions and I can add the code myself.
If it is truly necessary to provide you with access, I’ll back up the site before having you do anything.
August 10, 2015 at 12:38 pm #202370Hi,
I will check only and suggest you to add code at child theme.
Thanks
MohammadAugust 10, 2015 at 12:44 pm #202378This reply has been marked as private.August 10, 2015 at 1:41 pm #202393Hi,
Please paste this code at functions.php of child theme.
`function sf_video_youtube( $url, $width = 640, $height = 480 ) {
preg_match( ‘/[\\?\\&]v=([^\\?\\&]+)/’, $url, $video_id );
$youtube_params = apply_filters( ‘sf_youtube_embed_params’, ‘?showinfo=0&controls=1&modestbranding=1&rel=0’ );$video_padding = ( intval( $height, 10 ) / intval( $width, 10 ) ) * 100;
$inline_style = ‘padding-bottom: ‘ . $video_padding . ‘%;’;if ( is_ssl() ) {
return ‘<div class=”sf-video-wrap” style=”‘ . $inline_style . ‘”><iframe itemprop=”video” class=”video-embed” src=”https://www.youtube.com/embed/’ . $video_id[1] . $youtube_params . ‘” width=”‘ . $width . ‘” height=”‘ . $height . ‘” allowfullscreen></iframe></div>’;
} else {
return ‘<div class=”sf-video-wrap” style=”‘ . $inline_style . ‘”><iframe itemprop=”video” class=”video-embed” src=”http://www.youtube.com/embed/’ . $video_id[1] . $youtube_params . ‘” width=”‘ . $width . ‘” height=”‘ . $height . ‘” allowfullscreen></iframe></div>’;
}
}`Thanks
MohammadAugust 10, 2015 at 4:21 pm #202476I put the function in my child theme. This didn’t work right.
If you look here, you’ll see:
http://urbanultralight.com/test/Also, if you look inside the page, you’ll see that I used this link:
https://www.youtube.com/watch?v=wMwnbgbILMAbut that link was transformed by the player somehow in the code that incorrectly shows up on the web page.
August 10, 2015 at 11:25 pm #202544For now, I found a good all in one YouTube player. By putting it in a text box, I can get responsive, no relative videos, and in general whatever I want just from the simple share link.
youtube-embed-plus plugin
I know your player aims to satisfy a whole range of video sources, but it seems that it doesn’t do the one thing that matters most to me which is make it easy to embed responsive YouTube and customize with the features offered by Google.
My workaround will be fine for text boxes, but it doesn’t solve the problem of the full screen video popup – for now, not sure I need that, but when tested, that also didn’t work properly – only worked with one type of link and didn’t allow for the rel=0 setting.
PS – just updated to Woocommerce 2.4 and it says several Atelier pages are out of date. Everything seems to be working fine, but just thought I’d let you know…
Thanks for your effort and for being there!!
Cheers,
Mark -
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.