Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Return video information in oEmbed for videos

#71

The oEmbed endpoint for a video does not yet return video specific information. For example, one video has this for its oEmbed data:

{
    "author_name": "andre", 
    "author_url": "http://mlkshk.com/user/andre", 
    "height": 360, 
    "provider_name": "MLKSHK", 
    "provider_url": "http://mlkshk.com/", 
    "title": "Minamisanriku footage", 
    "type": "photo", 
    "url": "http://mlkshk.com/r/XSM", 
    "version": "1.0", 
    "width": 480
}

Instead I would expect an oEmbed video, such as:

{
    "author_name": "andre",
    "author_url": "http://mlkshk.com/user/andre",
    "height": 360,
    "html": "<iframe class=\"youtube-player\" type=\"text/html\" width=\"550\" height=\"339\" src=\"http://www.youtube.com/embed/6JVpy0L5z7s?rnd=0.374508428366&autoplay=0\" frameborder=\"0\"></iframe>",
    "provider_name": "MLKSHK",
    "provider_url": "http://mlkshk.com/",
    "thumbnail_height": 480,
    "thumbnail_url": "http://mlkshk.com/r/XSM",
    "thumbnail_width": 640,
    "title": "Minamisanriku footage",
    "type": "video",
    "version": "1.0",
    "width": 480
}

(Modulo the parts I made up, of course.)

Reported by Mark Paschal · March 12th, 2011 @ 11:54 AM

State: resolved
Milestone: none
Assigned to: Andre Torrez Andre Torrez

Activity

  1. Andre Torrez
    Andre Torrez
    • State changed from new to open

    I'm hesitant to make MLKSHK a source for embeds that way. Would it be too odd to have /r/ simply return the JSON embed I have stored that came from the provider? We're actually storing videos as "link" objects, since in the backend all someone is doing it storing a link to a video, we're just showing the video inline.

    Heck, I'd even like to have /r/ return the URL they gave us. Good? Bad?

    March 12th, 2011 @ 02:58 PM

  2. Mark Paschal
    Mark Paschal

    That makes total sense. In that case it might be nice to expose that in the API, by calling it a link and providing no video specific data, like:

    {
        "author_name": "andre",
        "author_url": "http://mlkshk.com/user/andre",
        "provider_name": "MLKSHK",
        "provider_url": "http://mlkshk.com/",
        "title": "Minamisanriku footage",
        "type": "link",
        "url": "http://www.youtube.com/watch?v=6JVpy0L5z7s",
        "version": "1.0"
    }
    

    March 15th, 2011 @ 04:54 PM

  3. Andre Torrez
    Andre Torrez
    • State changed from open to resolved

    This is done. I still return width and height, but they should be ignored. I leave them for people who might want to use them for the resulting video (I know, I said I didn't want to be a source for the oembed, I just figure someone might want it).

    March 16th, 2011 @ 04:02 PM

  4. Andre Torrez
    Andre Torrez

    Done, in dev! Not live yet.

    March 16th, 2011 @ 04:02 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.