Ticket #413 (closed enhancement: fixed)

Opened 2 years ago

Last modified 19 months ago

oEmbed provider functionalitity

Reported by: forgacs Owned by: Michiel.Schok
Priority: major Milestone: MediaMosa 3.0
Component: 2.4 issue Version:
Keywords: Cc:
MoSCoW: Must Have Estimated time after impact analysis:
Related to project: none Tested: no
Accepted: no Estimated Hours: 10

Description (last modified by forgacs) (diff)

A feature request from UvA Tom:
http://mediamosa.org/content/oembed-provider-functionalitity

"
Being a media platform it would make sense for MediaMosa to offer oEmbed provider functionality.

oEmbed is an open format designed to allow embedding content from a website into another page. This content is of the types photo, video, link or rich.

An oEmbed exchange occurs between a consumer and a provider. A consumer wishes to show an embedded representation of a third-party resource on their own website, such as a photo or an embedded video. A provider implements the oEmbed API to allow consumers to fetch that representation.

Official site  http://www.oembed.com/ contains examples and reference to php implementation.

This is useful also:  http://oohembed.com/
"

Change History

Changed 2 years ago by Michiel.Schok

I see great potential for oEmbed, but my current thoughts are in the direction of implementing oEmbed on the End User Application (EUA) side, because there is 'the most knowledge' of the ways embedding is allowed or not.

But it would be great if better backend functions would be available, so it can be easy for an EUA to implement oEmbed. Good Practices of oEmbed on an EUA with MediaMosa backend will help also.

And of course oEmbed is also on the roadmap for SURFmedia in 2011

Changed 2 years ago by Frans

  • moscow changed from Should Have to Must Have
  • milestone changed from MediaMosa X.X to MediaMosa 2.4

Spike request

Changed 2 years ago by Frans

  • milestone changed from MediaMosa 3.0 to MediaMosa 2.4

Changed 2 years ago by forgacs

  • owner set to forgacs
  • status changed from new to assigned

Changed 2 years ago by forgacs

  • description modified (diff)

Changed 2 years ago by forgacs

  • estimated_hours changed from 0 to 10

Changed 2 years ago by forgacs

  • owner changed from forgacs to robert

@Robert: The development needs review.

I have implemented a new module: mediamosa_oembed. This is off by default.
It has a new REST call: services/oembed [GET].
Parameters:

  • mediafile_id (for videos)
  • still_id (for pictures)
  • maxwidth
  • maxheight
  • format (xml or json)
  • provider_name
  • provider_url

Changed 2 years ago by robert

  • owner changed from robert to forgacs

Reviewed;

- Clean up the code more, to much the same code for still and mediafile output.
- Add 501 response type using the mediamosa_exception_error_403 as example (see mediamosa_response class) and use 501 for the other 2 types.

Changed 2 years ago by forgacs

  • owner changed from forgacs to robert

I have created a new private function in the REST class.
I have added 501 response to the code.

Changed 2 years ago by robert

  • status changed from assigned to closed
  • resolution set to fixed

Reviewed.

Changed 2 years ago by Michiel.Schok

  • status changed from closed to reopened
  • resolution fixed deleted

How can we test or use this?

the call /services/oembed doesn't give anything useful (Page NOT Found)...

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <header>
    <item_count>0</item_count>
    <item_count_total>0</item_count_total>
    <item_offset>0</item_offset>
    <request_result>error</request_result>
    <request_result_description>Page not found: services/oembed (method: -, parameters: -)</request_result_description>
    <request_result_id>404</request_result_id>
    <request_uri>[GET] services/oembed</request_uri>
    <version>3.0.0.1698</version>
    <request_process_time>0.0776</request_process_time>
  </header>
  <items/>
</response>

Changed 2 years ago by forgacs

  • owner changed from robert to Michiel.Schok
  • status changed from reopened to assigned

oEmbed is a new module. I have enabled it now.
 https://beheer.acceptatie.vpcore.snkn.nl/admin/modules
Please, test it.

Changed 2 years ago by forgacs

A few information about oEmbed and MediaMosa.

Official oEmbed site:
 http://www.oembed.com/

MediaMosa oEmbed:
/services/oembed [GET]

Parameters:
* format: The required response format. Value (when supplied) must be either "xml" or "json". Optional, default: json.
* maxheight: The maximum height of the embedded resource. Optional.
* maxwidth: The maximum width of the embedded resource. Optional.
* mediafile_id. Mediafile_id or still_id is required.
* provider_name: Name of the provider. Optional.
* provider_url: URL of the provider. Optional.
* still_id. Mediafile_id or still_id is required.

oEmbed it typically client side feature. Because the consumers see only the front-end when they do an oEmbed request. And MediaMosa doesn't have information, that which video or image is on the clients pages.
Eg.  http://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json

MediaMosa oEmbed REST call is a helper function for the clients. If the client support a few information, then MediaMosa generate a correct oEmbed response.
MediaMosa oEmbed support video or photo oEmbed response.

Examples:

If the client wants a video response in xml format, then:
/services/oembed [GET]
* format=xml
* mediafile_id: mediafile id of the video
* provider_name: name of the client, eg. MediaMosa. It will be visible in the response.
* provider_url: url of the provider, eg. http://mediamosa.org/ It will be visible in the response.

If the client wants an image repsonse in json format, then:
/services/oembed [GET]
(* format=json, this is the default)
* provider_name
* provider_url
* still_id: still id of the still image

If you need more information, please, don't hesitate to write me.

Changed 22 months ago by Frans

  • component changed from Core to 2.4 issue
  • milestone changed from MediaMosa 2.4 to MediaMosa 3.0

Changed 22 months ago by forgacs

App_id = 1

Video:
/services/oembed?format=xml&mediafile_id=F1XcpQtgkYhnqZbWIW5QvHtL&provider_name=MediaMosa&provider_url=http://mediamosa.org/

Image:
/services/oembed?format=xml&still_id=E1KTObjiSRcXbbNXP8cPI0Oq&provider_name=MediaMosa&provider_url=http://mediamosa.org/

Image with json:
/services/oembed?format=json&still_id=E1KTObjiSRcXbbNXP8cPI0Oq&provider_name=MediaMosa&provider_url=http://mediamosa.org/

More information:
 https://beheer.acceptatie.vpcore.snkn.nl/admin/mediamosa/browse/restcall/services-oembed/GET

Changed 19 months ago by Frans

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.