Commit 08e2bd6e authored by Seth Meranda's avatar Seth Meranda
Browse files

Fix the mediaelement to work on the video, simply swapped out old code with...

Fix the mediaelement to work on the video, simply swapped out old code with embed option from mediahub.
parent af3af93a
......@@ -73,8 +73,18 @@
</div>
</li>
<li id="slide_video">
<video src="http://www.unl.edu/ucomm/ucomm/av/video/gobigred/20110915_Ucomm_TV.mp4" poster="images/videoThumbnail.jpg" controls></video>
<div>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<video height="309" width="549" autoplay src="http://www.unl.edu/ucomm/ucomm/av/video/gobigred/20110915_Ucomm_TV.mp4" controls poster="http://itunes.unl.edu/thumbnails.php?url=http%3A%2F%2Fwww.unl.edu%2Fucomm%2Fucomm%2Fav%2Fvideo%2Fgobigred%2F20110915_Ucomm_TV.mp4">
<track src="http://mediahub.unl.edu/media/2411/vtt" kind="subtitles" type="text/vtt" srclang="en" />
</video>
<script type="text/javascript">
if (typeof(WDN) === "undefined") {
if (typeof(jQuery) === "undefined"){var j=document.createElement("script"); j.setAttribute("type","text/javascript"); j.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"); document.getElementsByTagName("head")[0].appendChild(j);}
} else {jQuery = WDN.jQuery;}
var c=document.createElement("link"); c.setAttribute("type", "text/css"); c.setAttribute("rel", "stylesheet"); c.setAttribute("href", "http://www.unl.edu/wdn/templates_3.0/css/content/mediaelement.css"); document.getElementsByTagName("head")[0].appendChild(c);
window.onload=function(){jQuery.getScript('http://www.unl.edu/wdn/templates_3.0/scripts/mediaelement.js', function(){jQuery('video,audio').mediaelementplayer();});};
</script>
<div>
<h3>Big Red in the Big Ten</h3>
<p>UNL's entry to the <a href="http://www.unl.edu/ucomm/aboutunl/big10.shtml" title="read more about the Big Ten Conference and CIC">Big Ten and the CIC</a> means exciting new opportunities for students and research ... and it's just the beginning.</p>
</div>
......
......@@ -55,47 +55,6 @@ WDN.jQuery(document).ready(function() {
});
});
WDN.jQuery(function(){
var uri = window.location.href.split('#');
sliderStart = 0;
if (!isNaN(parseInt(uri[1] *1))) {
sliderStart = uri[1] - 1;
}
jQuery = WDN.jQuery;
var forcePlay = false;
WDN.jQuery('#bigTenVideo').click(function() {
WDN.jQuery('.wdn_carousel').addClass('full');
forcePlay = true;
});
WDN.jQuery.getScript('http://www.unl.edu/wdn/templates_3.0/scripts/mediaelement.js',
function(){
WDN.jQuery('#bigTenVideo video').mediaelementplayer({
features: ['playpause','progress','current','duration','tracks','volume'],
pluginPath: '/wdn/templates_3.0/scripts/',
success: function(mediaElement, domObject) {
if (forcePlay) {
mediaElement.play();
}
var slideTimeout;
var videoUIToggle = function() {
if (slideTimeout) {
window.clearTimeout(slideTimeout);
}
WDN.jQuery('.wdn_carousel').addClass('full');
mediaElement.play();
WDN.jQuery(this).unbind('click');
};
WDN.jQuery('#bigTenVideo').unbind('click').click(videoUIToggle);
mediaElement.addEventListener('ended', function(){
WDN.jQuery('.wdn_carousel').removeClass('full');
WDN.jQuery('#bigTenVideo').unbind('click').click(videoUIToggle);
slideTimeout = window.setTimeout(function(){WDN.jQuery('.currentScroller').trigger('start')}, 5000);
});
}
});
});
});
function formatBlogDate(theDate) {
splitDates = theDate.split(" ");
//theDate = "<span class=\"month\">" + splitDates[2] + "</span> <span class=\"day\">" + splitDates[1] + "</span>";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment