Formalise the callback parameter?

17 views
Skip to first unread message

themattharris

unread,
Jan 19, 2011, 9:15:40 PM1/19/11
to OEmbed
I know providers are permitted to support additional custom
parameters, and many support this one already. but I was wondering if
it would make sense to add 'callback' as an official one.

The definition being:
callback (optional): If included the provider must respond in the
JSONP format using the provided callback name. The format parameter is
not required and will be ignored if this parameter is specified.

Thoughts?

Leah Culver

unread,
Jan 19, 2011, 9:56:33 PM1/19/11
to oem...@googlegroups.com
Your proposal sounds good to me.

However, I'd like to hear thoughts from some of the oEmbed providers since some of them would need to update. Anyone know who is or isn't supporting a callback parameter currently? Thoughts?

Leah



--
You received this message because you are subscribed to the Google Groups "OEmbed" group.
To post to this group, send email to oem...@googlegroups.com.
To unsubscribe from this group, send email to oembed+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/oembed?hl=en.


Chris Korhonen

unread,
Jan 19, 2011, 10:16:43 PM1/19/11
to oem...@googlegroups.com, oem...@googlegroups.com
We don't currently support the callback parameter at Animoto, though we do have some additional custom parameters in use specific to our video content. 

In principle, I don't see a problem supporting callbacks and JSONP seems a logical format for it, though I potentially see issues arising for oEmbed consumers in the future, keeping track of which providers support specific parameters since inevitably some won't be so quick to update - this is likely to open up a much larger can of worms. 

chris

Charl van Niekerk

unread,
Jan 20, 2011, 4:29:36 AM1/20/11
to oem...@googlegroups.com
Sounds like a great idea, but how are we going to track state between
the original request and the callback? In other words, when I receive
the callback, how would I know for which image/video/etc I requested the
data unless its URI is included in the callback response?

Brion Vibber

unread,
Jan 20, 2011, 12:02:41 PM1/20/11
to oem...@googlegroups.com

Most JS frameworks conveniently encapsulate that for you, eg jQuery's $.ajax() when told to use JSONP creates a uniquely named callback which wraps the callback you give to it, and passes that wrapper's name. Once called it calls your callback, then cleans up.

-- brion vibber (brion @ pobox.com / brion @ status.net)

Charl van Niekerk

unread,
Jan 20, 2011, 12:28:59 PM1/20/11
to oem...@googlegroups.com
On Thu, 2011-01-20 at 09:02 -0800, Brion Vibber wrote:
> Most JS frameworks conveniently encapsulate that for you, eg jQuery's
> $.ajax() when told to use JSONP creates a uniquely named callback
> which wraps the callback you give to it, and passes that wrapper's
> name. Once called it calls your callback, then cleans up.

Sorry, please ignore my previous comment. After re-reading the thread
just now I realised I got mixed up between a callback in the JSONP sense
and in the WebHook sense (at first I was thinking in the latter). As you
point out, in the JSONP sense this would not be a concern.

Brad Dougherty

unread,
Jan 21, 2011, 12:46:57 AM1/21/11
to OEmbed
I think it's a good idea. We already support it at Vimeo.

- Brad

On Jan 19, 9:56 pm, Leah Culver <leah.cul...@gmail.com> wrote:
> Your proposal sounds good to me.
>
> However, I'd like to hear thoughts from some of the oEmbed providers since
> some of them would need to update. Anyone know who is or isn't supporting a
> callback parameter currently? Thoughts?
>
> Leah
>
> On Wed, Jan 19, 2011 at 6:15 PM, themattharris <m...@themattharris.com>wrote:
>
>
>
> > I know providers are permitted to support additional custom
> > parameters, and many support this one already. but I was wondering if
> > it would make sense to add 'callback' as an official one.
>
> > The definition being:
> >    callback (optional): If included the provider must respond in the
> > JSONP format using the provided callback name. The format parameter is
> > not required and will be ignored if this parameter is specified.
>
> > Thoughts?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "OEmbed" group.
> > To post to this group, send email to oem...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > oembed+un...@googlegroups.com<oembed%2Bunsu...@googlegroups.com>
> > .

dominiek

unread,
Jan 21, 2011, 1:49:56 AM1/21/11
to OEmbed

When writing client-side code it's essential to have this callback
parameter. It would be great if this became part of the standard.

For now, there is a workaround if you're writing client-side code and
want to support many different OEmbed enabled sites. What I did is
basically use Embed.ly to retrieve embed meta-data for all video
endpoints:

http://api.embed.ly/1/oembed?url=http://vimeo.com/16980912
http://api.embed.ly/1/oembed?url=http://www.youtube.com/watch?v=l2Wm-9PJqA4
Reply all
Reply to author
Forward
0 new messages