Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/baseRemoteSearch.js |
— | — | @@ -157,12 +157,15 @@ |
158 | 158 | }, |
159 | 159 | //default license permission wiki text is cc based template mapping (does not confirm the templates actually exist) |
160 | 160 | getPermissionWikiTag: function( rObj ){ |
| 161 | + if(!rObj.license) |
| 162 | + return '';//no license info |
161 | 163 | //check that its a defined creative commons licnese key: |
162 | | - if( typeof this.rsd.licenses.cc.licenses[ rObj.license.key ] != 'undefined' ){ |
| 164 | + if( this.rsd.licenses.cc.licenses[ rObj.license.key ] != 'undefined' ){ |
163 | 165 | return '{{Cc-' + rObj.license.key + '}}'; |
164 | 166 | }else if( rObj.license.lurl ) { |
165 | 167 | return '{{Template:External_License|' + rObj.license.lurl + '}}'; |
166 | | - } |
| 168 | + } |
| 169 | + |
167 | 170 | }, |
168 | 171 | getImportResourceDescWiki:function(rObj){ |
169 | 172 | return rObj.title + ' imported from ' + '[' + this.cp.homepage + |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js |
— | — | @@ -218,23 +218,12 @@ |
219 | 219 | }, |
220 | 220 | //doChunkUpload does both uploading and encoding at the same time and uploads one meg chunks as they are ready |
221 | 221 | doChunkUpload : function(){ |
222 | | - var _this = this; |
223 | | - //add chunk response hook to build the resultURL when uploading chunks |
224 | | - /*_this.fogg.setChunkCallback( function( result ){ |
225 | | - js_log( 'chunkResponseHook:' + result ); |
226 | | - try{ |
227 | | - var upRes = JSON.parse( result ); |
228 | | - if( upRes.upload.sessionkey ){ |
229 | | - |
230 | | - } |
231 | | - if( upRes.upload.result ){ |
232 | | - |
233 | | - } |
234 | | - }catch(e){ |
235 | | - js_error( 'error could not parse chunkResponse' ); |
236 | | - } |
237 | | - });*/ |
| 222 | + var _this = this; |
238 | 223 | |
| 224 | + if( ! _this.api_url ) |
| 225 | + return js_error( 'Error: can\'t autodetect mode without api url' ); |
| 226 | + |
| 227 | + //add chunk response hook to build the resultURL when uploading chunks |
239 | 228 | |
240 | 229 | //build the api url: |
241 | 230 | var aReq ={ |
— | — | @@ -250,9 +239,12 @@ |
251 | 240 | |
252 | 241 | if( _this.formData['wpIgnoreWarning'] ) |
253 | 242 | aReq['ignorewarnings'] = _this.formData['wpIgnoreWarning']; |
254 | | - |
255 | | - _this.fogg.upload( JSON.stringify( _this.encoder_settings ), aReq , JSON.stringify( _this.formData ) ); |
| 243 | + |
| 244 | + js_log('do fogg upload call: '+ _this.api_url + ' :: ' + JSON.stringify( aReq ) ); |
256 | 245 | |
| 246 | + |
| 247 | + _this.fogg.upload( JSON.stringify( _this.encoder_settings ), _this.api_url , JSON.stringify( aReq ) ); |
| 248 | + |
257 | 249 | //update upload status: |
258 | 250 | _this.doUploadStatus(); |
259 | 251 | }, |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvPlayList.js |
— | — | @@ -790,7 +790,8 @@ |
791 | 791 | callback(); |
792 | 792 | }); |
793 | 793 | } |
794 | | - }, |
| 794 | + }, |
| 795 | + //this is pretty outdated: |
795 | 796 | getPLControls: function(){ |
796 | 797 | js_log('getPL cont'); |
797 | 798 | return '<a id="mv_prev_link_'+this.id+'" title="Previus Clip" onclick="document.getElementById(\''+this.id+'\').prev();return false;" href="#">'+ |
— | — | @@ -848,6 +849,7 @@ |
849 | 850 | //init: |
850 | 851 | //debugger; |
851 | 852 | |
| 853 | + |
852 | 854 | this.embed=null; |
853 | 855 | //js_log('setup embed for clip '+ this.id + ':id is a function?'); |
854 | 856 | //set up the pl_mv_embed object: |
— | — | @@ -868,11 +870,11 @@ |
869 | 871 | |
870 | 872 | if(this.poster)init_pl_embed['thumbnail']=this.poster; |
871 | 873 | |
872 | | - if(this.type)init_pl_embed['type'] = this.type; |
| 874 | + if( this.type ) init_pl_embed['type'] = this.type; |
873 | 875 | |
874 | | - this.embed = new PlMvEmbed(init_pl_embed); |
| 876 | + this.embed = new PlMvEmbed( init_pl_embed ); |
875 | 877 | |
876 | | - js_log('ve src len:' + this.embed.media_element.sources.length); |
| 878 | + js_log('media src len:' + this.embed.media_element.sources.length); |
877 | 879 | //js_log('media element:'+ this.embed.media_element.length); |
878 | 880 | //js_log('type of embed:' + typeof(this.embed) + ' seq:' + this.pp.sequencer+' pb:'+ this.embed.play_button); |
879 | 881 | }, |
— | — | @@ -1018,7 +1020,7 @@ |
1019 | 1021 | } |
1020 | 1022 | var videoInterface = new embedVideo(ve); |
1021 | 1023 | //inherit the videoInterface |
1022 | | - for(method in videoInterface){ |
| 1024 | + for( method in videoInterface ){ |
1023 | 1025 | if(method!='style'){ |
1024 | 1026 | if(this[method]){ |
1025 | 1027 | //parent embed method preservation: |
— | — | @@ -1030,7 +1032,7 @@ |
1031 | 1033 | //string -> boolean: |
1032 | 1034 | if(this[method]=="false")this[method]=false; |
1033 | 1035 | if(this[method]=="true")this[method]=true; |
1034 | | - } |
| 1036 | + } |
1035 | 1037 | }, |
1036 | 1038 | stop:function(){ |
1037 | 1039 | //set up convenience pointer to parent playlist |
— | — | @@ -1502,7 +1504,7 @@ |
1503 | 1505 | var meta_tags = this.data.getElementsByTagName('meta'); |
1504 | 1506 | var metaNames = new Array('title','interface_url', 'linkback', 'mTitle', 'mTalk'); |
1505 | 1507 | $j.each(meta_tags, function(i,meta_elm){ |
1506 | | - js_log( "on META tag: "+ $j(meta_elm).attr('name') ); |
| 1508 | + //js_log( "on META tag: "+ $j(meta_elm).attr('name') ); |
1507 | 1509 | for(var i in metaNames){ |
1508 | 1510 | var _name = metaNames[i]; |
1509 | 1511 | if( $j(meta_elm).attr('name') && $j(meta_elm).attr('content') ){ |
— | — | @@ -1550,13 +1552,13 @@ |
1551 | 1553 | "pp":this, //set the parent playlist object pointer |
1552 | 1554 | "order": order |
1553 | 1555 | } |
1554 | | - ); |
| 1556 | + ); |
1555 | 1557 | //set optional params track |
1556 | 1558 | if( typeof track_id != 'undefined') |
1557 | 1559 | clipObj["track_id"] = track_id; |
1558 | 1560 | |
1559 | 1561 | //debugger; |
1560 | | - if (clipObj ){ |
| 1562 | + if ( clipObj ){ |
1561 | 1563 | //set up embed: |
1562 | 1564 | clipObj.setUpEmbedObj(); |
1563 | 1565 | //add clip to track: |
— | — | @@ -1590,8 +1592,7 @@ |
1591 | 1593 | mvSMILClip.prototype = { |
1592 | 1594 | params : {}, //support param as child of ref clips per SMIL spec |
1593 | 1595 | init:function(sClipElm, mvClipInit){ |
1594 | | - _this = this; |
1595 | | - |
| 1596 | + _this = this; |
1596 | 1597 | //make new mvCLip with ClipInit vals |
1597 | 1598 | var myMvClip = new mvClip( mvClipInit ); |
1598 | 1599 | |
— | — | @@ -1607,14 +1608,14 @@ |
1608 | 1609 | //get supported media attr init non-set |
1609 | 1610 | $j.each(mv_smil_ref_supported_attributes, function(i, attr){ |
1610 | 1611 | if( $j(sClipElm).attr(attr)){ |
1611 | | - _this[attr]=$j(sClipElm).attr(attr); |
| 1612 | + _this[attr] = $j(sClipElm).attr(attr); |
1612 | 1613 | } |
1613 | 1614 | }) |
1614 | 1615 | this['tagName'] = sClipElm.tagName; |
1615 | 1616 | |
1616 | 1617 | if( sClipElm.firstChild ){ |
1617 | 1618 | this['wholeText'] = sClipElm.firstChild.nodeValue; |
1618 | | - js_log("SET wholeText for: "+this['tagName'] + ' '+ this['wholeText']); |
| 1619 | + js_log("SET wholeText for: " + this['tagName'] + ' '+ this['wholeText']); |
1619 | 1620 | } |
1620 | 1621 | //debugger; |
1621 | 1622 | //mv_embed specific property: |
— | — | @@ -1635,13 +1636,17 @@ |
1636 | 1637 | this.transOut.transAttrType = 'transOut'; |
1637 | 1638 | } |
1638 | 1639 | //parse duration / begin times: |
1639 | | - if(this.dur) |
1640 | | - this.dur = smilParseTime(this.dur); |
| 1640 | + if( this.dur ) |
| 1641 | + this.dur = smilParseTime( this.dur ); |
1641 | 1642 | |
1642 | 1643 | //conform type to video/ogg: |
1643 | | - if(this['type']=='application/ogg'){ |
1644 | | - this['type']='video/ogg'; //conform to 'video/ogg' type |
1645 | | - } |
| 1644 | + if( this.type == 'application/ogg' ) |
| 1645 | + this.type = 'video/ogg'; //conform to 'video/ogg' type |
| 1646 | + |
| 1647 | + //if unset type and we have innerHTML assume text/html type |
| 1648 | + if( !this.type && this.wholeText ){ |
| 1649 | + this.type = 'text/html'; |
| 1650 | + } |
1646 | 1651 | |
1647 | 1652 | //also grab andy child param elements if present: |
1648 | 1653 | if( sClipElm.getElementsByTagName('param')[0] ){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js |
— | — | @@ -501,10 +501,10 @@ |
502 | 502 | init:function( video_element ) |
503 | 503 | { |
504 | 504 | var _this = this; |
505 | | - js_log('Initializing mediaElement...' + video_element); |
| 505 | + js_log('Initializing mediaElement...' ); |
506 | 506 | this.sources = new Array(); |
507 | 507 | this.thumbnail = mv_default_thumb_url; |
508 | | - // Process the <video> element |
| 508 | + // Process the source element: |
509 | 509 | if($j(video_element).attr("src")) |
510 | 510 | this.tryAddSource(video_element); |
511 | 511 | |
— | — | @@ -592,7 +592,7 @@ |
593 | 593 | return true; |
594 | 594 | } |
595 | 595 | //set via user-preference |
596 | | - if(embedTypes.players.preference['format_prefrence']==mime_type){ |
| 596 | + if(embedTypes.players.preference['format_prefrence'] == mime_type){ |
597 | 597 | js_log('set via preference: '+playable_sources[source].mime_type); |
598 | 598 | this.selected_source = playable_sources[source]; |
599 | 599 | return true; |
— | — | @@ -678,7 +678,7 @@ |
679 | 679 | */ |
680 | 680 | tryAddSource:function(element) |
681 | 681 | { |
682 | | - //js_log('f:tryAddSource:'+ $j(element).attr("src")); |
| 682 | + js_log('f:tryAddSource:'+ $j(element).attr("src")); |
683 | 683 | if (! $j(element).attr("src")){ |
684 | 684 | //js_log("element has no src"); |
685 | 685 | return false; |
— | — | @@ -695,7 +695,7 @@ |
696 | 696 | } |
697 | 697 | var source = new mediaSource( element ); |
698 | 698 | this.sources.push(source); |
699 | | - //js_log('pushed source to stack'+ source + 'sl:'+this.sources.length); |
| 699 | + //alert('pushed source to stack'+ source + 'sl:'+this.sources.length); |
700 | 700 | }, |
701 | 701 | getPlayableSources: function(){ |
702 | 702 | var playable_sources= new Array(); |
— | — | @@ -862,7 +862,7 @@ |
863 | 863 | { |
864 | 864 | js_log('f:init_with_sources_loaded'); |
865 | 865 | //set flag that we have run this function: |
866 | | - this.init_with_sources_loadedDone=true; |
| 866 | + this.init_with_sources_loadedDone=true; |
867 | 867 | //autoseletct the source |
868 | 868 | this.media_element.autoSelectSource(); |
869 | 869 | //auto select player based on prefrence or default order |
— | — | @@ -870,22 +870,23 @@ |
871 | 871 | { |
872 | 872 | //check for parent clip: |
873 | 873 | if( typeof this.pc != 'undefined' ){ |
874 | | - js_log('no sources, type:' +this.type + ' check for html'); |
| 874 | + js_log('no sources, type:' +this.type + ' check for html'); |
| 875 | + //debugger; |
875 | 876 | //do load player if just displaying innerHTML: |
876 | | - if(this.pc.type =='text/html'){ |
| 877 | + if( this.pc.type == 'text/html' ){ |
877 | 878 | this.selected_player = embedTypes.players.defaultPlayer( 'text/html' ); |
878 | 879 | js_log('set selected player:'+ this.selected_player.mime_type); |
879 | 880 | } |
880 | 881 | } |
881 | 882 | }else{ |
882 | 883 | this.selected_player = embedTypes.players.defaultPlayer( this.media_element.selected_source.mime_type ); |
883 | | - } |
| 884 | + } |
884 | 885 | if( this.selected_player ){ |
885 | 886 | js_log('selected ' + this.selected_player.getName()); |
886 | 887 | js_log("PLAYBACK TYPE: "+this.selected_player.library); |
887 | 888 | this.thumbnail_disp = true; |
888 | 889 | this.inheritEmbedObj(); |
889 | | - }else{ |
| 890 | + }else{ |
890 | 891 | //no source's playable |
891 | 892 | var missing_type =''; |
892 | 893 | var or =''; |