This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

invalid video
#1

Hi All,

I have been having a problem adding youtube videos in the format of http://youtu.be/ABCD?t=20m34s.

If I add the video as http://www.youtube.com/watch?NR=1&featur...een&v=ABCD then it works

Please advise how I may solve this issue.
Reply
#2

Hi,

Thank you for reporting this. I wasn't aware of the youtu.be URL until now. (I usually just copy the URL that's in the address bar.)

I have a solution, although I haven't yet been able to retain the t=20m34s portion, so that part will be discarded.

If you open /comments/includes/AutoEmbed/stubs.php, and add this new stub:

PHP Code:
<?php 
array (
'title' => 'YouTube',
'website' => 'http://www.youtu.be',
'url-match' => 'https?://(?:www\.)?youtu\.be/([0-9a-z-_]{11})',
'embed-src' => 'http://www.youtube.com/v/$2&rel=0&fs=1&hd=1',
'embed-width' => '480',
'embed-height' => '295',
'image-src' => 'http://img.youtube.com/vi/$2/0.jpg',
'iframe-player' => 'http://www.youtube.com/embed/$2',
),

Please let me know if it works for you.

I have attached the file in case you're not sure how to add it.


Attached Files
.php stubs.php Size: 3.81 KB  Downloads: 9

Have you completed the interview?
Reply
#3

(06-Jan-2013, 06:08 PM)Steven Wrote:  Hi,

Thank you for reporting this. I wasn't aware of the youtu.be URL until now. (I usually just copy the URL that's in the address bar.)

I have a solution, although I haven't yet been able to retain the t=20m34s portion, so that part will be discarded.

If you open /comments/includes/AutoEmbed/stubs.php, and add this new stub:

PHP Code:
<?php 
array (
'title' => 'YouTube',
'website' => 'http://www.youtu.be',
'url-match' => 'https?://(?:www\.)?youtu\.be/([0-9a-z-_]{11})',
'embed-src' => 'http://www.youtube.com/v/$2&rel=0&fs=1&hd=1',
'embed-width' => '480',
'embed-height' => '295',
'image-src' => 'http://img.youtube.com/vi/$2/0.jpg',
'iframe-player' => 'http://www.youtube.com/embed/$2',
),

Please let me know if it works for you.

I have attached the file in case you're not sure how to add it.
Hi Steven,

It has worked, but as you said starting the video at t=20m34s was discarded. Thanks for the assistance.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by zifzif
03-Jul-2012, 02:24 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)