Index: trunk/extensions/MetavidWiki/skins/mv_stream.js |
— | — | @@ -112,6 +112,10 @@ |
113 | 113 | ebvid['org_eb_stop'] = ebvid['stop']; |
114 | 114 | ebvid['stop'] = function(){mv_do_stop();} |
115 | 115 | } |
| 116 | + if(ebvid['play_or_pause'].toString()!='function(){mv_play_or_pause();}'){ |
| 117 | + ebvid['org_eb_play_or_pause'] = ebvid['play_or_pause']; |
| 118 | + ebvid['play_or_pause'] = function(){mv_play_or_pause();} |
| 119 | + } |
116 | 120 | if(ebvid['showVideoDownload'].toString!='function(){mv_doShowVideoDownload();}'){ |
117 | 121 | ebvid['org_showVideoDownload'] = ebvid['showVideoDownload']; |
118 | 122 | ebvid['showVideoDownload'] = function(){mv_doShowVideoDownload();} |
— | — | @@ -781,6 +785,11 @@ |
782 | 786 | //return false to prevent the form being submitted |
783 | 787 | return false; |
784 | 788 | } |
| 789 | +function mv_play_or_pause(){ |
| 790 | + //issue a stop since we want mouse_overs to work |
| 791 | + if(!this.paused) |
| 792 | + mv_do_stop(); |
| 793 | +} |
785 | 794 | function mv_do_stop(){ |
786 | 795 | $j('#mv_videoPlayerTime').fadeIn('fast'); |
787 | 796 | //re-enable interface: |
— | — | @@ -867,10 +876,11 @@ |
868 | 877 | |
869 | 878 | function scroll_to_pos(mvd_id){ |
870 | 879 | if( $j('#mv_fd_mvd_'+mvd_id).get(0)){ |
871 | | - //do scroll in 1 second |
| 880 | + js_log(' flat offsetTOp:: '+ $j('#mv_fd_mvd_'+mvd_id).get(0).offsetTop + |
| 881 | + ' mv_get off:'+top_offset); |
872 | 882 | //@@todo debug IE issues with scrolling |
873 | | - $j('#selectionsBox').animate({scrollTop: $j('#mv_fd_mvd_'+mvd_id).position().top}, 'slow'); |
874 | | - } |
| 883 | + $j('#selectionsBox').animate({scrollTop: ($j('#mv_fd_mvd_'+mvd_id).get(0).offsetTop-40)}, 'slow'); |
| 884 | + } |
875 | 885 | } |
876 | 886 | function highlight_fd(mvd_id){ |
877 | 887 | $j('#mv_fd_mvd_'+mvd_id).css('border','1px solid #FF0000'); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | <html> |
10 | 10 | <head> |
11 | 11 | <title>sample mv embed</title> |
12 | | - <script type="text/javascript" src="<?php echo htmlspecialchars($mv_path) ?>mv_embed.js"></script> |
| 12 | + <script type="text/javascript" src="<?php echo htmlspecialchars($mv_path) ?>mv_embed.js?<?php echo time()?>"></script> |
13 | 13 | </head> |
14 | 14 | <body> |
15 | 15 | <h3> Sample Embed</h3> |
— | — | @@ -107,8 +107,8 @@ |
108 | 108 | ?> |
109 | 109 | <table border="1" cellpadding="6" width="600"> |
110 | 110 | <? foreach($sample_embed as $key=>$aval){ |
111 | | - //$key!=8 |
112 | | - if($key!=0 && $key!=3)continue; |
| 111 | + //$key!=8 && $key!=3 |
| 112 | + if($key!=0 )continue; |
113 | 113 | ?> |
114 | 114 | <tr> |
115 | 115 | <td valign="top"><?=$aval['tag']?></td> |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -7,9 +7,6 @@ |
8 | 8 | * |
9 | 9 | * @url http://metavid.ucsc.edu |
10 | 10 | * |
11 | | - * portions sampled from the vlc browser interface: |
12 | | - * http://people.videolan.org/~damienf/plugin-0.8.6.html * |
13 | | - * |
14 | 11 | * parseUri: |
15 | 12 | * http://stevenlevithan.com/demo/parseuri/js/ |
16 | 13 | * |
— | — | @@ -17,6 +14,7 @@ |
18 | 15 | * (in cases where media will be hosted in a different place than the embbeding page) |
19 | 16 | * |
20 | 17 | */ |
| 18 | +var MV_EMBED_VERSION = '1.0'; |
21 | 19 | var mv_embed_path = null; |
22 | 20 | //whether or not to load java from an iframe. |
23 | 21 | //note: this is necessary for remote embedding because of java security model) |
— | — | @@ -150,7 +148,7 @@ |
151 | 149 | * its load_libs function will be called during initialization |
152 | 150 | *********************************************/ |
153 | 151 | var mvEmbed = { |
154 | | - Version: '0.7', |
| 152 | + Version: MV_EMBED_VERSION, |
155 | 153 | loaded:false, |
156 | 154 | load_time:0, |
157 | 155 | flist:Array(), |
— | — | @@ -485,6 +483,7 @@ |
486 | 484 | * |
487 | 485 | */ |
488 | 486 | var ctrlBuilder = { |
| 487 | + height:29, |
489 | 488 | getControls:function(embedObj){ |
490 | 489 | js_log('f:controlsBuilder'); |
491 | 490 | ctrlBuilder.id = (embedObj.pc)?embedObj.pc.pp.id:embedObj.id; |
— | — | @@ -637,15 +636,18 @@ |
638 | 637 | |
639 | 638 | // ActiveX plugins |
640 | 639 | if(this.msie){ |
| 640 | + // check for flash |
| 641 | + if ( this.testActiveX( 'ShockwaveFlash.ShockwaveFlash')) |
| 642 | + this.players.addPlayer(flowPlayer); |
641 | 643 | // VLC |
642 | 644 | if ( this.testActiveX( 'VideoLAN.VLCPlugin.2' ) ) |
643 | 645 | this.players.addPlayer(vlcActiveXPlayer); |
644 | 646 | // Java |
645 | 647 | if ( javaEnabled && this.testActiveX( 'JavaWebStart.isInstalled' ) ) |
646 | 648 | this.players.addPlayer(cortadoPlayer); |
647 | | - //temporary disable QuickTime check |
| 649 | + // quicktime |
648 | 650 | if ( this.testActiveX( 'QuickTimeCheckObject.QuickTimeCheck.1' ) ) |
649 | | - this.players.addPlayer(quicktimeActiveXPlayer); |
| 651 | + this.players.addPlayer(quicktimeActiveXPlayer); |
650 | 652 | } |
651 | 653 | |
652 | 654 | // <video> element (should not need to be attached to the dom to test)( |
— | — | @@ -985,6 +987,7 @@ |
986 | 988 | js_log('do swap ' + videoInterface.id + ' for ' + video_element); |
987 | 989 | embed_video = document.createElement('div'); |
988 | 990 | //make sure our div has a hight/width set: |
| 991 | + |
989 | 992 | $j(embed_video).css({'width':videoInterface.width,'height':videoInterface.height}); |
990 | 993 | //inherit the video interface |
991 | 994 | for(method in videoInterface){ |
— | — | @@ -1086,7 +1089,7 @@ |
1087 | 1090 | var _this = this; |
1088 | 1091 | do_request(this.pe.roe, function(data) |
1089 | 1092 | { |
1090 | | - //continue |
| 1093 | + //continue |
1091 | 1094 | _this.pe.media_element.addROE(data); |
1092 | 1095 | _this.getParseCMML_rowReady(); |
1093 | 1096 | }); |
— | — | @@ -1371,7 +1374,7 @@ |
1372 | 1375 | { |
1373 | 1376 | js_log(element); |
1374 | 1377 | |
1375 | | - this.uri = element.getAttribute('src'); |
| 1378 | + this.uri = $j(element).attr('src'); |
1376 | 1379 | if(ogg_chop_links) |
1377 | 1380 | this.uri = this.uri.replace(".anx", ''); |
1378 | 1381 | this.marked_default = false; |
— | — | @@ -1381,17 +1384,17 @@ |
1382 | 1385 | if (tag == 'video') |
1383 | 1386 | this.marked_default = true; |
1384 | 1387 | |
1385 | | - if (element.hasAttribute('type')) |
1386 | | - this.mime_type = element.getAttribute('type'); |
1387 | | - else if (element.hasAttribute('content-type')) |
1388 | | - this.mime_type = element.getAttribute('content-type'); |
| 1388 | + if ($j(element).attr('type')) |
| 1389 | + this.mime_type = $j(element).attr('type'); |
| 1390 | + else if ($j(element).attr('content-type')) |
| 1391 | + this.mime_type = $j(element).attr('content-type'); |
1389 | 1392 | else |
1390 | 1393 | this.mime_type = this.detectType(this.uri); |
1391 | 1394 | |
1392 | 1395 | js_log("MIME TYPE: "+ this.mime_type ); |
1393 | 1396 | |
1394 | | - if (element.hasAttribute("title")) |
1395 | | - this.title = element.getAttribute("title"); |
| 1397 | + if ($j(element).attr("title")) |
| 1398 | + this.title = $j(element).attr("title"); |
1396 | 1399 | else |
1397 | 1400 | { |
1398 | 1401 | var parts = this.mime_type.split("/",2); |
— | — | @@ -1400,14 +1403,14 @@ |
1401 | 1404 | this.title = parts[1] + ' ' + parts[0]; |
1402 | 1405 | } |
1403 | 1406 | |
1404 | | - if (element.hasAttribute("id")) |
1405 | | - this.id = element.getAttribute("id"); |
| 1407 | + if ($j(element).attr("id")) |
| 1408 | + this.id = $j(element).attr("id"); |
1406 | 1409 | |
1407 | 1410 | //@@todo parse start time format and put into start_ntp |
1408 | | - if(element.hasAttribute("start")) |
1409 | | - this.start = element.getAttribute("start"); |
1410 | | - if(element.hasAttribute("end")) |
1411 | | - this.start = element.getAttribute("end"); |
| 1411 | + if($j(element).attr("start")) |
| 1412 | + this.start = $j(element).attr("start"); |
| 1413 | + if($j(element).attr("end")) |
| 1414 | + this.start = $j(element).attr("end"); |
1412 | 1415 | //js_log('Adding mediaSource of type ' + this.mime_type + ' and uri ' + this.uri + ' and title ' + this.title); |
1413 | 1416 | this.parseURLDuration(); |
1414 | 1417 | }, |
— | — | @@ -1416,8 +1419,8 @@ |
1417 | 1420 | * @param {String} end_time in NTP format |
1418 | 1421 | */ |
1419 | 1422 | updateSrcTime:function(start_ntp, end_ntp){ |
1420 | | - js_log("UPDATE src time: "+ start_ntp+'/'+ end_ntp); |
1421 | | - js_log("pre uri:" + this.uri); |
| 1423 | + js_log("f:updateSrcTime: "+ start_ntp+'/'+ end_ntp); |
| 1424 | + //js_log("pre uri:" + this.uri); |
1422 | 1425 | //if we have time we can use: |
1423 | 1426 | if(this.start_ntp!=null){ |
1424 | 1427 | var index_time_val = false; |
— | — | @@ -1431,7 +1434,9 @@ |
1432 | 1435 | this.uri = this.uri.substring(0, this.uri.indexOf(index_time_val) ) + index_time_val + start_ntp + '/'+end_ntp + end_req_string; |
1433 | 1436 | } |
1434 | 1437 | } |
1435 | | - js_log("post uri:" + this.uri); |
| 1438 | + //update the duration |
| 1439 | + this.parseURLDuration(); |
| 1440 | + //js_log("post uri:" + this.uri); |
1436 | 1441 | }, |
1437 | 1442 | /** MIME type accessor function. |
1438 | 1443 | @return the MIME type of the source. |
— | — | @@ -1545,14 +1550,19 @@ |
1546 | 1551 | this.thumbnail = mv_default_thumb_url; |
1547 | 1552 | // Process the <video> element |
1548 | 1553 | this.tryAddSource(video_element); |
1549 | | - if(video_element.hasAttribute('thumbnail')) |
1550 | | - this.thumbnail=video_element.getAttribute('thumbnail'); |
1551 | | - if(video_element.hasAttribute('poster')) |
1552 | | - this.thumbnail=video_element.getAttribute('poster'); |
1553 | | - // Process all inner <source> elements |
1554 | | - var inner_source_elements = video_element.getElementsByTagName('source'); |
1555 | | - $j.each(inner_source_elements, function(inx, inner_source) |
| 1554 | + js_log('done trying to add src from base element'); |
| 1555 | + |
| 1556 | + if($j(video_element).attr('thumbnail')) |
| 1557 | + this.thumbnail=$j(video_element).attr('thumbnail'); |
| 1558 | + |
| 1559 | + if($j(video_element).attr('poster')) |
| 1560 | + this.thumbnail=$j(video_element).attr('poster'); |
| 1561 | + |
| 1562 | + // Process all inner <source> elements |
| 1563 | + js_log("inner sorce count: " + video_element.getElementsByTagName('source').length ); |
| 1564 | + $j.each(video_element.getElementsByTagName('source'), function(inx, inner_source) |
1556 | 1565 | { |
| 1566 | + js_log(' on inner source: '+i + ' obj: '+ inner_source); |
1557 | 1567 | _this.tryAddSource(inner_source); |
1558 | 1568 | }); |
1559 | 1569 | }, |
— | — | @@ -1575,6 +1585,7 @@ |
1576 | 1586 | */ |
1577 | 1587 | selectSource:function(index) |
1578 | 1588 | { |
| 1589 | + js_log('f:selectSource:'+index); |
1579 | 1590 | var playable_sources = this.getPlayableSources(); |
1580 | 1591 | for(var i in playable_sources){ |
1581 | 1592 | if(i==index){ |
— | — | @@ -1634,14 +1645,14 @@ |
1635 | 1646 | */ |
1636 | 1647 | tryAddSource:function(element) |
1637 | 1648 | { |
1638 | | - js_log('f:tryAddSource'); |
1639 | | - if (!element.hasAttribute('src')) |
1640 | | - return; |
1641 | | - var new_src = element.getAttribute('src'); |
1642 | | - //make sure an existing element with the same src does not already exist: |
1643 | | - //js_log("New src: "+new_src); |
1644 | | - for(i in this.sources){ |
1645 | | - //js_log(' ext src: '+this.sources[i].getURI()); |
| 1649 | + js_log('f:tryAddSource'); |
| 1650 | + if (! $j(element).attr("src")){ |
| 1651 | + js_log("element has no src"); |
| 1652 | + return false; |
| 1653 | + } |
| 1654 | + var new_src = $j(element).attr('src'); |
| 1655 | + //make sure an existing element with the same src does not already exist: |
| 1656 | + for(i in this.sources){ |
1646 | 1657 | if(this.sources[i].getURI()==new_src){ |
1647 | 1658 | return false; |
1648 | 1659 | } |
— | — | @@ -1685,16 +1696,16 @@ |
1686 | 1697 | }); |
1687 | 1698 | //set the thumbnail: |
1688 | 1699 | $j.each(roe_data.getElementsByTagName('img'), function(inx, n){ |
1689 | | - if(n.getAttribute("id")=="stream_thumb"){ |
1690 | | - js_log('roe:set thumb to '+n.getAttribute("src")); |
1691 | | - _this['thumbnail'] = n.getAttribute("src"); |
| 1700 | + if($j(n).attr("id")=="stream_thumb"){ |
| 1701 | + js_log('roe:set thumb to '+$j(n).attr("src")); |
| 1702 | + _this['thumbnail'] =$j(n).attr("src"); |
1692 | 1703 | } |
1693 | 1704 | }) |
1694 | 1705 | //set the linkback: |
1695 | 1706 | $j.each(roe_data.getElementsByTagName('link'), function(inx, n){ |
1696 | | - if(n.getAttribute('id')=='html_linkback'){ |
1697 | | - js_log('roe:set linkback to '+n.getAttribute("href")); |
1698 | | - _this['linkback'] = n.getAttribute('href'); |
| 1707 | + if($j(n).attr('id')=='html_linkback'){ |
| 1708 | + js_log('roe:set linkback to '+$j(n).attr("href")); |
| 1709 | + _this['linkback'] = $j(n).attr('href'); |
1699 | 1710 | } |
1700 | 1711 | }) |
1701 | 1712 | } |
— | — | @@ -2000,7 +2011,10 @@ |
2001 | 2012 | js_log("f:getHTML:AddControls"); |
2002 | 2013 | html_code +='<div id="mv_embedded_controls_'+this.id+'" class="controls" style="width:'+this.width+'px">'; |
2003 | 2014 | html_code += this.getControlsHTML(); |
2004 | | - html_code +='</div>'; |
| 2015 | + html_code +='</div>'; |
| 2016 | + //block out some space by encapulating the top level div |
| 2017 | + $j(this).wrap('<div style="width:'+parseInt(this.width)+'px;height:' |
| 2018 | + +(parseInt(this.height)+ctrlBuilder.height)+'px"></div>'); |
2005 | 2019 | } |
2006 | 2020 | html_code += '</div>'; //videoPlayer div close |
2007 | 2021 | js_log('should set: '+this.id); |
— | — | @@ -2050,20 +2064,28 @@ |
2051 | 2065 | $j('#img_thumb_'+this.id).attr('src', src); |
2052 | 2066 | }else{ |
2053 | 2067 | var _this = this; |
2054 | | - if(this.thumbnail_disp && this.thumbnail_updating==false){ |
| 2068 | + |
| 2069 | + //if still animating remove new_img_thumb_ |
| 2070 | + if(this.thumbnail_updating==true) |
| 2071 | + $j('#new_img_thumb_'+this.id).stop().remove(); |
| 2072 | + |
| 2073 | + if(this.thumbnail_disp){ |
2055 | 2074 | this.thumbnail_updating=true; |
2056 | 2075 | $j('#dc_'+this.id).append('<img src="'+src+'" ' + |
2057 | 2076 | 'style="display:none;position:absolute;zindex:2;top:0px;left:0px;" ' + |
2058 | 2077 | 'width="'+this.width+'" height="'+this.height+'" '+ |
2059 | | - 'id = "new_img_thumb_'+this.id+'" />'); |
2060 | | - $j('#new_img_thumb_'+this.id).fadeIn("slow", function(){ |
2061 | | - js_log('done fading in: '+src); |
| 2078 | + 'id = "new_img_thumb_'+this.id+'" />'); |
| 2079 | + //js_log('appended: new_img_thumb_'); |
| 2080 | + $j('#new_img_thumb_'+this.id).fadeIn("slow", function(){ |
2062 | 2081 | //once faded in remove org and rename new: |
2063 | 2082 | $j('#img_thumb_'+_this.id).remove(); |
2064 | 2083 | $j('#new_img_thumb_'+_this.id).attr('id', 'img_thumb_'+_this.id); |
2065 | 2084 | $j('#img_thumb_'+_this.id).css('zindex','1'); |
2066 | | - this.thumbnail_updating=false; |
| 2085 | + _this.thumbnail_updating=false; |
| 2086 | + //js_log("done fadding in "+ $j('#img_thumb_'+_this.id).attr("src")); |
2067 | 2087 | }); |
| 2088 | + }else{ |
| 2089 | + //do a quick switch |
2068 | 2090 | } |
2069 | 2091 | } |
2070 | 2092 | }, |
— | — | @@ -2125,69 +2147,9 @@ |
2126 | 2148 | var pos = $j('#options_button_'+sel_id).offset(); |
2127 | 2149 | pos['top']=pos['top']+24; |
2128 | 2150 | pos['left']=pos['left']-124; |
2129 | | - js_log('pos of options button: t:'+pos['top']+' l:'+ pos['left']); |
| 2151 | + //js_log('pos of options button: t:'+pos['top']+' l:'+ pos['left']); |
2130 | 2152 | $j('#mv_embedded_options_'+sel_id).css(pos).toggle(); |
2131 | 2153 | return; |
2132 | | - |
2133 | | - /*var thumbnail = this.media_element.getThumbnailURL(); |
2134 | | - var thumb_html=''; |
2135 | | - //add plugin config button (don't add for playlists) |
2136 | | - if(!this.pc){ |
2137 | | - thumb_html+='<div style="border:none;position:absolute;top:2px;left:2px;z-index:99;width:28px;height:28px;">' + |
2138 | | - '<a title="'+getMsg('select_playback')+'" href="#" onClick="document.getElementById(\''+this.id+'\').selectPlaybackMethod();return false;">'+ |
2139 | | - getTransparentPng({id:'plug_'+this.id,width:'27',height:'27',src:mv_embed_path + 'images/vid_plugin_edit_sm.png'})+ |
2140 | | - '</a>'+ |
2141 | | - '</div>'; |
2142 | | - } |
2143 | | - * */ |
2144 | | - |
2145 | | - //add in cmml inline dispaly if roe description avaliable |
2146 | | - //not to be displayed in stream interface. |
2147 | | -/* if(this.media_element.hasStreamOfMIMEType('text/cmml') && this.show_meta_link){ |
2148 | | - thumb_html+='<div style="border:none;position:absolute;top:2px;right:2px;z-index:1">'+ |
2149 | | - '<a title="'+getMsg('select_transcript_set')+'" href="javascript:$j(\'#'+this.id+'\').get(0).showTextInterface();">'; |
2150 | | - thumb_html+=getTransparentPng({id:'metaButton_'+this.id, width:"40", height:"27", border:"0", |
2151 | | - src:mv_embed_path + 'images/cc_meta_sm.png' }); |
2152 | | - thumb_html+='</div>'; |
2153 | | - }*/ |
2154 | | - |
2155 | | - //add link back if requested |
2156 | | - /*if(this.linkback){ |
2157 | | - thumb_html+='<div style="border:none;position:absolute;bottom:2px;right:2px;z-index:1">'+ |
2158 | | - '<a title="'+getMsg('clip_linkback')+'" target="_new" href="'+this.linkback+'">'; |
2159 | | - thumb_html+=getTransparentPng({id:'lb_'+this.id, width:"27", height:"27", border:"0", |
2160 | | - src:mv_embed_path + 'images/vid_info_sm.png' }); |
2161 | | - thumb_html+='</div>'; |
2162 | | - } |
2163 | | - * */ |
2164 | | - //add direct download link if option: |
2165 | | - /*if(this.download_link){ |
2166 | | - //check for roe attribute (extened download options) |
2167 | | - var dlLink = (this.media_element.sources.length>1)?'javascript:document.getElementById(\''+this.id+'\').showVideoDownload();':this.media_element.sources[0].uri; |
2168 | | - thumb_html+='<div style="border:none;position:absolute;bottom:2px;left:2px;z-index:1">'+ |
2169 | | - '<a title="'+getMsg('download_clip')+'" href="'+dlLink+'">'; |
2170 | | - thumb_html+=getTransparentPng({id:'lb_'+this.id, width:"27", height:"27", border:"0", |
2171 | | - src:mv_embed_path + 'images/vid_download_sm.png' }); |
2172 | | - thumb_html+='</div>'; |
2173 | | - } |
2174 | | - */ |
2175 | | - //add in embed link (if requested) |
2176 | | - /*if(this.embed_link){ |
2177 | | - var right_offset = (this.linkback)?32:0; |
2178 | | - thumb_html+='<div style="border:none;position:absolute;bottom:2px;right:'+right_offset+'px;z-index:1">'+ |
2179 | | - '<a title="Embed Clip Code" href="javascript:document.getElementById(\''+this.id+'\').showEmbedCode();">'; |
2180 | | - |
2181 | | - thumb_html+=getTransparentPng(new Object ({id:'le_'+this.id, width:"27", height:"27", border:"0", |
2182 | | - src:mv_embed_path + 'images/vid_embed_sm.png' })); |
2183 | | - thumb_html+='</a></div>'; |
2184 | | - //make link absolute (if it was not already) |
2185 | | - //add the hidden embed code: |
2186 | | - thumb_html+='<div id="embed_code_'+this.id+'" style="border:solid;border-color:black;overflow:hidden;display:none;position:absolute;bottom:2px;right:'+(right_offset+30)+'px;width:'+(this.playerPixelWidth()-100)+'px;z-index:1">'+ |
2187 | | - '<input onClick="this.select();" type="text" size="40" length="1024" value="'+this.getEmbeddingHTML()+'">' |
2188 | | - '</div>'; |
2189 | | - thumb_html+='</div>'; |
2190 | | - }*/ |
2191 | | - //this.displayHTML(thumb_html); |
2192 | 2154 | }, |
2193 | 2155 | getPlayButton:function(id){ |
2194 | 2156 | if(!id)id=this.id; |
— | — | @@ -2219,17 +2181,20 @@ |
2220 | 2182 | showEmbedCode : function(embed_code){ |
2221 | 2183 | if(!embed_code) |
2222 | 2184 | embed_code = this.getEmbeddingHTML(); |
2223 | | - |
2224 | | - this.displayHTML('<a class="email" href="#">Share Clip via Email</a> '+ |
2225 | | - '<p>or</p> '+ |
2226 | | - '<a href="#">Embed Clip in Blog or Site</a> '+ |
| 2185 | + var o=''; |
| 2186 | + if(this.linkback){ |
| 2187 | + o+='<a class="email" href="'+this.linkback+'">Share Clip via Link</a> '+ |
| 2188 | + '<p>or</p> '; |
| 2189 | + } |
| 2190 | + o+='<span style="color:#FFF;font-size:14px;">Embed Clip in Blog or Site</span>'+ |
2227 | 2191 | '<div class="embed_code"> '+ |
2228 | 2192 | '<textarea onClick="this.select();" id="embedding_user_html_'+this.id+'" name="embed">' + |
2229 | 2193 | embed_code+ |
2230 | 2194 | '</textarea> '+ |
2231 | 2195 | '<button onClick="$j(\'#'+this.id+'\').get(0).copyText(); return false;" class="copy_to_clipboard">Copy to Clipboard</button> '+ |
2232 | 2196 | '</div> '+ |
2233 | | - '</div>'); |
| 2197 | + '</div>'; |
| 2198 | + this.displayHTML(o); |
2234 | 2199 | }, |
2235 | 2200 | copyText:function(){ |
2236 | 2201 | $j('#embedding_user_html_'+this.id).focus().select(); |
— | — | @@ -2287,8 +2252,9 @@ |
2288 | 2253 | // '<span class="displayHTML" id="con_vl_'+this.id+'" style="position:absolute;top:20px;left:20px;color:white;">' + |
2289 | 2254 | '<div class="videoOptionsComplete">'+ |
2290 | 2255 | //@@TODO: this style should go to .css |
2291 | | - '<div style="width: 247px;border:none;position:absolute;z-index:13;padding: 12px 19px; text-align:right;"><span>'+ |
2292 | | - '<a href="#" style="color:white;" onClick="$j(\'#'+sel_id+'\').get(0).closeDisplayedHTML();return false;">close</a></span></div>'+ |
| 2256 | + '<span style="float:right;margin-right:10px">' + |
| 2257 | + '<a href="#" style="color:white;" onClick="$j(\'#'+sel_id+'\').get(0).closeDisplayedHTML();return false;">close</a>' + |
| 2258 | + '</span>'+ |
2293 | 2259 | '<div id="mv_disp_inner_'+sel_id+'">'+ |
2294 | 2260 | html_code |
2295 | 2261 | +'</div>'+ |
— | — | @@ -2336,7 +2302,7 @@ |
2337 | 2303 | js_log(select_html); |
2338 | 2304 | return select_html; |
2339 | 2305 | }, |
2340 | | - selectPlaybackMethod:function(){ |
| 2306 | + selectPlaybackMethod:function(){ |
2341 | 2307 | //get id (in case where we have a parent container) |
2342 | 2308 | var this_id = (this.pc!=null)?this.pc.pp.id:this.id; |
2343 | 2309 | |
— | — | @@ -2347,7 +2313,7 @@ |
2348 | 2314 | $j.each(this.media_element.getPlayableSources(), function(index, source) |
2349 | 2315 | { |
2350 | 2316 | var default_player = embedTypes.players.defaultPlayer(source.getMIMEType()); |
2351 | | - var source_select_code = '$j(\'#'+this_id+'\').get(0).closeDisplayedHTML(); $j(\''+_this.id+'\').media_element.selectSource(\''+index+'\');'; |
| 2317 | + var source_select_code = '$j(\'#'+this_id+'\').get(0).closeDisplayedHTML(); $j(\'#'+_this.id+'\').get(0).media_element.selectSource(\''+index+'\');'; |
2352 | 2318 | var player_code = _this.getPlayerSelectList(source.getMIMEType(), index, source_select_code); |
2353 | 2319 | var is_not_selected = (source != _this.media_element.selected_source); |
2354 | 2320 | var image_src = mv_embed_path+'/images/stream/'; |
— | — | @@ -2838,14 +2804,14 @@ |
2839 | 2805 | /* |
2840 | 2806 | * IE and non-firebug debug: |
2841 | 2807 | */ |
2842 | | -/* var log_elm = document.getElementById('mv_js_log'); |
| 2808 | + var log_elm = document.getElementById('mv_js_log'); |
2843 | 2809 | if(!log_elm){ |
2844 | 2810 | document.write('<div style="position:absolute;z-index:500;top:0px;left:0px;right:0px;height:150px;"><textarea id="mv_js_log" cols="80" rows="6"></textarea></div>'); |
2845 | 2811 | var log_elm = document.getElementById('mv_js_log'); |
2846 | 2812 | } |
2847 | 2813 | if(log_elm){ |
2848 | 2814 | log_elm.value+=string+"\n"; |
2849 | | - }*/ |
| 2815 | + } |
2850 | 2816 | } |
2851 | 2817 | //in case of "throw error" type usage |
2852 | 2818 | return false; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skin/styles.css |
— | — | @@ -38,6 +38,7 @@ |
39 | 39 | .videoPlayer .controls { |
40 | 40 | height: 29px; |
41 | 41 | background: #454545; |
| 42 | + display:block; |
42 | 43 | } |
43 | 44 | .videoPlayer .controlInnerSmall { |
44 | 45 | /* width: 430px;*/ |