Index: branches/new-upload/phase3/js2/mwEmbed/example_usage/SequencerPlayer_Simple.html |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | The first video fades up from green when it starts to play, |
22 | 22 | and the second video fades down to green when it ends. |
23 | 23 | When the first video stops and the second video starts, |
24 | | - though, the two videos crossfade into each other<br><iframe width="500" height="200" src="sample_smil.xml">sample smil here</iframe><br /> |
| 24 | + though, the two videos crossfade into each other<br><iframe width="500" height="200" src="media/sample_smil.xml">sample smil here</iframe><br /> |
25 | 25 | <-- code used: <br /> |
26 | 26 | <pre> <playlist id="smil_pl" src="media/sample_smil.xml"></pre> |
27 | 27 | |
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js |
— | — | @@ -12,7 +12,8 @@ |
13 | 13 | var iObj = { |
14 | 14 | 'target_container' : '#cliplib_ic', |
15 | 15 | 'local_wiki_api_url': this_seq.getLocalApiUrl(), |
16 | | - 'instance_name' : this_seq.instance_name + '.mySearch' |
| 16 | + 'instance_name' : this_seq.instance_name + '.mySearch', |
| 17 | + 'default_query' : this_seq.plObj.title |
17 | 18 | } |
18 | 19 | //inherit the remoteSearchDriver properties:n |
19 | 20 | var tmpRSD = new remoteSearchDriver( iObj ); |
— | — | @@ -33,10 +34,24 @@ |
34 | 35 | //add an additional drag binding |
35 | 36 | var source_pos = null; |
36 | 37 | var insert_key='na'; |
37 | | - var clip_key =''; |
38 | | - |
| 38 | + var clip_key =''; |
| 39 | + var clipTarget = ''; |
| 40 | + $j( '.mv_clip_box_result' ).draggable({ |
| 41 | + helper:'clone', |
| 42 | + opacity: 0.7, |
| 43 | + revert:'invalid', |
| 44 | + start: function(event, ui) { |
| 45 | + //create a clip target (just a temporary image representation .. will swap and import after drag) |
| 46 | + _this.pSeq.addClips({ |
| 47 | + 'type':'image/jpeg' |
| 48 | + }) |
| 49 | + }, |
| 50 | + drag:function(e, ui){ |
| 51 | + insert_key = _this.pSeq.clipDragUpdate(ui, this); |
| 52 | + } |
| 53 | + }); |
39 | 54 | //@@todo support multiple target tracks |
40 | | - $j( '.mv_clip_box_result' ).draggable({ |
| 55 | + /*$j( '.mv_clip_box_result' ).draggable({ |
41 | 56 | start:function(){ |
42 | 57 | source_pos = $j(this).offset(); |
43 | 58 | js_log("update pos of: #clone_" + this.id + ' to l:' +source_pos.left + ' t:' + source_pos.top ); |
— | — | @@ -56,12 +71,10 @@ |
57 | 72 | drag:function(e, ui){ |
58 | 73 | insert_key = _this.pSeq.clipDragUpdate(ui, this); |
59 | 74 | }, |
60 | | - //do contain: |
61 | | - containment:'#container_track_0', |
62 | 75 | stop:function(){ |
63 | 76 | js_log('done drag insert after: ' + insert_key); |
64 | 77 | } |
65 | | - }); |
| 78 | + }); */ |
66 | 79 | |
67 | 80 | }, |
68 | 81 | resourceEdit:function(rObj, rsdElement){ |
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js |
— | — | @@ -222,9 +222,7 @@ |
223 | 223 | //add the container divs (with basic layout ~universal~ |
224 | 224 | $j(this.target_sequence_container).html(''+ |
225 | 225 | '<div id="'+this.video_container_id+'" style="position:absolute;right:0px;top:0px;' + |
226 | | - 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+ |
227 | | - '<div id="'+this.sequence_tools_id+'" style="position:absolute;' + |
228 | | - 'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>'+ |
| 226 | + 'width:'+this.video_width+'px;height:'+this.video_height+'px;border:solid thin blue;background:#FFF;font-color:black;"/>'+ |
229 | 227 | '<div id="'+this.timeline_id+'" class="ui-widget ui-widget-content ui-corner-all" style="position:absolute;' + |
230 | 228 | 'left:0px;right:0px;top:'+(this.video_height+34)+'px;bottom:35px;overflow:auto;">'+ |
231 | 229 | gM('loading_timeline')+ '</div>'+ |
— | — | @@ -232,7 +230,9 @@ |
233 | 231 | '<div class="seq_save_cancel" style="position:absolute;'+ |
234 | 232 | 'left:5px;bottom:0px;height:25px;">'+ |
235 | 233 | gM('loading_user_rights') + |
236 | | - '</div>' |
| 234 | + '</div>'+ |
| 235 | + '<div id="'+this.sequence_tools_id+'" style="position:absolute;' + |
| 236 | + 'left:0px;right:'+(this.video_width+15)+'px;top:0px;height:'+(this.video_height+23)+'px;"/>' |
237 | 237 | ); |
238 | 238 | |
239 | 239 | /*js_log('set: '+this.target_sequence_container + ' html to:'+ "\n"+ |
— | — | @@ -808,8 +808,8 @@ |
809 | 809 | if( parseUri( document.URL ).host != parseUri( this_seq.plObj.interface_url ).host ){ |
810 | 810 | js_log('error: presently we can\'t copy clips across domains'); |
811 | 811 | }else{ |
812 | | - if( this_seq.clipboardEditToken ){ |
813 | | - //@@todo we need a api entry point to store a "clipboard" |
| 812 | + //@@we need a api entry point to store a "clipboard" |
| 813 | + if( this_seq.clipboardEditToken && this_seq.plObj.interface_url ){ |
814 | 814 | var req_url = this_seq.plObj.interface_url.replace(/api.php/, 'index.php') + '?action=ajax&rs=mv_seqtool_clipboard&rsargs[]=copy'; |
815 | 815 | $j.ajax({ |
816 | 816 | type: "POST", |
— | — | @@ -848,7 +848,11 @@ |
849 | 849 | //add a single or set of clips |
850 | 850 | //to a given position and track_inx |
851 | 851 | addClips:function( clipSet, before_clip_pos, track_inx){ |
852 | | - this_seq = this; |
| 852 | + this_seq = this; |
| 853 | + if(!track_inx) |
| 854 | + track_inx = this.plObj.default_track |
| 855 | + if(!before_clip_pos) |
| 856 | + before_clip_pos= |
853 | 857 | js_log("seq: add clip: at: "+ before_clip_pos + ' in track: ' + track_inx); |
854 | 858 | var cur_pos = before_clip_pos; |
855 | 859 | js_log('paste clip before_clip_pos: ' + before_clip_pos); |