[prettyPhoto] possible to set a predefined height+width when opening videos?

resolved (8 posts) (4 voices)

  1. webzo
    Member

    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.

    Attachments

    1. prettyphoto_window_sizing.jpg (61.9 KB, 0 downloads) 4 years old
    Posted 4 years ago #
  2. Uniq
    Support

    Hello webzo,

    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!

    Cheers,
    Dorian

    Posted 4 years ago #
  3. webzo
    Member

    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?

    Posted 4 years ago #
  4. Elliott
    Support

    Hey webzo,

    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.

    Posted 4 years ago #
  5. webzo
    Member

    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:
    http://www.youtube.com/watch?v=9tOcXjBnC88?width=640?height=385

    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.

    Attachments

    1. prettyphoto_youtube.jpg (82 KB, 0 downloads) 4 years old
    Posted 4 years ago #
  6. webzo
    Member

    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?

    Posted 4 years ago #
  7. Uniq
    Support

    Hello webzo,

    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!

    Cheers,
    Dorian

    Posted 4 years ago #
  8. sandyme
    Member

    Just what I was looking for.
    &width=100&height=100"
    Works perfectly.

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme