} );
// check for firefogg:
- if ( this.myFogg.firefoggCheck() ) {
+ if ( this.myFogg.getFirefogg() ) {
this.enabled = true;
} else {
this.enabled = false;
} );
}
},
+ getSrc: function(){
+ return this.src;
+ },
getSourceType:function() {
js_log( 'data type of: ' + this.src + ' = ' + typeof ( this.data ) + "\n" + this.data );
this.srcType = null;
doParse:function() {
var _this = this;
js_log( 'f:doParse smilPlaylist' );
- // @@todo get/parse meta that we are intersted in:
+ // @@todo get/parse meta that we are interested in:
var meta_tags = this.data.getElementsByTagName( 'meta' );
var metaNames = {
'title':'',
if ( $j( meta_elm ).attr( 'name' ) in metaNames ) {
_this[ $j( meta_elm ).attr( 'name' ) ] = $j( meta_elm ).attr( 'content' );
}
- // special check for wikiDesc
+ // Special check for wikiDesc
if ( $j( meta_elm ).attr( 'name' ) == 'wikiDesc' ) {
if ( meta_elm.firstChild )
_this.wikiDesc = meta_elm.firstChild.nodeValue;
}
} );
- // add transition objects:
+ // Add transition objects:
var transition_tags = this.data.getElementsByTagName( 'transition' );
$j.each( transition_tags, function( i, trans_elm ) {
if ( $j( trans_elm ).attr( "id" ) ) {
}
} );
js_log( 'loaded transitions:' + _this.transitions.length );
- // add seq (latter we will have support more than one seq tag) / more than one "track"
+
+ // Add seq (latter we will have support more than one seq tag) / more than one "track"
var seq_tags = this.data.getElementsByTagName( 'seq' );
$j.each( seq_tags, function( i, seq_elm ) {
var inx = 0;
// get all the clips for the given seq:
$j.each( seq_elm.childNodes, function( i, mediaElement ) {
- // ~complex~ @@todo to handlde a lot like "switch" "region" etc
+ // ~complex~ @@todo to handle a lot like "switch" "region" etc
// js_log('process: ' + mediaElemnt.tagName);
if ( typeof mediaElement.tagName != 'undefined' ) {
if ( _this.tryAddMedia( mediaElement, inx ) ) {
js_log( 'SMIL:tryAddMedia:' + mediaElement );
var _this = this;
- // set up basic mvSMILClip send it the mediaElemnt & mvClip init:
+ // Set up basic mvSMILClip send it the mediaElemnt & mvClip init:
var clipObj = { };
var cConfig = {
- "id" : 'p_' + _this.id + '_c_' + order,
- "pp" : this, // set the parent playlist object pointer
- "order" : order
- };
+ "id" : 'p_' + _this.id + '_c_' + order,
+ "pp" : this, // set the parent playlist object pointer
+ "order" : order
+ };
var clipObj = new mvSMILClip( mediaElement, cConfig );
+
// set optional params track
if ( typeof track_id != 'undefined' )
clipObj["track_id"] = track_id;
return true;
}
- // @@todo we could throw error details here once we integrate try catches everywhere :P
return false;
}
}
// get supported media attr init non-set
for ( var i = 0; i < mv_smil_ref_supported_attributes.length; i++ ) {
var attr = mv_smil_ref_supported_attributes[i];
- if ( $j( sClipElm ).attr( attr ) ) {
+ if ( $j( sClipElm ).attr( attr ) ) {
_this[attr] = $j( sClipElm ).attr( attr );
}
}
this['tagName'] = sClipElm.tagName;
+ // Fix url paths (if needed)
+ if( _this['src'] && _this.src.indexOf('/') != 0 && _this.src.indexOf('://') === -1)
+ _this['src'] = mw.absoluteUrl( _this['src'], mvClipInit.pp.getSrc() );
+
if ( sClipElm.firstChild ) {
this['wholeText'] = sClipElm.firstChild.nodeValue;
js_log( "SET wholeText for: " + this['tagName'] + ' ' + this['wholeText'] );
if ( !this.type && this.wholeText ) {
this.type = 'text/html';
}
- // also grab andy child param elements if present:
+ // Also grab any child param elements if present:
if ( sClipElm.getElementsByTagName( 'param' )[0] ) {
for ( var i = 0; i < sClipElm.getElementsByTagName( 'param' ).length; i++ ) {
this.params[ sClipElm.getElementsByTagName( 'param' )[i].getAttribute( "name" ) ] =
}
return this;
},
- // returns the values of supported_attributes:
+ /**
+ * Returns the values of supported_attributes:
+ */
getAttributeObj:function() {
var elmObj = { };
for ( var i = 0; i < mv_smil_ref_supported_attributes.length; i++ ) {
}
};
- /*
- * getAbsoluteUrl takes a src and returns the aboluste location given the document.URL
+ /**
+ * getAbsoluteUrl takes a src and returns the absolute location given the document.URL
* @param {String} src path or url
*/
- $.absoluteUrl = function( src ){
+ $.absoluteUrl = function( src, contextUrl ){
var pSrc = mw.parseUri( src );
if( pSrc.protocol != '')
return src;
- // Get the document path
- var pDoc = mw.parseUri( document.URL );
+ // Get parent Url location the context URL
+ if( contextUrl){
+ var pUrl = mw.parseUri( contextUrl );
+ } else {
+ var pUrl = mw.parseUri( document.URL );
+ }
// If a leading slash:
if( src.indexOf( '/' ) == 1 ){
- return pDoc.protocol + '://' + pDoc.authority + src;
+ return pUrl.protocol + '://' + pUrl.authority + src;
}else{
- return pDoc.protocol + '://' + pDoc.authority + pDoc.directory + src;
+ return pUrl.protocol + '://' + pUrl.authority + pUrl.directory + src;
}
};
/**
// Add the selector
iObj['player_target'] = this.selector;
mvJsLoader.doLoad( [
+ 'mvBaseUploadInterface',
'mvFirefogg',
'mvFirefoggRender'
], function() {
* to be run once controls are attached to the dom
*/
addControlHooks:function( $tp ) {
- // set up local pointer to the embedObj
+ // Set up local pointer to the embedObj
var embedObj = this.embedObj;
- var _this = this;
- // var embed_id = (embedObj.pc!=null)?embedObj.pc.pp.id:embedObj.id;
+ var _this = this;
if ( !$tp )
$tp = $j( '#' + embedObj.id );
- // add play hook:
+ // Add play hook:
$tp.find( '.play-btn,.play-btn-large' ).unbind().btnBind().click( function() {
embedObj.play();
} );
- // add recommend firefox if we have non-native playback:
+ // Add recommend firefox if we have non-native playback:
if ( embedObj.doNativeWarningCheck() ) {
$j( '#dc_' + embedObj.id ).hover(
function() {
}
- // captions binding:
+ // Captions binding:
$tp.find( '.timed-text' ).unbind().btnBind().click( function() {
embedObj.showTextInterface();
} );
- // options binding:
+ // Options binding:
$tp.find( '.options-btn' ).unbind().btnBind().click( function() {
embedObj.doOptionsHTML();
} );
- // fullscreen binding:
+ // Fullscreen binding:
$tp.find( '.fullscreen-btn' ).unbind().btnBind().click( function() {
embedObj.fullscreen();
} );
}
}
} );
- // up the z-index of the default status indicator:
+ // Up the z-index of the default status indicator:
$tp.find( '.play_head .ui-slider-handle' ).css( 'z-index', 4 );
$tp.find( '.play_head .ui-slider-range' ).addClass( 'ui-corner-all' ).css( 'z-index', 2 );
- // extended class list for jQuery ui themeing (we can probably refactor this with custom buffering highlighter)
- $tp.find( '.play_head' ).append( this.getMvBufferHtml() );
+
+ // Extended class list for jQuery ui themeing
+ //(we can probably refactor this with custom buffering highlighter)
+ $tp.find( '.play_head' ).append( this.getBufferHtml() );
$opt = $j( '#mv_vid_options_' + embedObj.id );
// videoOptions ... @@todo should be merged with something more like kskin.js:
} );
this.doVolumeBinding();
- // check if we have any custom skin hooks to run (only one per skin)
- if ( this.addSkinControlHooks && typeof( this.addSkinControlHooks ) == 'function' )
- this.addSkinControlHooks();
+ // Check if we have any custom skin Bindings to run
+ if ( this.addSkinControlBindings && typeof( this.addSkinControlBindings ) == 'function' )
+ this.addSkinControlBindings();
},
doVolumeBinding:function() {
var embedObj = this.embedObj;
js_log( 'clicked volume control' );
$j( '#' + embedObj.id ).get( 0 ).toggleMute();
} );
- // add vertical volume display hover
+
+ // Add vertical volume display hover
if ( this.volume_layout == 'vertical' ) {
// default volume binding:
var hoverOverDelay = false;
);
}
- // setup slider:
+ // Setup play-head slider:
var sliderConf = {
range: "min",
value: 80,
$tp.find( '.volume-slider' ).slider( sliderConf );
},
- getMvBufferHtml:function() {
+ /*
+ * Gets the Buffer Html that overlays the playhead
+ */
+ getBufferHtml:function() {
return '<div class="ui-slider-range ui-slider-range-min ui-widget-header ' +
'ui-state-highlight ui-corner-all ' +
'mv_buffer" style="width:0px;height:100%;z-index:1;top:0px" />';
*/
loadGM( {
- "mwe-credit-title" : "Title: $1"
+ "mwe-credit-title" : "Title: $1",
+ "mwe-kaltura-platform-title" : "Kaltura open source video platform"
} );
var kskinConfig = {
}
}
},
- addSkinControlHooks: function() {
+ /**
+ * Adds the skin Control Bindings
+ */
+ addSkinControlBindings: function() {
var embedObj = this.embedObj;
var _this = this;
var $tp = $j( '#' + embedObj.id );
embedObj = this.embedObj;
var _this = this;
$target = $j( '#' + embedObj.id + ' .menu-credits' );
+
$target.html( '<h2>' + gM( 'mwe-credits' ) + '</h2>' +
'<div class="credits_box ui-corner-all">' +
mv_get_loading_img() +
'</div>'
);
-
+
if( mw.conf.k_attribution == true ){
$target.append(
- $j('<div/>').addClass( 'k-attribution')
+ $j('<div/>').addClass( 'k-attribution' )
+ .attr({
+ 'title': gM('mwe-kaltura-platform-title')
+ })
+ .click( function(){
+ window.location = 'http://kaltura.com';
+ })
);
}
float: left;
width: 90px;
margin: 4px;
+}
+
+.k-player .k-attribution{
+ position:absolute;
+ bottom: 15px;
+ right : 62px;
+ background: url("images/kaltura_open_source_video_platform.png");
+ width : 51px;
+ height : 12px;
+ cursor: pointer;
}
\ No newline at end of file
+++ /dev/null
-
-/* player styles */
-.k-player { width:400px; height:340px; position:relative;} /* inline via jq */
-.k-player * { padding:0; margin:0;} /* inline via jq */
-.k-edit-bar { }
-.k-edit-bar a { width:33px; padding: 1px 0 0; display:block; text-align:center; font-weight:bold; color:#888; text-decoration:none; background:#F2F2F2;}
-
-.k-video { width:400px; height:300px; background:#000; margin-bottom:1px;} /* h & w inline via jq */
-.k-control-bar { height:21px; padding: 2px 0 0 6px; margin-top:1px; background: url(images/ksprite.png) repeat-x 0 -81px; font: normal 11px arial,sans-serif; color:#555;}
-.k-control-bar button, .k-control-bar div.ui-slider, .k-control-bar div.k-timer { float:left;}
-.k-timer { margin-top:2px;}
-.k-volume-slider { width:26px;}
-.k-control-bar .k-options { width:50px; height:22px; text-transform:uppercase; margin-top:-2px; border: solid 1px #aaa; border-top:none; float:right; font: bold 11px arial,sans-serif; color:#555;}
-
-span.ui-icon.ui-icon-k-menu { width:auto; padding-left:2px; background:none; outline:none; cursor:default;}
-.k-menu { opacity:0.9; filter:alpha(opacity=90); z-index:1; width:400px; height:300px; background:#181818; position:absolute; top:0px; left:0px;} /* h, w, top inline via jq top:15px*/
-
-ul.k-menu-bar{ height:128px; padding: 0 0 5px;position:absolute; bottom:5px;right:0px; list-style: none outside none; background: url(images/ksprite.png) -99px -104px no-repeat;} /* eventually: mtop inline via jq */
-.k-menu-bar li a { display:block; width:49px; height:32px; margin-left:1px; text-indent:99999px; background: url(images/ksprite.png) -51px -110px no-repeat; overflow:hidden;}
-.k-menu-bar li a:hover { background-position: -1px -110px;}
-
-
-.k-menu-bar li.k-download-btn a { background-position: -51px -203px;}
-.k-menu-bar li.k-download-btn a:hover { background-position: -1px -203px;}
-
-.k-menu-bar li.k-share-btn a { background-position: -51px -172px;}
-.k-menu-bar li.k-share-btn a:hover { background-position: -1px -172px;}
-
-.k-menu-bar li.k-credits-btn a { background-position: -51px -141px;}
-.k-menu-bar li.k-credits-btn a:hover { background-position: -1px -141px;}
-
-
-
-.k-menu-screens { width:320px; padding: 13px 10px 15px 15px; float:left;} /* w & h inline via jq */
-.k-menu-screens h2 { padding: 0 0 5px 1px; clear:both; font-size:12px; color:#666;}
-.k-menu-screens p { margin: 6px 0;}
-.k-menu-screens a { ;}
-.k-menu-screens a img { border:none;}
-.k-menu-screens ul { padding:0; margin: 6px 0 0; list-style: none outside none;}
-
-.k-edit-screen { width:370px; height:223px; padding-top:77px; text-align:center; background:#181818; color:#fff;}
-.k-edit-screen div { }
-.k-edit-screen a { color:#7BB8FC;}
-.k-edit-screen a img { border:none;}
-
-/* end player */
-
-.k-slide-window { overflow:hidden;}
-.k-menu-screens .menu-credits ul { float:left;}
-.k-menu-screens .menu-credits li { height:39px; padding: 11px 11px 11px 11px; margin-bottom:12px; display:block; background:#333;}
-.k-menu-screens .menu-credits li a { padding:0; background:none;}
-.k-menu-screens .menu-credits li img { float:left; background:blue;}
-.k-menu-screens .menu-credits li div { height:39px; padding-left:11px; floats:left; overflow:hidden;}
-
-a.k-prev-credit, a.k-next-credit { width:65px; height:28px; margin: -13px auto -6px; display:block; background: url(images/ksprite.png) 0px -320px no-repeat;}
-a.k-next-credit { margin: 0 0 1px; position:absolute; bottom:0; background-position: -0px -290px;}
-a:hover.k-prev-credit { background-position: 0px -238px;}
-a:hover.k-next-credit { background-position: 0px -260px;}
-
-.k-logo { margin:8px 0 0 1px; display:block;}
-
-.k_field_wrap { border: solid 1px #444; margin-bottom:7px;}
-.k-screen.k-share button { width:70px; padding:2px 5px 3px; border:1px solid #000; float:right; background: #D4D4D4 url(images/ksprite.png) no-repeat -32px 0; color:#000; float:right;}
-.k-menu textarea { width:100%; height:15px; border: solid 2px #000; border-bottom:none; border-right:none; background:transparent; color:#ccc; overflow:hidden;}
-
-.k-screen.k-share div.ui-state-highlight { width:90px; padding:2px 5px; border-color:#554926; float:left; background:none; color:#FFE96E;}
-.k-screen.k-share div.ui-state-highlight a { color:#FFE96E; font-weight:bold;}
-.k-screen.k-share div.ui-state-highlight a:hover { }
-
-.k-menu-screens li { height:14px; margin-bottom:6px;}
-.k-menu-screens li a { padding-left:22px; background:url(images/ksprite.png) no-repeat -85px -274px; text-decoration:none;}
-.k-menu-screens li a.active, .k-menu-screens li a:hover.active { background-position: -85px -247px;}
-.k-menu-screens li a:hover { background-position: -85px -260px;}
-
-.k-options.ui-state-hover { color:blue;}
-
-.k-player .ui-state-default .ui-icon, .k-player .ui-state-hover .ui-icon {background:transparent url(images/ksprite.png) no-repeat scroll 0 -48px;}
-
-.k-player .ui-state-default .ui-icon-arrow-4-diag { background-position: 0 -32px;} /* fullscreen */
-.k-player .ui-state-hover .ui-icon-arrow-4-diag { background-position: -16px -32px;}
-.k-player .ui-state-default .ui-icon-volume-on, .ui-state-hover .ui-icon-volume-off, { margin-left:-6px; background-position: -16px -48px;}
-.k-player .ui-state-hover .ui-icon-volume-on, .ui-state-default .ui-icon-volume-off { margin-left:-6px; background-position: 0 -48px;}
-
-.k-player .ui-state-default .ui-icon-play { background:url(images/ksprite.png) no-repeat 0 0;}
-.k-player .ui-state-hover .ui-icon-play { background-position: -16px 0;}
-
-.k-player .ui-state-default .ui-icon-pause { background:url(images/ksprite.png) no-repeat 0 -17px;}
-.k-player .ui-state-hover .ui-icon-pause { background-position: -16px -17px;}
-
-.k-control-bar .ui-slider { height:8px; border: solid 1px #eee; margin: 4px 10px 0 7px; position:relative; background:url(images/ksprite.png) repeat-x 0 -350px;}
-.k-control-bar .ui-slider-handle { width:8px; height:8px; top:0px; border: solid 1px #888; margin: -1px 0 0 -5px; display:block; position:relative; background: url(images/ksprite.png) no-repeat -67px -341px; position:absolute;}
-.k-control-bar .ui-slider-range { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -368px; -moz-border-radius:5px; -webkit-border-radius:5px;}
-.k-control-bar .ui-slider-buffer { height:8px; position:absolute; background: url(images/ksprite.png) repeat-x 0 -359px; -moz-border-radius:5px; -webkit-border-radius:5px;}
-
-.k-control-bar .ui-slider.k-volume-slider { height:15px; margin: 2px 3px 0 -4px; /* ie = m: 3 3 0 -2 */ border:none; background-position: -66px -323px; -moz-border-radius:0px; -webkit-border-radius:0px;}
-.k-control-bar .k-volume-slider a.ui-slider-handle { width:8px; height:18px; margin: -3px 5px 0 -1px; border:none; display:block; position:absolute; background:none;}
-.k-control-bar .k-volume-slider a:hover.ui-slider-handle { border: solid 1px #999;}
-.k-control-bar .k-volume-slider .ui-slider-range { height:17px; position:absolute; background: url(images/ksprite.png) repeat-x -66px -306px; -moz-border-radius:0; -webkit-border-radius:0;}
-
-.play-btn-large { width:120px; height:55px; background: url(images/ksprite.png) no-repeat 28px -433px; position:absolute; cursor:pointer;} /*.ui-state-default */
-.play-btn-large.ui-state-hover { background: url(images/ksprite.png) no-repeat 28px -377px; }
-
-.k-volume.ui-state-hover { margin-left:6px; }
-
-/* move to ie css */
-.k-volume-slider span, span.ui-icon-play, span.ui-icon-volume-on, button.k-fullscreen { *margin-top:-1px;}
-span.ui-icon-volume-on { *margin-left:0 !important;}
-.ui-state-hover.k-volume { *margin-left:0 !important;}
-span.ui-icon-k-menu { *margin-top:3px;}
-.k-control-bar .ui-slider.k-volume-slider { *margin-left:-2px;}
-/* end IE css */
-
-/* fixes for jquery.ui themes */
-.play-btn-large.ui-state-default{ border:none; }
-.k-control-bar button{ border:none; background:transparent;}
-.k-control-bar.ui-widget-header{ border:none; margin-top:0px;}
-
-ui-widget-content a {
- text-decoration:underline;
-}
-
-.ui-icon_link {
- padding:0.4em 1em 0.4em 20px;
- position:relative;
- text-decoration:none;
-}
-.ui-icon_link span.ui-icon {
- left:0.2em;
- margin:-8px 5px 0 0;
- position:absolute;
- right:auto;
- top:50%;
-}
-.ui-dialog-buttonpane {
- padding:10px !important;
-}
-
-.mv_clip_box_result {
-border:thin solid #BBBBBB;
-float:left;
-overflow:hidden;
-padding:10px;
-}
-