Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/FlowPlayerDark.swf |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_flashEmbed.js |
— | — | @@ -5,14 +5,17 @@ |
6 | 6 | var controls_html =''; |
7 | 7 | js_log('embedObj control is: '+this.controls); |
8 | 8 | if(this.controls){ |
9 | | - controls_html+= this.getControlsHtml('stop'); |
| 9 | + controls_html+= this.getControlsHtml('play_head') + |
| 10 | + this.getControlsHtml('play_or_pause') + |
| 11 | + this.getControlsHtml('stop') + |
| 12 | + this.getControlsHtml('info_span'); |
10 | 13 | } |
11 | 14 | setTimeout('document.getElementById(\''+this.id+'\').postEmbedJS()', 150); |
12 | 15 | return this.wrapEmebedContainer( this.getEmbedObj() )+ controls_html; |
13 | 16 | }, |
14 | 17 | getEmbedObj:function(){ |
15 | 18 | if(!this.duration)this.duration=30; |
16 | | - return '<div id="FlowPlayerAnnotationHolder"></div>'+"\n"; |
| 19 | + return '<div id="FlowPlayerAnnotationHolder_'+this.pid+'"></div>'+"\n"; |
17 | 20 | }, |
18 | 21 | postEmbedJS : function() |
19 | 22 | { |
— | — | @@ -24,9 +27,84 @@ |
25 | 28 | }, |
26 | 29 | doFlashEmbed : function() |
27 | 30 | { |
28 | | - new flashembed("FlowPlayerAnnotationHolder", |
29 | | - { src: mv_embed_path + 'FlowPlayerDark.swf', width: this.width, height: this.height, id: this.pid }, |
| 31 | + var clip = flashembed('FlowPlayerAnnotationHolder_'+this.pid, |
| 32 | + { src: mv_embed_path + 'FlowPlayerDark.swf', width: this.width, height: this.height, id: this.pid}, |
30 | 33 | { config: { autoPlay: true, showStopButton: false, showPlayButton: false, |
31 | 34 | videoFile: this.media_element.selected_source.uri } }); |
| 35 | + }, |
| 36 | + /* js hooks/controls */ |
| 37 | + play : function(){ |
| 38 | + if(this.thumbnail_disp) |
| 39 | + { |
| 40 | + //call the parent |
| 41 | + this.parent_play(); |
| 42 | + }else{ |
| 43 | + this.getPluginEmbed().DoPlay(); |
| 44 | + this.paused=false; |
| 45 | + } |
| 46 | + }, |
| 47 | + pause : function(){ |
| 48 | + this.getPluginEmbed().Pause(); |
32 | 49 | } |
33 | 50 | } |
| 51 | + |
| 52 | +function locateFlashEmbed(clip) |
| 53 | +{ |
| 54 | + for(var i in global_ogg_list) |
| 55 | + { |
| 56 | + var embed = document.getElementById(global_ogg_list[i]); |
| 57 | + if(embed.media_element.selected_source.uri.match(clip.fileName)) |
| 58 | + { |
| 59 | + js_log('found flash embed'); |
| 60 | + return embed; |
| 61 | + } |
| 62 | + } |
| 63 | +} |
| 64 | + |
| 65 | +/* flowplayer callbacks */ |
| 66 | +function onFlowPlayerReady() |
| 67 | +{ |
| 68 | + js_log('onFlowPlayerReady'); |
| 69 | +} |
| 70 | + |
| 71 | +function onClipDone(clip) |
| 72 | +{ |
| 73 | + var embed = locateFlashEmbed(clip); |
| 74 | + embed.setStatus("Clip Done..."); |
| 75 | +} |
| 76 | + |
| 77 | +function onLoadBegin(clip) |
| 78 | +{ |
| 79 | + var embed = locateFlashEmbed(clip); |
| 80 | + embed.setStatus("Loading Begun..."); |
| 81 | +} |
| 82 | + |
| 83 | +function onPlay(clip) |
| 84 | +{ |
| 85 | + var embed = locateFlashEmbed(clip); |
| 86 | + embed.setStatus("Playing..."); |
| 87 | +} |
| 88 | + |
| 89 | +function onStop(clip) |
| 90 | +{ |
| 91 | + var embed = locateFlashEmbed(clip); |
| 92 | + embed.setStatus("Stopped..."); |
| 93 | +} |
| 94 | + |
| 95 | +function onPause(clip) |
| 96 | +{ |
| 97 | + var embed = locateFlashEmbed(clip); |
| 98 | + embed.setStatus("Paused..."); |
| 99 | +} |
| 100 | + |
| 101 | +function onResume(clip) |
| 102 | +{ |
| 103 | + var embed = locateFlashEmbed(clip); |
| 104 | + embed.setStatus("Resumed..."); |
| 105 | +} |
| 106 | + |
| 107 | +function onStartBuffering(clip) |
| 108 | +{ |
| 109 | + var embed = locateFlashEmbed(clip); |
| 110 | + embed.setStatus("Buffering Started..."); |
| 111 | +} |