OregonDigital / oregondigital_2

The active development on Oregon Digital 2 is in the https://github.com/OregonDigital/OD2 repo.
Other
1 stars 1 forks source link

Embedded Viewer #114

Closed tpendragon closed 9 years ago

tpendragon commented 9 years ago

This is for things like embedded video.

tpendragon commented 9 years ago

@wickr Do you have a good example of some things from mediaspace we might want to embed?

wickr commented 9 years ago

@terrellt Andy Landforce oral history: https://media.oregonstate.edu/media/t/0_qrx3aydl OHBA related: https://media.oregonstate.edu/media/t/0_plo6kz09/2947392 Audio recording distributed with yearbook: https://media.oregonstate.edu/media/t/0_h380kmsh/2947392

There's a category if you want to see them all: https://media.oregonstate.edu/category/OSU+Libraries%3ESpecial+Collections+and+Archives+Research+Center/2947392

wickr commented 9 years ago

They have Embed and oEmbed options. You have to be logged in to see the Share option (or that may just be me since I'm the 'owner' on a lot of these).

The oEmbed option gives a URL, example: https://media.oregonstate.edu/id/0_qrx3aydl?width=400&height=285&playerId=22119142

The Embed option gives iFrame code and all the flashvar stuff, along with a few video size options, which we've used on the SCARC site in the past. Let me know if you want an example of that.

tpendragon commented 9 years ago

oEmbed sounds perfect

tpendragon commented 9 years ago

@wickr So mediaspace's oEmbed seems to be broken. I'm not sure why - the API returns results for videos, but does not include the html to actually embed the resource, which according to the spec is a required field. http://oembed.com/

Example of what is returned from https://media.oregonstate.edu/oembed?url=https://media.oregonstate.edu/id/0_plo6kz09/2947392

{"entryId":"0_plo6kz09","version":"1.0","type":"video","provider_url":"https:\/\/media.oregonstate.edu\/","provider_name":"OSU MediaSpace","title":"Oregon Hop Commission Historical Footage","width":"400","height":"285","playerId":"22119142","thumbnail_height":"285","thumbnail_width":"400","thumbnail_url":"https:\/\/cfvod.kaltura.com\/p\/391241\/sp\/39124100\/thumbnail\/entry_id\/0_plo6kz09\/version\/100002\/acv\/92\/width\/400\/height\/285","author_name":"petersec@oregonstate.edu"}

tpendragon commented 9 years ago

Oh. It's because when I'm authenticated it gives me more.

tpendragon commented 9 years ago

Result when logged in:

{
    "entryId": "0_plo6kz09",
    "version": "1.0",
    "type": "video",
    "provider_url": "https:\/\/media.oregonstate.edu\/",
    "provider_name": "OSU MediaSpace",
    "title": "Oregon Hop Commission Historical Footage",
    "width": "400",
    "height": "285",
    "playerId": "22119142",
    "thumbnail_height": "285",
    "thumbnail_width": "400",
    "thumbnail_url": "https:\/\/cfvod.kaltura.com\/p\/391241\/sp\/39124100\/thumbnail\/entry_id\/0_plo6kz09\/version\/100002\/acv\/92\/width\/400\/height\/285",
    "author_name": "petersec@oregonstate.edu",
    "html": "<script type=\"text\/javascript\" src=\"https:\/\/cdnapisec.kaltura.com\/p\/391241\/sp\/39124100\/embedIframeJs\/uiconf_id\/22119142\/partner_id\/391241\"><\/script><object id=\"kaltura_player_55897bc1c7c0f\" name=\"kaltura_player_55897bc1c7c0f\" type=\"application\/x-shockwave-flash\" allowFullScreen=\"true\" allowNetworking=\"all\" allowScriptAccess=\"always\" height=\"285\" width=\"400\" xmlns:dc=\"http:\/\/purl.org\/dc\/terms\/\" xmlns:media=\"http:\/\/search.yahoo.com\/searchmonkey\/media\/\" rel=\"media:video\" resource=\"https:\/\/cdnapisec.kaltura.com\/index.php\/kwidget\/wid\/0_ww1ley4i\/uiconf_id\/22119142\/entry_id\/0_plo6kz09\" data=\"https:\/\/cdnapisec.kaltura.com\/index.php\/kwidget\/wid\/0_ww1ley4i\/uiconf_id\/22119142\/entry_id\/0_plo6kz09\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowNetworking\" value=\"all\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"bgcolor\" value=\"#000000\" \/><param name=\"flashVars\" value=\"&amp;\" \/><param name=\"movie\" value=\"https:\/\/cdnapisec.kaltura.com\/index.php\/kwidget\/wid\/0_ww1ley4i\/uiconf_id\/22119142\/entry_id\/0_plo6kz09\" \/> <a rel=\"media:thumbnail\" href=\"https:\/\/cfvod.kaltura.com\/p\/391241\/sp\/39124100\/thumbnail\/entry_id\/0_plo6kz09\/version\/100002\/acv\/92\/width\/120\/height\/90\/bgcolor\/000000\/type\/2\" ><\/a> <span property=\"dc:description\" content=\"This item is a component of the Oregon Hops & Brewing Archives, Special Collections & Archives Research Center, Oregon State University Libraries.\"><\/span> <span property=\"media:title\" content=\"Oregon Hop Commission Historical Footage\"><\/span> <span property=\"media:width\" content=\"400\"><\/span> <span property=\"media:height\" content=\"285\"> <\/span><span property=\"media:type\" content=\"application\/x-shockwave-flash\"><\/span> <span property=\"media:duration\" content=\"01:48:04\"><\/span><\/object>"
}
tpendragon commented 9 years ago

@wickr So this kinda sucks. Is there someone we can talk to in order to make oEmbed just work without auth?

wickr commented 9 years ago

Hmm, I could ask Raul, our contact there and former student, but I doubt there's much they can do since they run the Kaltura platform.

There could be some other sharing settings on the video that affect what you get back from oEmbed.

tpendragon commented 9 years ago

@wickr Worth a shot. It may be they just need to authenticate a URL - which sucks for testing, but means we wouldn't have to try to build an authenticating oEmbed provider client.

tpendragon commented 9 years ago

In the short term, should we add an OEmbed resource independent of whether or not it can handle media space?

wickr commented 9 years ago

I emailed Raul.

Yeah oEmbed could be useful for other things, though I don't have an example for our current content off the top of my head.

tpendragon commented 9 years ago

If we don't have a use case, then we can hold off.

tpendragon commented 9 years ago

We got OEmbed cleaned up for mediaspace and I have a local spike working. Need to do it right, but this is gonna work!