Index: trunk/phase3/js2/mwEmbed/skins/mvpcf/playerSkin.css |
— | — | @@ -199,3 +199,63 @@ |
200 | 200 | color:#FFE96E; |
201 | 201 | font-weight:bold; |
202 | 202 | } |
| 203 | + |
| 204 | +.videoComplete{ |
| 205 | + position: absolute; |
| 206 | + top:0px; |
| 207 | + left:0px; |
| 208 | + z-index: 10; |
| 209 | + font-size:16px; |
| 210 | + overflow: hidden; |
| 211 | + background:transparent url(images/transparent_bg.png) repeat scroll 0 0; |
| 212 | +} |
| 213 | +.videoComplete .videoOptionsComplete { |
| 214 | + background:transparent url('images/player_video_options_bg.png') no-repeat scroll 0pt; |
| 215 | + color:#7A7A7A; |
| 216 | + font-size:10pt; |
| 217 | + height:158px; |
| 218 | + left:10%; |
| 219 | + overflow:auto; |
| 220 | + padding:19px; |
| 221 | + position:relative; |
| 222 | + top:16%; |
| 223 | + width:283px; |
| 224 | +} |
| 225 | +.videoComplete .videoOptionsComplete p { text-align: center; margin: 3px 0; padding: 0; } |
| 226 | +.videoComplete .videoOptionsComplete a { |
| 227 | + color: white; |
| 228 | +/* font-size: 22px;*/ |
| 229 | + font-size:12px; |
| 230 | + text-decoration: underline; |
| 231 | +} |
| 232 | +.videoComplete .videoOptionsComplete a.active{ |
| 233 | + color: #bbf; |
| 234 | +} |
| 235 | +.videoComplete .videoOptionsComplete a.email { |
| 236 | + font-size:16px; |
| 237 | + background: url(images/ico_mail.png) right 0px no-repeat; |
| 238 | + padding: 0 50px 0 0; |
| 239 | +} |
| 240 | + |
| 241 | +.videoComplete div.embed_code textarea { |
| 242 | + margin: 8px 0 8px 0; |
| 243 | + padding: 3px; |
| 244 | + width: 258px; |
| 245 | + height: 54px; |
| 246 | + border: 1px solid #dadada; |
| 247 | + font-family: Arial; |
| 248 | + color: #777; |
| 249 | + font-size: 11px; |
| 250 | +} |
| 251 | +.videoComplete div.embed_code button.copy_to_clipboard { |
| 252 | + background: #dddddd url(images/button_to_clipboard.png) 0 0 repeat-x; |
| 253 | + border: 1px solid #3b4552; |
| 254 | + text-align: center; |
| 255 | + padding: 2px 4px; |
| 256 | + margin: 0 0 6px 0; |
| 257 | + float: right; |
| 258 | + display: inline; |
| 259 | +} |
| 260 | + |
| 261 | + |
| 262 | + |
Index: trunk/phase3/js2/mwEmbed/skins/mvpcf/styles.css |
— | — | @@ -280,64 +280,8 @@ |
281 | 281 | margin: 0 0 6px 0; |
282 | 282 | } |
283 | 283 | |
284 | | -.videoComplete { |
285 | | -/* width: 100%; |
286 | | - height: 100%;*/ |
287 | | - background: url(images/transparent_bg.png) 0 0 repeat; |
288 | | - position: absolute; |
289 | | - top:0px; |
290 | | - left:0px; |
291 | | - z-index: 10; |
292 | | - font-size:16px; |
293 | | - overflow: hidden; |
294 | | -} |
295 | 284 | |
296 | | -/* margin: -305px 0 0 0; */ |
297 | | -.videoComplete .videoOptionsComplete { |
298 | | - background:transparent url('images/player_video_options_bg.png') no-repeat scroll 0pt; |
299 | | - color:#7A7A7A; |
300 | | - font-size:10pt; |
301 | | - height:158px; |
302 | | - left:10%; |
303 | | - overflow:auto; |
304 | | - padding:19px; |
305 | | - position:relative; |
306 | | - top:16%; |
307 | | - width:283px; |
308 | | -} |
309 | | -.videoComplete .videoOptionsComplete p { text-align: center; margin: 3px 0; padding: 0; } |
310 | | -.videoComplete .videoOptionsComplete a { |
311 | | - color: white; |
312 | | -/* font-size: 22px;*/ |
313 | | - font-size:12px; |
314 | | - text-decoration: underline; |
315 | | -} |
316 | 285 | |
317 | | -.videoComplete .videoOptionsComplete a.email { |
318 | | - font-size:16px; |
319 | | - background: url(images/ico_mail.png) right 0px no-repeat; |
320 | | - padding: 0 50px 0 0; |
321 | | -} |
322 | | - |
323 | | -.videoComplete div.embed_code textarea { |
324 | | - margin: 8px 0 8px 0; |
325 | | - padding: 3px; |
326 | | - width: 258px; |
327 | | - height: 54px; |
328 | | - border: 1px solid #dadada; |
329 | | - font-family: Arial; |
330 | | - color: #777; |
331 | | - font-size: 11px; |
332 | | -} |
333 | | -.videoComplete div.embed_code button.copy_to_clipboard { |
334 | | - background: #dddddd url(images/button_to_clipboard.png) 0 0 repeat-x; |
335 | | - border: 1px solid #3b4552; |
336 | | - text-align: center; |
337 | | - padding: 2px 4px; |
338 | | - margin: 0 0 6px 0; |
339 | | - float: right; |
340 | | - display: inline; |
341 | | -} |
342 | 286 | .cl_status{ |
343 | 287 | position:absolute; |
344 | 288 | bottom:0px; |
Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -785,11 +785,14 @@ |
786 | 786 | |
787 | 787 | /** |
788 | 788 | * Utility Functions |
789 | | - * |
| 789 | + */ |
| 790 | + |
| 791 | + |
| 792 | + /** |
790 | 793 | * parseUri 1.2.2 |
791 | 794 | * (c) Steven Levithan <stevenlevithan.com> |
792 | 795 | * MIT License |
793 | | - */ |
| 796 | + */ |
794 | 797 | $.parseUri = function (str) { |
795 | 798 | var o = $.parseUri.options, |
796 | 799 | m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), |
— | — | @@ -817,6 +820,25 @@ |
818 | 821 | loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ |
819 | 822 | } |
820 | 823 | }; |
| 824 | + |
| 825 | + /* |
| 826 | + * getAbsoluteUrl takes a src and returns the aboluste location given the document.URL |
| 827 | + * @param {String} src path or url |
| 828 | + */ |
| 829 | + $.absoluteUrl = function( src ){ |
| 830 | + var pSrc = mw.parseUri( src ); |
| 831 | + if( pSrc.protocol != '') |
| 832 | + return src; |
| 833 | + |
| 834 | + // Get the document path |
| 835 | + var pDoc = mw.parseUri( document.URL ); |
| 836 | + // If a leading slash: |
| 837 | + if( src.indexOf( '/' ) == 1 ){ |
| 838 | + return pDoc.protocol + '://' + pDoc.authority + src; |
| 839 | + }else{ |
| 840 | + return pDoc.protocol + '://' + pDoc.authority + pDoc.directory + src; |
| 841 | + } |
| 842 | + }; |
821 | 843 | /** |
822 | 844 | * Takes in a string returns an xml dom object |
823 | 845 | */ |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/kplayerEmbed.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | var kplayerEmbed = { |
3 | | - instanceOf:'kflashEmbed', |
| 3 | + instanceOf:'kplayerEmbed', |
4 | 4 | supports: { |
5 | 5 | 'play_head':true, |
6 | 6 | 'pause':true, |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | }, |
13 | 13 | getEmbedHTML : function () { |
14 | 14 | var embed_code = this.getEmbedObj(); |
| 15 | + alert |
15 | 16 | var _this = this; |
16 | 17 | setTimeout(function(){ |
17 | 18 | _this.postEmbedJS(); |
— | — | @@ -41,9 +42,9 @@ |
42 | 43 | }, |
43 | 44 | postEmbedJS:function() { |
44 | 45 | var _this = this; |
45 | | - this.getKDP(); |
| 46 | + this.getKDP(); |
| 47 | + //alert( this.kdp ); |
46 | 48 | if( this.kdp && this.kdp.insertMedia){ |
47 | | - |
48 | 49 | // Add KDP listeners |
49 | 50 | |
50 | 51 | //this.kdp.addJsListener("doPlay","kdpDoOnPlay"); |
— | — | @@ -52,20 +53,24 @@ |
53 | 54 | |
54 | 55 | _this.bindKdpFunc( 'doPause', 'kdpPause' ); |
55 | 56 | _this.bindKdpFunc( 'doPlay', 'play' ); |
56 | | - _this.bindKdpFunc( 'playerPlayEnd', 'onClipDone' ); |
57 | | - |
58 | | - // Insert the src: |
59 | | - this.kdp.insertMedia("-1",'http://192.168.192.90/kskin/kplayer-examples/media/bbb.flv','true'); |
| 57 | + _this.bindKdpFunc( 'playerPlayEnd', 'onClipDone' ); |
| 58 | + |
| 59 | + // KDP player likes an absolute url for the src: |
| 60 | + var src = mw.absoluteUrl( _this.getSrc() ); |
| 61 | + js_log('play src: ' + src); |
| 62 | + // Insert the src: |
| 63 | + this.kdp.insertMedia("-1", src, 'true' ); |
60 | 64 | this.kdp.dispatchKdpEvent('doPlay'); |
61 | 65 | |
62 | 66 | // Start the monitor |
63 | 67 | this.monitor(); |
64 | 68 | }else{ |
| 69 | + js_log('insert media: not defiend' + typeof this.kdp.insertMedia ); |
65 | 70 | setTimeout( function(){ |
66 | 71 | _this.postEmbedJS(); |
67 | 72 | }, 25); |
68 | 73 | } |
69 | | - }, |
| 74 | + }, |
70 | 75 | /** |
71 | 76 | * bindKdpFunc |
72 | 77 | * |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/vlcEmbed.js |
— | — | @@ -60,9 +60,10 @@ |
61 | 61 | this.vlc.style.width = this.width; |
62 | 62 | this.vlc.style.height = this.height; |
63 | 63 | this.vlc.playlist.items.clear(); |
| 64 | + var src = mw.absoluteUrl( this.getSrc() ) ; |
64 | 65 | // @@todo if client supports seeking no need to send seek_offset to URI |
65 | | - js_log( 'vlc play::' + this.getSrc() ); |
66 | | - var itemId = this.vlc.playlist.add( this.getSrc() ); |
| 66 | + js_log( 'vlc play::' + src ); |
| 67 | + var itemId = this.vlc.playlist.add( src ); |
67 | 68 | if ( itemId != -1 ) { |
68 | 69 | // play |
69 | 70 | this.vlc.playlist.playItem( itemId ); |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -1844,15 +1844,12 @@ |
1845 | 1845 | // fade in a black bg div ontop of everything |
1846 | 1846 | var div_code = '<div id="blackbg_' + sel_id + '" class="videoComplete" ' + |
1847 | 1847 | 'style="height:' + parseInt( height ) + 'px;width:' + parseInt( width ) + 'px;">' + |
1848 | | - '<div class="videoOptionsComplete">' + |
1849 | | - // @@TODO: this style should go to .css |
1850 | | - '<span style="float:right;margin-right:10px">' + |
1851 | | - '<a href="#" style="color:white;" onClick="$j(\'#' + sel_id + '\').get(0).closeDisplayedHTML();return false;">close</a>' + |
| 1848 | + '<span style="float:right;margin-right:10px">' + |
| 1849 | + '<a href="#" style="color:white;" onClick="$j(\'#' + sel_id + '\').get(0).closeDisplayedHTML();return false;">close</a>' + |
1852 | 1850 | '</span>' + |
1853 | | - '<div id="mv_disp_inner_' + sel_id + '" style="padding-top:10px;">' + |
1854 | | - html_code |
1855 | | - + '</div>' + |
1856 | | - '</div></div>'; |
| 1851 | + '<div class="videoOptionsComplete">' + |
| 1852 | + '</div>'+ |
| 1853 | + '</div>'; |
1857 | 1854 | $j( '#' + sel_id ).prepend( div_code ); |
1858 | 1855 | if ( fade_in ) |
1859 | 1856 | $j( '#blackbg_' + sel_id ).fadeIn( "slow" ); |