I have included a screenshot to describe the problem and what I'm trying to achieve. Also was curious is there a way to make a youtube video play in HD format when opening up in prettyphoto? I would like to know all the options i can use.
[prettyPhoto] possible to set a predefined height+width when opening videos?
(8 posts) (4 voices)
This is mostly the way Youtube / Vimeo embed the video into a page (actually the code they provide). My simple guess is that you should change the code they are providing (change the width and height). Let us know if it worked this way, otherwise I will take a closer look at how PP embeds the videos and see if there are any changes to be made in there!
this is the embed code that youtube gives me.
<object width="853" height="505"><param name="movie" value="http://www.youtube.com/v/W8ZunUae7mQ?fs=1&hl=en_US&rel=0&hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/W8ZunUae7mQ?fs=1&hl=en_US&rel=0&hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="853" height="505"></embed></object>
so how would i tell prettyphoto to open the youtube video up with a predetermined width and height?
You can specify width and height by adding parameters at the end of the URL like this..
<a href="http://www.youtube.com/watch?v=wBtcxlZP4fo&width=100&height=100" rel="prettyPhoto"
Let us know if this works for you.
Elliot it works perfectly! However when trying to set a custom width and height for the portfolio section, the video gets cut off and doesn't reflect the width and height that I enter?
This is the code I am entering into the 'Post Video Link' field:
and here's a screenshot of how it looks when i click on it to open up in prettyphoto.
I figured it would work since it worked fine when I posted the link into my blog post and called it from there. It just doesn't seem to work right when it's being called from a portfolio page.
Nevermind, stupid error on my behalf. I should've typed in & instead of ?
these things are so easily overlooked. Everything works great now. Should setting the width and height for vimeo videos be the same format as for youtube when calling up prettyphoto?
Yes, should be the same for Vimeo! I'm glad you got it solved! I'll be marking the topic as resolved for the time being!
Just what I was looking for.
Works perfectly.Posted 11 months ago #
You must log in to post.