Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php |
— | — | @@ -110,8 +110,9 @@ |
111 | 111 | foreach($seqNodeList as $seqNode){ |
112 | 112 | //import the top seq node: |
113 | 113 | $topSeqNode = $this->smilDoc->importNode($seqNode, false); |
114 | | - //get all the references |
115 | | - $refNodeList = $seqNode->childNodes; |
| 114 | + //get all the media references |
| 115 | + //@@todo also get the alias tags (video, audio, image ..etc) |
| 116 | + $refNodeList = $seqNode->getElementsByTagName('ref'); |
116 | 117 | foreach($refNodeList as $refNode){ |
117 | 118 | //make sure its a valid ref node: |
118 | 119 | $refNode = $this->smilDoc->importNode( $this->resolveResourceNode($refNode), true ); |
— | — | @@ -262,14 +263,14 @@ |
263 | 264 | $this->parseInnerWikiText( $node, $thumbnail->toHtml() ); |
264 | 265 | }else{ |
265 | 266 | $node->setAttribute( 'type', $img->getMimeType() ); |
266 | | - $node->setAttribute( 'src', $thumbnail->getURL() ); |
| 267 | + $node->setAttribute( 'src', $img->getURL() ); |
267 | 268 | |
268 | 269 | //if type is ogg: (set dur and poster) |
269 | 270 | if( $img->getMimeType()=='application/ogg') { |
270 | 271 | if( !$node->hasAttribute('dur') ) |
271 | 272 | $node->setAttribute('dur', $thumbnail->file->getLength() ); |
272 | 273 | if( !$node->hasAttribute('poster') ){ |
273 | | - $node->setAttribute('poster', $thumbnail->url); |
| 274 | + $node->setAttribute('poster', $thumbnail->getURL() ); |
274 | 275 | } |
275 | 276 | } |
276 | 277 | } |
Index: trunk/extensions/MetavidWiki/skins/mv_common.js |
— | — | @@ -1,10 +1,24 @@ |
2 | 2 | /*@@TODO should be set by mediaWiki so it uses wfMsg */ |
3 | 3 | var global_loading_txt = 'loading<blink>...</blink>'; |
4 | 4 | |
5 | | - |
6 | | -function add_adjust_hooks(mvd_id, track_dur){ |
| 5 | +/* |
| 6 | +* adds adjustment hooks |
| 7 | +* @mvd_id set to the mvd_id |
| 8 | +*/ |
| 9 | +function add_adjust_hooks(mvd_id, track_dur, targets){ |
7 | 10 | if(track_dur)track_dur=parseInt(track_dur); |
8 | 11 | js_log('add_adjust_hooks: ' + mvd_id + ' td: '+ track_dur); |
| 12 | + |
| 13 | + /*var base_targets = new Array('mv_end_hr', 'mv_start_hr', 'track_target' ); |
| 14 | + |
| 15 | + if( typeof targets == 'object'){ |
| 16 | + for(var i in targets){ |
| 17 | + |
| 18 | + } |
| 19 | + }else{ |
| 20 | + |
| 21 | + }*/ |
| 22 | + |
9 | 23 | //if options are unset populate functions: |
10 | 24 | //add mouse over end time frame highlight |
11 | 25 | $j('#mv_end_hr_'+mvd_id).hoverIntent({interval:200,over:function(){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/embedLibs/mv_nativeEmbed.js |
— | — | @@ -1,4 +1,4 @@ |
2 | | - |
| 2 | +//native embed library: |
3 | 3 | var nativeEmbed = { |
4 | 4 | instanceOf:'nativeEmbed', |
5 | 5 | canPlayThrough:false, |
— | — | @@ -133,7 +133,10 @@ |
134 | 134 | } |
135 | 135 | }, |
136 | 136 | pause : function(){ |
137 | | - this.vid.pause(); |
| 137 | + this.getVID(); |
| 138 | + if(this.vid){ |
| 139 | + this.vid.pause(); |
| 140 | + } |
138 | 141 | //stop updates: |
139 | 142 | this.stopMonitor(); |
140 | 143 | }, |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/mv_sequence.css |
— | — | @@ -36,12 +36,15 @@ |
37 | 37 | border:solid thin gray; |
38 | 38 | |
39 | 39 | } |
| 40 | +/**************************/ |
| 41 | +.clip_img{ |
| 42 | + } |
40 | 43 | .clip_edit_button{ |
41 | 44 | width:16px; |
42 | 45 | height:16px; |
43 | 46 | position:absolute; |
44 | 47 | top:0px; |
45 | | - right:60px; |
| 48 | + right:50px; |
46 | 49 | cursor:pointer; |
47 | 50 | } |
48 | 51 | .clip_trans_box{ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -34,20 +34,18 @@ |
35 | 35 | //media_server mv_embed_path (the path on media servers to mv_embed for java iframe with leading and trailing slashes) |
36 | 36 | var mv_media_iframe_path = '/mv_embed/'; |
37 | 37 | |
38 | | -//the default height/width of the vidoe (if no style or width attr provided) |
| 38 | +//the default height/width of the video (if no style or width attr provided) |
39 | 39 | var mv_default_video_size = '400x300'; |
40 | 40 | |
41 | | -//this restricts playable sources to ROE xml media without start end time atttribute |
| 41 | +//this restricts playable sources to ROE xml media without start end time attribute |
42 | 42 | var mv_restrict_roe_time_source = true; |
43 | 43 | |
44 | | - |
45 | 44 | var global_player_list = new Array(); |
46 | 45 | var global_req_cb = new Array();//the global request callback array |
47 | 46 | var _global = this; |
48 | 47 | var mv_init_done=false; |
49 | 48 | var global_cb_count =0; |
50 | 49 | |
51 | | - |
52 | 50 | /* |
53 | 51 | * its best if you just require all your external data sources to serve up json data. |
54 | 52 | * or |
— | — | @@ -254,13 +252,15 @@ |
255 | 253 | //check if all videos are "ready to play" |
256 | 254 | var is_ready=true; |
257 | 255 | for(var i in global_player_list){ |
258 | | - var cur_vid = $j('#'+global_player_list[i]).get(0); |
259 | | - is_ready = (cur_vid.ready_to_play ) ? is_ready : false; |
260 | | - if( !is_ready && cur_vid.load_error ){ |
261 | | - is_ready=true; |
262 | | - $j(cur_vid).html( cur_vid.load_error ); |
| 256 | + if( $j('#'+global_player_list[i]).length !=0){ |
| 257 | + var cur_vid = $j('#'+global_player_list[i]).get(0); |
| 258 | + is_ready = (cur_vid.ready_to_play ) ? is_ready : false; |
| 259 | + if( !is_ready && cur_vid.load_error ){ |
| 260 | + is_ready=true; |
| 261 | + $j(cur_vid).html( cur_vid.load_error ); |
| 262 | + } |
263 | 263 | } |
264 | | - } |
| 264 | + } |
265 | 265 | js_log('f:check_init_done '+ is_ready + ' ' + cur_vid.load_error + ' rtp: '+ cur_vid.ready_to_play); |
266 | 266 | if( !is_ready ){ |
267 | 267 | //js_log('some ' + global_player_list + ' not ready'); |
— | — | @@ -2647,7 +2647,7 @@ |
2648 | 2648 | var height = (this.pc)?this.pc.pp.height:this.playerPixelHeight(); |
2649 | 2649 | |
2650 | 2650 | if(this.pc) |
2651 | | - height+=(plObj.pl_layout.title_bar_height + plObj.pl_layout.control_height); |
| 2651 | + height+=(this.pc.pp.pl_layout.title_bar_height + this.pc.pp.pl_layout.control_height); |
2652 | 2652 | |
2653 | 2653 | var fade_in = true; |
2654 | 2654 | if($j('#blackbg_'+sel_id).length!=0) |
— | — | @@ -2690,9 +2690,10 @@ |
2691 | 2691 | var supporting_players = embedTypes.players.getMIMETypePlayers(mime_type); |
2692 | 2692 | |
2693 | 2693 | var select_html='<div id="player_select_list_' + index + '" class="player_select_list"><ul>'; |
2694 | | - for(i in supporting_players){ |
2695 | | - //put colored plugin icon and no link for supported player: |
2696 | | - if(embedTypes.players.defaultPlayer(mime_type).id==supporting_players[i].id ){ |
| 2694 | + for(var i in supporting_players){ |
| 2695 | + //js_log('checking |
| 2696 | + //put colored (selected) display if selected_player matches current |
| 2697 | + if( this.selected_player.id == supporting_players[i].id ){ |
2697 | 2698 | select_html+='<li>'+ |
2698 | 2699 | '<img border="0" width="16" height="16" src="'+mv_embed_path+'images/plugin.png">'+ |
2699 | 2700 | supporting_players[i].getName() + |
— | — | @@ -2721,9 +2722,9 @@ |
2722 | 2723 | //js_log('selected src'+ _this.media_element.selected_source.url); |
2723 | 2724 | $j.each(this.media_element.getPlayableSources(), function(index, source) |
2724 | 2725 | { |
2725 | | - var default_player = embedTypes.players.defaultPlayer(source.getMIMEType()); |
| 2726 | + var default_player = embedTypes.players.defaultPlayer( source.getMIMEType() ); |
2726 | 2727 | var source_select_code = '$j(\'#'+this_id+'\').get(0).closeDisplayedHTML(); $j(\'#'+_this.id+'\').get(0).media_element.selectSource(\''+index+'\');'; |
2727 | | - var player_code = _this.getPlayerSelectList(source.getMIMEType(), index, source_select_code); |
| 2728 | + var player_code = _this.getPlayerSelectList( source.getMIMEType(), index, source_select_code); |
2728 | 2729 | var is_not_selected = (source != _this.media_element.selected_source); |
2729 | 2730 | var image_src = mv_embed_path+'/images/stream/'; |
2730 | 2731 | image_src += (source.mime_type == 'video/x-flv')?'flash_icon_':'fish_xiph_org_'; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_remote_media_search.js |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | num_req:0, |
14 | 14 | |
15 | 15 | result_display_mode:'box', //box or list |
16 | | - api_mode:'mediawiki', //api mode (mediawiki api or metavid enhanced wiki api) |
| 16 | + api_mode:'metavid', //api mode (mediawiki api or metavid enhanced wiki api) |
17 | 17 | resultsObj:{}, |
18 | 18 | //init the object: |
19 | 19 | init:function( initObj ){ |
— | — | @@ -38,34 +38,38 @@ |
39 | 39 | //check if we are in metavid Temporal semantic media search mode |
40 | 40 | //add an "advanced search" button |
41 | 41 | |
42 | | - //add in controls: (find a better place for these / use css ) |
43 | | - var box_dark = (this.result_display_mode=='box')?'_dark':''; |
44 | | - var list_dark = (this.result_display_mode=='list')?'_dark':''; |
| 42 | + //add in controls: (find a better place for these / use css |
| 43 | + //this seems highly verbose do do a simple control |
| 44 | + var box_dark_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/box_layout_icon_dark.png'; |
| 45 | + var box_light_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/box_layout_icon.png'; |
| 46 | + var list_dark_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/list_layout_icon_dark.png'; |
| 47 | + var list_light_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/list_layout_icon.png'; |
| 48 | + |
45 | 49 | $j('#'+this.target_submit).after('<img id="msc_box_layout" ' + |
46 | | - 'src = "' + mv_embed_path + 'skins/' + mv_skin_name + '/images/box_layout_icon' + box_dark + '.png" ' + |
| 50 | + 'src = "' + ( (_this.result_display_mode=='box')?box_dark_url:box_light_url ) + '" ' + |
47 | 51 | 'style="width:20px;height:20px;cursor:pointer;"> ' + |
48 | 52 | '<img id="msc_list_layout" '+ |
49 | | - 'src = "' + mv_embed_path + 'skins/' + mv_skin_name + '/images/list_layout_icon' + list_dark + '.png" '+ |
| 53 | + 'src = "' + ( (_this.result_display_mode=='list')?list_dark_url:list_light_url ) + '" '+ |
50 | 54 | 'style="width:20px;height:20px;cursor:pointer;">' |
51 | 55 | ); |
52 | | - js_log('should have set: ' +this.target_submit); |
| 56 | + |
53 | 57 | $j('#msc_box_layout').hover(function(){ |
54 | | - $j(this).attr("src", mv_embed_path+'skins/'+mv_skin_name+'/images/box_layout_icon_dark.png'); |
55 | | - }, function(){ |
56 | | - var box_dark = (_this.result_display_mode=='box')?'_dark':''; |
57 | | - $j(this).attr("src", mv_embed_path+'skins/'+mv_skin_name+'/images/box_layout_icon'+box_dark+'.png'); |
| 58 | + $j(this).attr("src", box_dark_url ); |
| 59 | + }, function(){ |
| 60 | + $j(this).attr("src", ( (_this.result_display_mode=='box')?box_dark_url:box_light_url ) ); |
58 | 61 | }).click(function(){ |
59 | | - $j(this).attr("src", mv_embed_path+'skins/'+mv_skin_name+'/images/box_layout_icon_dark.png'); |
| 62 | + $j(this).attr("src", box_dark_url); |
| 63 | + $j('#msc_list_layout').attr("src", list_light_url); |
60 | 64 | _this.setDispMode('box'); |
61 | 65 | }); |
62 | 66 | |
63 | 67 | $j('#msc_list_layout').hover(function(){ |
64 | | - $j(this).attr("src", mv_embed_path+'skins/'+mv_skin_name+'/images/list_layout_icon_dark.png'); |
| 68 | + $j(this).attr("src", list_dark_url); |
65 | 69 | }, function(){ |
66 | | - var list_dark = (_this.result_display_mode=='list')?'_dark':''; |
67 | | - $j(this).attr("src", mv_embed_path+'skins/'+mv_skin_name+'/images/list_layout_icon'+list_dark+'.png'); |
| 70 | + $j(this).attr("src", ( (_this.result_display_mode=='list')?list_dark_url:list_light_url ) ); |
68 | 71 | }).click(function(){ |
69 | | - $j(this).attr("src", mv_embed_path+'skins/'+mv_skin_name+'/images/list_layout_icon_dark.png'); |
| 72 | + $j(this).attr("src", list_dark_url); |
| 73 | + $j('#msc_box_layout').attr("src", box_light_url); |
70 | 74 | _this.setDispMode('list'); |
71 | 75 | }); |
72 | 76 | |
— | — | @@ -82,7 +86,8 @@ |
83 | 87 | js_log('f:getSearchResults for:' + $j('#'+this.target_input).val() ); |
84 | 88 | //set results div to "loading" |
85 | 89 | $j('#'+this.target_results).html( getMsg('loading_txt') ); |
86 | | - |
| 90 | + //empty out the current results: |
| 91 | + this.resultsObj={}; |
87 | 92 | //do two queries against the Image / File namespace: |
88 | 93 | if( this.api_mode=='mediawiki' ){ |
89 | 94 | //construct search request: |
— | — | @@ -116,7 +121,12 @@ |
117 | 122 | _this.addMediaWikiAPIResults( data); |
118 | 123 | _this.checkRequestDone(); |
119 | 124 | }); |
120 | | - } |
| 125 | + } |
| 126 | + //do unified media search call to metavid toolset: |
| 127 | + if(this.api_mode == 'metavid'){ |
| 128 | + //do unified query request: |
| 129 | + |
| 130 | + } |
121 | 131 | }, |
122 | 132 | //check request done used for when we have multiple requests to check before formating results. |
123 | 133 | checkRequestDone:function(){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_sequencer.js |
— | — | @@ -54,9 +54,8 @@ |
55 | 55 | sequence_tools_id:'mv_sequence_tools', |
56 | 56 | timeline_id:'mv_timeline', |
57 | 57 | plObj_id:'seq_plobj', |
58 | | - plObj_clone:null, |
| 58 | + plObj_clone:null, |
59 | 59 | |
60 | | - |
61 | 60 | timeline_scale:.125, //in pixel to second ratio ie 100pixles for every ~30seconds |
62 | 61 | timeline_duration:500, //default timeline length in seconds |
63 | 62 | playline_time:0, |
— | — | @@ -443,7 +442,7 @@ |
444 | 443 | //close the tag |
445 | 444 | o+='</sequence_hlrd>'; |
446 | 445 | |
447 | | - js_log('f:getSeqOutputHLRDXML'+ o); |
| 446 | + alert('f:getSeqOutputHLRDXML'+ o); |
448 | 447 | |
449 | 448 | return false; |
450 | 449 | }, |
— | — | @@ -490,10 +489,26 @@ |
491 | 490 | $j('#modal_window').empty().show(); |
492 | 491 | //set to the current clip in "clip mode" |
493 | 492 | var clip = this.plObj.tracks[track_inx].clips[ clip_inx ]; |
494 | | - $j('#modal_window').append('<div style="position:absolute;top:10%left:auto;right:auto;">'+ |
495 | | - |
496 | | - '</div>'); |
497 | | - $j('#modal_window').append('<div style="position:absolute;bottom:10%;left:50%;">'+ |
| 493 | + //@@todo do per clip type edit modes: |
| 494 | + $j('#modal_window').append('<div style="position:absolute;top:10px;left:25%;width:'+this.plObj.width+'px;">'+ |
| 495 | + '<h3>' + clip.getTitle() + '</h3>'+ |
| 496 | + '<video id="chop_clip_' + track_inx + '_' + clip_inx + '" ' + |
| 497 | + 'style="width:'+this.plObj.width+'px;height:'+this.plObj.height+'px;" '+ |
| 498 | + 'poster="'+clip.embed.media_element.getThumbnailURL()+'" ' + |
| 499 | + 'src="' + clip.src + '"></video>'+ |
| 500 | + '<div style="padding-top:10px;">'+ |
| 501 | + '<span style="position:absolute;left:0px;">'+ |
| 502 | + 'start time:<input id="chop_start" type="text" size="10" value="0:0:0">'+ |
| 503 | + '</span>'+ |
| 504 | + '<span style="position:absolute;right:0px;">'+ |
| 505 | + 'end time:<input id="chop_end" type="text" size="10" '+ |
| 506 | + 'value="' + seconds2ntp(clip.getDuration()) + '" >' + |
| 507 | + '</span>'+ |
| 508 | + '</div>'+ |
| 509 | + '</div>' |
| 510 | + //start time end time field display |
| 511 | + ); |
| 512 | + $j('#modal_window').append('<div style="position:absolute;bottom:10px;left:50%;">'+ |
498 | 513 | '<a style="border:solid gray;font-size:1.2em;" onClick="window.confirm(\''+getMsg('edit_cancel_confirm')+'\')" '+ |
499 | 514 | 'href="javascript:'+this.instance_name+'.closeModWindow()">'+ |
500 | 515 | getMsg('edit_cancel') + '</a> '+ |
— | — | @@ -502,13 +517,18 @@ |
503 | 518 | '</a>'+ |
504 | 519 | '</div>' |
505 | 520 | ); |
| 521 | + rewrite_by_id('chop_clip_' + track_inx + '_' + clip_inx ); |
| 522 | + //add in-out setters |
| 523 | + |
| 524 | + //add start / end hooks |
| 525 | + |
506 | 526 | }, |
507 | 527 | //save new clip segment |
508 | 528 | saveClipEdit:function(){ |
509 | 529 | //saves the clip updates |
510 | 530 | }, |
511 | 531 | closeModEditor:function(){ |
512 | | - $j('#modalbox').hide(); |
| 532 | + $j('#modalbox,#mv_overlay').remove(); |
513 | 533 | }, |
514 | 534 | closeModWindow:function(){ |
515 | 535 | $j('#modal_window').hide(); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_playlist.js |
— | — | @@ -996,6 +996,12 @@ |
997 | 997 | '</div>'); |
998 | 998 | } |
999 | 999 | }, |
| 1000 | + getTitle:function(){ |
| 1001 | + if(typeof this.title == 'string') |
| 1002 | + return this.title |
| 1003 | + |
| 1004 | + return 'untitled clip ' + this.order; |
| 1005 | + }, |
1000 | 1006 | getThumb:function(){ |
1001 | 1007 | var out=''; |
1002 | 1008 | //if we have the parent playlist grab it to get the image scale |