Media Instance Resource

Resource URI

https://mediahub.unl.edu/media/{id}

Note

All xml extra xml elements for media will be outputed to JSON with a '(namespace)_(key)':'(value)' pattern. These elements include, but are not limited to: geo infomration, itunes details, media details, and boxee information. These values will only display if they are set.

Resource Properties

Property Description JSON XML
id int: A numerical id for the media. 1
url URL: A url to the actual media file. 1
link URL: The url to the media file on Media Hub. 1 1
title Text: The title of the media. 1 1
description Text: The descripton of the media. 1 1
length Int: The size of the media file in bytes. 1
image URL: A url to the image of the midea. 1
type TEXT: The type of media. 1
author Text: The author of the media. 1
pubDate Date: The date the media was published. YYYY-MM-DD HH:MM:SS. 1 1
dateupdated Date: The date the media was last updated. YYYY-MM-DD HH:MM:SS. 1
lastBuildDate Date: The date and time that the feed was last built. 1
docs URL: Link to RSS specification 1
generator Text: Name and version of the generator used to generate the channel. 1
managingEditor Text: Details about the managing Editor. 1
webMaster Text: Details about the webmaster. 1
ttl Int: The maximum number of minutes the chanel has to live before referesing from the source. 1

Examples

Request

GET https://mediahub.unl.edu/media/1?format=json

Response

                            {
    "id": 1,
    "url": "https:\/\/mediahub.unl.edu\/uploads\/ucomm\/av\/video\/podcasts\/20100607_JazzInJune.mp4",
    "title": "Jazz In June Time Lapse",
    "description": "<p>Time lapse of the crowd at Jazz In June.<\/p>",
    "length": 7145215,
    "image": "https:\/\/mediahub.unl.edu\/media\/1\/image",
    "type": "video\/mp4",
    "author": "University Communications",
    "link": "https:\/\/mediahub.unl.edu\/media\/1",
    "pubDate": "2011-03-25 08:59:40",
    "dateupdated": null,
    "embed": "\n\n<div style=\"padding-top: 56.25%; overflow: hidden; position:relative; -webkit-box-flex: 1; flex-grow: 1;\">\n  <iframe\n    style=\"bottom: 0; left: 0; position: absolute; right: 0; top: 0; border: 0; height: 100%; width: 100%;\"\n    src=\"https:\/\/mediahub.unl.edu\/media\/1?format=iframe&autoplay=0\"\n    title=\"Video Player:  Jazz In June Time Lapse\"\n    allowfullscreen\n  ><\/iframe>\n<\/div>",
    "media_content url=\"http:\/\/www.unl.edu\/ucomm\/ucomm\/av\/video\/podcasts\/20100607_JazzInJune.mp4\" fileSize=\"7145215\" type=\"video\/mp4\" lang=\"en\" width=\"640\" height=\"480\"": "",
    "media_copyright": "2010 University of Nebraska Lincoln",
    "media_thumbnail url=\"http:\/\/itunes.unl.edu\/thumbnails.php?url=http%3A%2F%2Fwww.unl.edu%2Fucomm%2Fucomm%2Fav%2Fvideo%2Fpodcasts%2F20100607_JazzInJune.mp4\"": ""
}
                        

Request

GET https://mediahub.unl.edu/media/1?format=xml

Response

                            <?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:itunesu='http://www.itunesu.com/feed' xmlns:itunes='http://www.itunes.com/dtds/podcast-1.0.dtd' xmlns:media='http://search.yahoo.com/mrss/' xmlns:boxee='http://boxee.tv/spec/rss/' xmlns:geo='http://www.w3.org/2003/01/geo/wgs84_pos#' xmlns:mediahub='https://mediahub.unl.edu/schema/mediahub.xsd' >
  <channel>
    <title>UNL MediaHub</title>
    <link>https://mediahub.unl.edu/</link>
    <description>Media from the University of Nebraska-Lincoln</description>
    <language>en-us</language>
    <pubDate>Mon, 04 Mar 2024 18:36:08 -0600</pubDate>
    <lastBuildDate>Mon, 04 Mar 2024 18:36:08 -0600</lastBuildDate>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>UNL_MediaHub 0.1.0</generator>
    <managingEditor>wdn@unl.edu</managingEditor>
    <webMaster>wdn@unl.edu</webMaster>
    <ttl>5</ttl>
    <item>
  <title>Jazz In June Time Lapse</title>
  <link>https://mediahub.unl.edu/media/1</link>
  <description><![CDATA[
  <p>Time lapse of the crowd at Jazz In June.</p>  ]]></description>
  <guid>https://mediahub.unl.edu/uploads/ucomm/av/video/podcasts/20100607_JazzInJune.mp4</guid>
  <pubDate>Fri, 25 Mar 2011 08:59:40 -0500</pubDate>
  <media:content url="http://www.unl.edu/ucomm/ucomm/av/video/podcasts/20100607_JazzInJune.mp4" fileSize="7145215" type="video/mp4" lang="en" width="640" height="480"></media:content>
<media:copyright>2010 University of Nebraska Lincoln</media:copyright>
<media:thumbnail url="http://itunes.unl.edu/thumbnails.php?url=http%3A%2F%2Fwww.unl.edu%2Fucomm%2Fucomm%2Fav%2Fvideo%2Fpodcasts%2F20100607_JazzInJune.mp4"></media:thumbnail>
  <enclosure url="https://mediahub.unl.edu/uploads/ucomm/av/video/podcasts/20100607_JazzInJune.mp4" length="7145215" type="video/mp4" />
</item>    </channel>
</rss>

                        

Request

GET https://mediahub.unl.edu/media/1?format=partial

Response

                            
<div class="dcf-bleed mh-video-band">
    <div class="dcf-wrapper dcf-pt-4 dcf-pb-4 dcf-d-flex dcf-jc-center">
        <div class="dcf-ratio dcf-ratio-16x9 dcf-flex-grow-1">
            <iframe class="dcf-ratio-child dcf-obj-fit-contain dcf-obj-top dcf-b-0" height="667" src="https://mediahub.unl.edu/media/1?format=iframe&autoplay=0&preload=auto" allowfullscreen title="play media"></iframe>
        </div>
    </div>
</div>


<div class="dcf-bleed dcf-pt-8 dcf-pb-8">
    <div class="dcf-wrapper mh-media-page">
                <div class="dcf-grid dcf-col-gap-vw dcf-row-gap-4">
            <div class="dcf-col-100% dcf-col-75%-start@sm">
                <h1>Jazz In June Time Lapse</h1>
                                
                <div class="mh-authoring dcf-grid-thirds@sm dcf-col-gap-vw dcf-txt-center">
                                            <div class="mh-stat">
                            <span class="mh-count">University Communications</span>
                            <span class="mh-context unl-font-sans">Author</span>
                        </div>
                                        <div class="mh-stat">
                        <span class="mh-count">03/25/2011</span>
                        <span class="mh-context unl-font-sans">Added</span>
                    </div>
                    <div class="mh-stat">
                        <span class="mh-count">180</span>
                        <span class="mh-context unl-font-sans">Plays</span>
                    </div>
                </div>
                <hr>

                <h2 class="unl-font-sans">Description</h2>
                <div class="mh-summary"><p>Time lapse of the crowd at Jazz In June.</p></div>
                <hr>

                
                
                <div id="comments">
                                        <h2 class="unl-font-sans">Comments <svg class="dcf-h-4 dcf-w-4 dcf-fill-current" focusable="false" height="16" width="16" viewBox="0 0 24 24" aria-labelledby="icon-comment-65e668f8bd06b"><title id="icon-comment-65e668f8bd06b">icon comment</title><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/><path d="M0 0h24v24H0z" fill="none"/></svg></h2>
                    <span class="subhead">
                        0 Comments
                                            </span>
                                    </div>

                                    <a href="https://shib.unl.edu/idp/profile/cas/login?service=https%3A%2F%2Fmediahub.unl.edu%2Fmedia%2F1">Log in to post comments</a>
                
            </div>

            <div class="dcf-col-100% dcf-col-25%-end@sm mh-sidebar">

              <div class="dcf-pt-4">
                <div class="dcf-mb-4">
                    <button
                        class="
                            dcf-btn
                            dcf-btn-secondary
                            mh-hide-bp2
                            dcf-btn-toggle-modal
                            dcf-d-flex
                            dcf-jc-center
                            dcf-ai-center
                            dcf-col-gap-2
                        "
                        type="button"
                        data-toggles-modal="embed-modal"
                        aria-label="Show Media Embed Code"
                    >
                        <svg
                            xmlns="http://www.w3.org/2000/svg"
                            class="dcf-h-4 dcf-w-4 dcf-d-block dcf-fill-current"
                            viewBox="0 0 24 24"
                        >
                            <path d="M21.4,9.4h-6.7V2.6C14.6,1.2,13.5,0,12,0c-1.4,0-2.6,
                                1.2-2.6,2.6l0,6.7H2.6C1.2,9.4,0,10.6,0,12c0,1.4,1.2,2.6,
                                2.6,2.6h6.8l0,6.7c0,0.7,0.3,1.4,0.8,1.9c0.5,0.5,1.2,0.8,
                                1.9,0.8c1.4,0,2.6-1.2,2.6-2.6v-6.7h6.7c1.4,0,2.6-1.2,
                                2.6-2.6C24,10.6,22.8,9.4,21.4,9.4z"/>
                            <g>
                                <path fill="none" d="M0,0h24v24H0V0z"/>
                            </g>
                        </svg>
                        Embed
                    </button>
                </div>

                  <h5>Related Channels</h5>
<div class="channels">
            <div class="dcf-card-as-link">
        <div class="mh-channel-thumb mh-featured-channel">
            <div class="dcf-ratio dcf-ratio-16x9 mh-thumbnail-clip">
                                    <div class="dcf-ratio-child dcf-d-flex dcf-ai-center dcf-jc-center">
                        <img
                            class="dcf-h-8 dcf-w-8"
                            src="https://mediahub.unl.edu//templates/html/css/images/channel-icon.svg"
                            height="51"
                            width="51"
                            aria-hidden="true"
                            alt="">
                    </div>
                            </div>
        </div>
        <div class="mh-video-label dcf-txt-center">
            <a class="dcf-card-link title" href="https://mediahub.unl.edu/channels/185">More at UNL</a>
        </div>
    </div>
    </div>

              </div>

            </div>
        </div>
    </div>
</div>

<div class="dcf-modal" id="embed-modal" hidden>
    <div class="dcf-modal-wrapper">
        <header class="dcf-modal-header">
            <h2 id="embed-modal-heading">Embed</h2>
            <button class="dcf-btn-close-modal">Close</button>
        </header>
        <div class="dcf-modal-content">
            
            <p>Copy the following code into your page</p>
            <div class="dcf-grid-full dcf-rounded dcf-overflow-hidden dcf-mb-5">
                <div class="dcf-ai-center unl-bg-scarlet unl-cream" style="display: grid; grid-template-columns: 1fr auto;">
                    <p class="dcf-m-0 dcf-p-0 dcf-pl-3">
                        <span class="dcf-bold">HTML</span>
                    </p>
                    <button class="dcf-btn dcf-btn-primary dcf-m-1 dcf-d-flex dcf-ai-center copyCodeSnippet" type="button">
                        <svg
                            xmlns="http://www.w3.org/2000/svg"
                            class="dcf-h-5 dcf-w-5 dcf-fill-current"
                            focusable="false"
                            width="24"
                            height="24"
                            viewBox="0 0 24 24"
                            aria-labelledby="filled-copy-1-basic-title"
                        >
                            <title id="filled-copy-1-basic-title">Copy Code Snippet</title>
                            <path
                                d="M5.5,22C5.224,22,5,21.776,5,21.5V3H3.5C3.224,3,3,3.224,3,3.5v20C3,23.776,
                                3.224,24,3.5,24h14c0.276,0,0.5-0.224,0.5-0.5 V22H5.5z"
                            ></path>
                            <path
                                d="M21,6.5c0-0.133-0.053-0.26-0.146-0.353l-6-6C14.76,0.053,14.632,0,14.5,
                                0h-8C6.224,0,6,0.224,6,0.5v20 C6,20.776,6.224,21,6.5,21h14c0.276,0,
                                0.5-0.224,0.5-0.5V6.5z M14,7V1l6,6H14z"
                            ></path>
                            <g>
                                <path fill="none" d="M0 0H24V24H0z"></path>
                            </g>
                        </svg>
                    </button>
                </div>
                <pre
                    class="dcf-m-0 dcf-sharp dcf-p-3 dcf-overflow-x-auto dcf-lh-1"
                    style="background-color: var(--bg-code);"
                >

&lt;div style=&quot;padding-top: 56.25%; overflow: hidden; position:relative; -webkit-box-flex: 1; flex-grow: 1;&quot;&gt;
  &lt;iframe
    style=&quot;bottom: 0; left: 0; position: absolute; right: 0; top: 0; border: 0; height: 100%; width: 100%;&quot;
    src=&quot;https://mediahub.unl.edu/media/1?format=iframe&amp;autoplay=0&quot;
    title=&quot;Video Player:  Jazz In June Time Lapse&quot;
    allowfullscreen
  &gt;&lt;/iframe&gt;
&lt;/div&gt;</pre>
            </div>
        </div>
    </div>
</div>

<script>
    document.querySelectorAll('.copyCodeSnippet').forEach((copyButton) => {
        copyButton.addEventListener('click', async () => {
            const codeToCopy = copyButton.parentElement.nextElementSibling.innerText;
            await navigator.clipboard.writeText(codeToCopy);
        });
    });
</script>


                        

Format Information

The following is a list of formats used in MediaHub.