Child pages
  • Matterhorn Engage Player

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Engage's watch.js extracts information from URL parameters and or JSON to display video, annotation, segmentation and other things: http://opencast.jira.com/wiki/display/MH/Engage+URL+Parameters

Engage expects the HTML page to have certain elements in order to work, as evident in watch.js and init-watch.js. To make it work with VoV, we can:

  • Refactor Engage so it becomes independent from the HTML page it lives on (preferred way, not sure if Opencast likes)
  • Provide Engage the HTML structure it wants (faster approach)
  • Modify what Engage expects to better suit our application (avoid unless necessary)

Looking at the demo, we see

...

Json examples. Theoretically, we could modify these REST endpoints to be pointing to Matterhorn server and the full featured Engage would just work, provided we don't run into cross-domain problems. JSONP helps with the crossdomain problems, with the exception of usertracking.

Code Block
languagehtml/xml
titleservicedata.json
{
 "plugin_urls":
 {
 "analytics": "/usertracking/footprint.xml",
 "annotation": "/annotation/annotations.json",
 "description":
 {
 "episode": "/search/episode.json",
 "stats": "/usertracking/stats.json"
 },
 "search": "/search/episode.json",
 "segments_text": "/search/episode.json",
 "segments_ui": "/search/episode.json",
 "segments": "/search/episode.json",
 "series":
 {
 "series": "/search/series.json",
 "episode": "/search/episode.json"
 }
 },
 "mediaDebugInfo":
 {
 "mediaPackageId": "",
 "mediaUrlOne": "",
 "mediaUrlTwo": "",
 "mediaResolutionOne": "",
 "mediaResolutionTwo": "",
 "mimetypeOne": "",
 "mimetypeTwo": ""
 }
}

...

Code Block
languagebash
svn checkout https://opencast.jira.com/svn/MH/trunk/
cd trunk/modules/matterhorn-engage-player/
mvn clean install
cd ../../shared-resources/player/
mv matterhorn-engage-player-1.4-SNAPSHOT.swf Videodisplay.swf

Additional operation in the pom.xml file can copy the player files structure to a new directory, suitable to use with Hydrant.

Testing the Engage player

...

Code Block
languagejavascript
"mediaUrlOne": "http://demo.opencastproject.org/static/1733c580-1fb8-44c7-a6d8-e93577463cfe/2e3340ad-d309-4238-b85b-eb09e06a2bc4/presenter.flv",
"mediaUrlTwo": "http://demo.opencastproject.org/static/1733c580-1fb8-44c7-a6d8-e93577463cfe/2149f073-abde-46ef-a828-91c8a2016749/presentation.flv",

How to take out an Engage

...

Pieces independent from Matterhorn are Videodisplay.swf, FABridge.js, and Videodisplay.js. Theoretically we can embed Videodisplay.swf in a Flash object, use Videodisplay.js to hook the bridge up and setMediaURL. Doing this, I got the video cover to shows up, all Flash controls are there, but nothing happens when I click play.

component

Figure out which HTML elements we don't need and have javascript calls to detach() them.

Engage structure

Videodisplay.swf

Actual video player written in ActionScript

...

Segments UI

Series

Embeded mode

Shows the player without Matterhorn Media Module components.

Replace 'watch.html' with 'embed.html' http://someURL:8080/engage/ui/watch.html?id=someMediaPackageId -> http://someURL:8080/engage/ui/embed.html?id=someMediaPackageId

Url parameters: http://opencast.jira.com/wiki/display/MH/Engage+URL+Parameters