intanpalupidn / jquery-oembed

Automatically exported from code.google.com/p/jquery-oembed
0 stars 0 forks source link

Custom oembed provider throws an error #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. include jquery.oembed.js script tag on your head HTML tag
2. Call oembed with a custom provider (see example below):

$('#video_holder .oembed').oembed(null, 
    {
        embedMethod: 'replace',
        disallowedProviders: ['youtube'],
        customProviders: [ new $.fn.oembed.OEmbedProvider("myyoutube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?"], "/oembed/youtube/") ]    
    });

What is the expected output? What do you see instead?

Expected to call /oembed/youtube/ to request my custom oembed code. Instead, I 
get an error "activeProviders[i] is undefined"

What version of the product are you using? On what operating system?
jquery.oembed.js v1.1.0
Firefox 3.6.18 on Mac

Please provide any additional information below.

A typo was made around line 169:

                  if (customProvider instanceof $.fn.oembed.OEmbedProvider) {
                      activeProviders.push(provider);
                  } else {

Should be:

                  if (customProvider instanceof $.fn.oembed.OEmbedProvider) {
                      activeProviders.push(customProvider);
                  } else {

Original issue reported on code.google.com by kamyk...@gmail.com on 22 Jun 2011 at 9:56