htmanning has asked for the wisdom of the Perl Monks concerning the following question:
I need to set the width to 300 and adjust the height accordingly. Sometimes the width is 560, other times it might be 480, or 600. I was using the following but it no longer applies because Google changed their code around:<iframe width="560" height="349" src="http://www.youtube.com/embed/8lG +m40pxw" frameborder="0" allowfullscreen></iframe>
The above no longer works. I'm guessing because there is no longer a Title tag in the YouTube URL. Any help would be appreciated. I also need a way to take the iframe code and grab only the URL contained within it. I'm not sure how to accomplish that. Thanks.$video =~ s! (<iframe [ ]title="YouTube[ ]video[ ]player" [ ]width=")([0-9]+)(" [ ]height=")([0-9]+)(" ) ! $1 . "300" . $3 . ((300/$2)*$4) . $5 !xeg;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Resize video for mobile browser
by kcott (Archbishop) on Aug 15, 2011 at 06:44 UTC | |
|
Re: Resize video for mobile browser
by Anonymous Monk on Aug 15, 2011 at 02:30 UTC | |
|
Re: Resize video for mobile browser
by Mr. Muskrat (Canon) on Aug 15, 2011 at 17:29 UTC |