Skip to end of metadata
Go to start of metadata

About

 Genus Media Upshot API allows to get a list of possible alternatives to embed a Player of a resource (file). This Player could be a video player, image preview, file preview, etc., all depends of the source requested. The service requires as parameters the ID of the resource and the ID of the repository where the resource can be found and Genus will return the list (JSON) of alternatives for using the player. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

There is no a link to Genus documentation.

Example of a Genus Player for a documentExample of a Genus Player for a video
API Request Details

Headers

Content-Type: application/json; charset=utf-8

Type

GET

URL

{host}%3A80/mediaupshot/services/player/{file-id}?mode=embedCodeList&repository={repository-id}

Note: the {file-id} must be the ID of the resource you are looking for. I´m not sure about the nomenclature of the {repository-id}, you need to check the value that Genus generate on your environment.

Example

http://www.mygenus.com%3A80/mediaupshot/services/player/ 22f01-8b-45-a7-b494de?mode=embedCodeList&repository=my-respository

Response

Status Code: 200 OK

Example Response

[
    {
        "name": "default",
        "type": "document",
        "description": "default",
        "embedCode":"<iframe scrolling='no' frameborder='0' src='http://www.mygenus.com/mediaupshot/services/player/22f01-8b-45-a7-b494de?repository=422-716-486-aef5-1acd8&displayMode=default' rel='muEmbeddedAsset'></iframe>",
        "isDefault":true,
        "options": {"downloadIconSize":"small","stop":0.0,"start":0.0,"previewImage":"preview","autoplay":false,"rendition":"master","originalWidth":816,"originalHeight":1056,"template":"default","repository":"422-716-486-aef5-1acd8","uuid":"22f01-8b-45-a7-b494de","autoPopup":true}
    },
    {
        "name": "overlay",
        "type": "document",
        "description": "overlay",
        "embedCode":"<iframe scrolling='no' frameborder='0' src='http://www.mygenus.com/mediaupshot/services/player/22f01-8b-45-a7-b494de?repository=422-716-486-aef5-1acd8&displayMode=overlay' rel='muEmbeddedAsset'></iframe>",
        "options": {"downloadIconSize":"small","stop":0.0,"start":0.0,"previewImage":"preview","autoplay":false,"rendition":"master","originalWidth":816,"originalHeight":1056,"template":"default","repository":"422-716-486-aef5-1acd8","uuid":"22f01-8b-45-a7-b494de","autoPopup":true}
    },
    {
        "name": "embed",
        "type": "document",
        "description": "embed",
        "embedCode":"<iframe scrolling='no' frameborder='0' src='http://www.mygenus.com/mediaupshot/services/player/22f01-8b-45-a7-b494de?repository=422-716-486-aef5-1acd8&displayMode=embed' rel='muEmbeddedAsset'></iframe>",
        "options": {"downloadIconSize":"small","stop":0.0,"start":0.0,"previewImage":"preview","autoplay":false,"rendition":"master","originalWidth":816,"originalHeight":1056,"template":"default","repository":"422-716-486-aef5-1acd8","uuid":"22f01-8b-45-a7-b494de","autoPopup":true}
    },
    {
        "name": "popup",
        "type": "document",
        "description": "popup",
        "embedCode":"<iframe scrolling='no' frameborder='0' src='http://www.mygenus.com/mediaupshot/services/player/22f01-8b-45-a7-b494de?repository=422-716-486-aef5-1acd8&displayMode=popup' style='display:none' rel='muEmbeddedAsset'></iframe>",
        "options": {"downloadIconSize":"small","stop":0.0,"start":0.0,"previewImage":"preview","autoplay":false,"rendition":"master","originalWidth":816,"originalHeight":1056,"template":"default","repository":"422-716-486-aef5-1acd8","uuid":"22f01-8b-45-a7-b494de","autoPopup":true}
    },
    {
        "name": "link",
        "type": "document",
        "description": "Link tag code",
        "embedCode": "<a target='_blank' rel='muEmbeddedAsset' href='http://www.mygenus.com/mediaupshot/services/player/22f01-8b-45-a7-b494de?repository=422-716-486-aef5-1acd8&rendition=master&template=default&start=0.0&stop=0.0&downloadIconSize=small'><img alt='TS_O2C_CreditFileApprovalandReviewForm.dot' src='http://www.mygenus.com/mediaupshot/myservices/contentEngine/preview/22f01-8b-45-a7-b494de/403e13d2-3603-4022-9486-7f70b2210e10/d2b948f9-3f69-4ea3-8393-6af78d63e270/22f01-8b-45-a7-b494de_640x480_1.jpg?repository=422-716-486-aef5-1acd8' class='muVideoAsset'></a>",
        "options": {"downloadIconSize":"small","stop":0.0,"start":0.0,"previewImage":"preview","autoplay":false,"rendition":"master","originalWidth":816,"originalHeight":1056,"template":"default","repository":"422-716-486-aef5-1acd8","uuid":"22f01-8b-45-a7-b494de","autoPopup":true}
    }
]

Example using jQuery

$.ajax({
    url : "http://www.mygenus.com%3A80/mediaupshot/services/player/22f01-8b-45-a7-b494de?mode=embedCodeList&repository=myrespository",
    type : "GET",
    async : true,
    contentType : "application/json; charset=utf-8",
    statusCode : {
        200 : function(json) {
            console.log("player");
        }
    }
});

Note:  console.log() can throw errors in IE, they are there for illustrative purposes only and should be changed as required.

About the author

Enterprise Web Developer
Joaquin is an Enterprise Web Developer at Base22 with over seven years of experience designing and developing web solutions for enterprise clients. He is a well rounded web developer with skills building interfaces in IBM WebSphere Portal and WCM, IBM Connections, and many others. He is an Oracle Certified Java Developer and a Microsoft Certified Visual Studio Developer. He blogs at http://j-arellano.com