Revision: 46064
Author: dale
Date: 2009-01-23 05:54:52 +0000 (Fri, 23 Jan 2009)
Log Message:
-----------
sequencer bugs
Modified Paths:
--------------
trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php
trunk/extensions/MetavidWiki/skins/add_media_wizard.js
trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js
trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_playlist.js
trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_sequencer.js
Modified: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php
2009-01-23 05:51:51 UTC (rev 46063)
+++ trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php
2009-01-23 05:54:52 UTC (rev 46064)
@@ -28,8 +28,11 @@
/*
* returns the xml output of the sequence with all wiki-text
templates/magic words swapped out
* also resolves all image and media locations with absolute paths.
+ *...@param $partial_node_set 'full' (the full nodeset)
+ * 'seq' (just seq
elements)
+ * 'transition'
(just transition elements)
*/
- function getSequenceSMIL(){
+ function getSequenceSMIL( $partial_node_set='full' ){
global $wgParser,$wgOut, $wgUser, $wgEnableParserCache;
//temporally stop cache:
$wgEnableParserCache=false;
@@ -48,7 +51,7 @@
$this->resolveHLRD_to_SMIL();
//@@todo get parser Output Object (maybe cleaner way to do this?
- //maybe parser cache is not the right place for this?)
+ //maybe parser cache is not the right place to cache the sequence
xml? )
$parserOutput = $wgParser->parse('', $this->mTitle,
ParserOptions::newFromUser( $wgUser ));
//output header:
$parserOutput->mText.=$this->smilDoc->saveXML();
@@ -136,10 +139,8 @@
if(!is_null($nodeAttr)){
foreach($nodeAttr as $atrr){
if($atrr->nodeName=='uri'){
- //pull in node content
$node_uri = $atrr->nodeValue;
- }
- //print "$attr = ". $atrr->nodeValue . "\n";
+ }
}
}
@@ -156,7 +157,13 @@
//top level ref includes of pages in the main
namespace not supported
break;
case MV_NS_SEQUENCE:
- //type sequence ..@@todo transclude the
sequence into present sequence (try to avoid id)
+ //type sequence ..@@todo transclude the
sequence into present sequence
+ //@@todo we should
+ //change the node type to "par" to group the
sequence under a single element (helpfull for editor representation)
+ /*$parElm =
$node->ownerDocument->createElement('par');
+
+ $seqArticle = new MV_SequencePage( $uriTitle );
+ $seqArticle->getSequenceSMIL();*/
break;
case MV_NS_STREAM:
global $mvDefaultVideoQualityKey,
$mvDefaultFlashQualityKey;
@@ -207,11 +214,11 @@
$templateText = '{{'. $uriTitle->getText();
$addedParamFlag=false;
$paramVars = Array();
- while ($node->childNodes->length){
-
if($node->firstChild->nodeName=='param'){
+ while ( $node->childNodes->length ){
+ if(
$node->firstChild->nodeName=='param' ){
$param = & $node->firstChild;
//make sure we have a name:
-
if($param->hasAttribute('name')){
+ if(
$param->hasAttribute('name') ){
//we have parameters:
$templateText.= "|\n";
$templateText .=
$param->getAttribute('name') . '=';
Modified: trunk/extensions/MetavidWiki/skins/add_media_wizard.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/add_media_wizard.js 2009-01-23
05:51:51 UTC (rev 46063)
+++ trunk/extensions/MetavidWiki/skins/add_media_wizard.js 2009-01-23
05:54:52 UTC (rev 46064)
@@ -8,6 +8,7 @@
//if mv_embed is hosted somewhere other than near by the add_media_wizard you
can define it here:
var mv_add_media_wizard_path =
'http://mvbox2.cse.ucsc.edu/w/extensions/MetavidWiki/skins/';
+var mv_add_media_wizard_path =
'http://localhost/wiki/extensions/MetavidWiki/skins/';
//*code should not have to modify anything below*/
@@ -146,6 +147,8 @@
return s.src.replace('add_media_wizard.js',
replace_str);
}
}
+ js_log('return default path: ' + mv_add_media_wizard_path +
replace_str);
return mv_add_media_wizard_path + replace_str;
}
+
Modified:
trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js
2009-01-23 05:51:51 UTC (rev 46063)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js
2009-01-23 05:54:52 UTC (rev 46064)
@@ -44,7 +44,7 @@
return this.init(initObj);
};
mvClipEdit.prototype = {
-
+
selTool:null, //selected tool
crop: null, //the crop values
base_img_src:null,
@@ -216,9 +216,20 @@
'd':0,
'media':['video'],
'doEdit':function( _this ){
+ var cat = _this.rObj
+ //debugger;
//do clock mouse scroll duration editor
- $j('#sub_cliplib_ic').html('cur start: ' +
_this.rObj.embed.start_ntp + ' end: ' + _this.rObj.embed.end_ntp );
- }
+ var end_ntp = ( _this.rObj.embed.end_ntp) ?
_this.rObj.embed.end_ntp : _this.rObj.embed.getDuration();
+ if(!end_ntp)
+ end_ntp = seconds2ntp( _this.rObj.dur );
+ $j('#sub_cliplib_ic').html(
+ _this.getSetInOut({
+ 'start_ntp' :
_this.rObj.embed.start_ntp,
+ 'end_ntp' : end_ntp
+ })
+ );
+ _this.setInOutBindings();
+ }
},
'panzoom':{
'd':0,
@@ -293,17 +304,42 @@
},
setUpVideoCtrl:function(){
js_log('setUpVideoCtrl:f');
+ var this_seq = this;
var eb = $j('#embed_vid').get(0);
//turn on preview to avoid onDone actions
eb.preview_mode = true;
$j('#'+this.control_ct).html('<h3>Edit Video Tools:</h3>');
- if( eb.supportsURLTimeEncoding() ){
- js_log("SUPPORTS supports_url_time_encoding do start
end");
- $j('#'+this.control_ct).append('<strong>Set in-out
points</strong>'+
+ if( eb.supportsURLTimeEncoding() ){
+ $j('#'+this.control_ct).append(
+ this_seq.getSetInOut({
+ 'start_ntp' : eb.start_ntp,
+ 'end_ntp' : eb.end_ntp
+ })
+ );
+ this_seq.setInOutBindings();
+ }
+ $j('#'+this.control_ct).append( this.getInsertDesc() );
+
+ $j('#'+this.control_ct).append( '<b>Metavid clip inserts not
yet supported</b>' +
+ '<a href="#" class="mv_cancel_img_edit" title="' +
getMsg('mv_cancel_image_insert')+'">' + getMsg('mv_cancel_image_insert') +
'</a> ');
+ //$j('#'+this.control_ct).append( this.getInsertDesc() +
this.getInsertAction() );
+
+ //this.applyInsertControlBindings();
+ },
+ setInOutBindings:function(){
+ //setup bindings for adjust / preview:
+ add_adjust_hooks( 'rsd' );
+ $j('#mv_preview_clip').click(function(){
+ $j('#embed_vid').get(0).stop();
+ $j('#embed_vid').get(0).play();
+ });
+ },
+ getSetInOut:function( setInt ){
+ return '<strong>Set in-out points</strong>'+
'<table border="0" style="background: transparent;
width:94%;height:50px;">'+
'<tr>' +
'<td style="width:50px">'+
- '<span style="font-size:
small;" id="track_time_start_rsd">' + eb.start_ntp +'</span>'+
+ '<span style="font-size:
small;" id="track_time_start_rsd">' + setInt.start_ntp +'</span>'+
'</td>' +
'<td>' +
'<div style="border: 1px solid
black; width: 100%; height: 5px; background-color: #888;" '+
@@ -320,39 +356,23 @@
'</div>'+
'</td>' +
'<td style="width:50px">'+
- '<span style="font-size:
small;" id="track_time_end_rsd">'+ eb.end_ntp +'</span>'+
+ '<span style="font-size:
small;" id="track_time_end_rsd">'+ setInt.end_ntp +'</span>'+
'</td>' +
'</tr>' +
'</table>'+
'<span style="float: left;">'+
'<label class="mv_css_form"
for="mv_start_hr_rsd"><i>Start time:</i></label>'+
- '<input id="mv_start_hr_rsd" class="mv_adj_hr"
name="mv_start_hr_rsd" value="' + eb.start_ntp + '" maxlength="8" size="8"/>'+
+ '<input id="mv_start_hr_rsd" class="mv_adj_hr"
name="mv_start_hr_rsd" value="' + setInt.start_ntp + '" maxlength="8"
size="8"/>'+
'</span>'+
'<span style="float: left;">'+
'<label for="mv_end_hr_rsd"
class="mv_css_form"><i>End time:</i></label>'+
- '<input name="mv_end_hr_rsd" id="mv_end_hr_rsd"
value="' + eb.end_ntp + '" maxlength="8" size="8" class="mv_adj_hr"/>'+
+ '<input name="mv_end_hr_rsd" id="mv_end_hr_rsd"
value="' + setInt.end_ntp + '" maxlength="8" size="8" class="mv_adj_hr"/>'+
'</span>'+
'<div style="clear: both;"/>'+
- '<input id="mv_preview_clip" type="button"
value="Preview/Play In-out points">');
-
- //setup bindings for adjust / preview:
- add_adjust_hooks('rsd');
- $j('#mv_preview_clip').click(function(){
- $j('#embed_vid').get(0).stop();
- $j('#embed_vid').get(0).play();
- });
- }
- $j('#'+this.control_ct).append( this.getInsertDesc() );
-
- $j('#'+this.control_ct).append( '<b>Metavid clip inserts not
yet supported</b>' +
- '<a href="#" class="mv_cancel_img_edit" title="' +
getMsg('mv_cancel_image_insert')+'">' + getMsg('mv_cancel_image_insert') +
'</a> ');
- //$j('#'+this.control_ct).append( this.getInsertDesc() +
this.getInsertAction() );
-
- //this.applyInsertControlBindings();
+ '<input id="mv_preview_clip" type="button"
value="Preview/Play In-out points">';
},
getInsertDesc:function(){
- return '<h3>Inline Description</h3>' +
- '(you can copy and paste from the transcript by
clicking on the cc button below the video)<br>'+
+ return '<h3>Inline Description</h3><br>'+
'<textarea style="width:300px;"
id="mv_inline_img_desc" rows="4" cols="30"></textarea><br>';
},
getInsertAction:function(){
@@ -679,10 +699,12 @@
//update the vid title:
$j('#mv_videoPlayerTime').html( start_time + ' to ' + end_time
);
var ebvid = $j('#embed_vid').get(0);
- if(ebvid.isPaused())
- ebvid.stop();
- $j('#embed_vid').get(0).updateVideoTime(start_time, end_time);
- js_log('update thumb: '+ start_time);
- ebvid.updateThumbTimeNTP( start_time );
+ if( ebvid ){
+ if(ebvid.isPaused())
+ ebvid.stop();
+ ebvid.updateVideoTime(start_time, end_time);
+ js_log('update thumb: '+ start_time);
+ ebvid.updateThumbTimeNTP( start_time );
+ }
}
}
\ No newline at end of file
Modified:
trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_playlist.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_playlist.js
2009-01-23 05:51:51 UTC (rev 46063)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_playlist.js
2009-01-23 05:54:52 UTC (rev 46064)
@@ -461,12 +461,13 @@
this.getClipCount()+' clips, <i>'+
seconds2ntp( this.getDuration() ) + '</i>');
- //only show the inline edit button if mediaWiki write API is
enabled:
- if(wgEnableWriteAPI)
+ //only show the inline edit button if mediaWiki write API is
enabled:
+ if( typeof wgEnableWriteAPI != 'undefined'){
$j('#ptitle_'+this.id).append(
'<a href="#"
onclick="$j(\'#'+this.id+'\').get(0).doEditor();"'+
'style="position:absolute;top:0px;right:0px">edit</a>'
);
+ }
//render out the dividers on the timeline:
this.colorPlayHead();
//update status:
Modified:
trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_sequencer.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_sequencer.js
2009-01-23 05:51:51 UTC (rev 46063)
+++ trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_sequencer.js
2009-01-23 05:54:52 UTC (rev 46064)
@@ -542,14 +542,14 @@
if( e.which == 17)
this_seq.key_ctrl_down = true;
- if( e.which == 67 && this_seq.key_ctrl_down &&
!this_seq.inputFocus)
+ if( (e.which == 67 && this_seq.key_ctrl_down) &&
!this_seq.inputFocus)
this_seq.copySelectedClips();
- if( e.which == 88 && this_seq.key_ctrl_down &&
!this_seq.inputFocus)
+ if( (e.which == 88 && this_seq.key_ctrl_down) &&
!this_seq.inputFocus)
this_seq.cutSelectedClips();
//paste cips on v + ctrl while not focused on a text
area:
- if( e.which == 86 && this_seq.key_ctrl_down &&
!this_seq.inputFocus)
+ if( (e.which == 86 && this_seq.key_ctrl_down) &&
!this_seq.inputFocus)
this_seq.pasteClipBoardClips();
});
@@ -563,7 +563,7 @@
this_seq.key_ctrl_down = false;
//backspace or delete key while not focused on a text
area:
- if( e.which == 8 || e.which == 46 &&
!this_seq.inputFocus){
+ if( (e.which == 8 || e.which == 46) &&
!this_seq.inputFocus){
this_seq.removeSelectedClips();
}
});
@@ -571,15 +571,17 @@
//check all nodes for focus
//@@todo it would probably be faster to search a given subnode instead
of all text
doFocusBindings:function(){
- var _this = this;
+ var this_seq = this;
//if an input or text area has focus disable delete key binding
- $("input,textarea").focus(function () {
- _this.inputFocus = true;
+ $j("input,textarea").focus(function () {
+ js_log("inputFocus:true");
+ this_seq.inputFocus = true;
});
- $("input,textarea").blur( function () {
- _this.inputFocus = false;
+ $j("input,textarea").blur( function () {
+ js_log("inputFocus:blur");
+ this_seq.inputFocus = false;
})
- }
+ },
update_tl_hook:function(jh_time_ms){
//put into seconds scale:
var jh_time_sec_float = jh_time_ms/1000;
@@ -736,14 +738,17 @@
this.removeSelectedClips();
},
removeSelectedClips:function(){
- var remove_clip_ary=new Array();
+ var remove_clip_ary=new Array();
//remove selected clips from display
$j('.container_track .mv_selected_clip').each(function(){
//grab the track index from the id (assumes
track_#_clip_#
remove_clip_ary.push (
$j(this).parent().attr('id').replace('track_','').replace('clip_','').split('_')
);
});
if(remove_clip_ary.length !=0 )
- this.removeClips(remove_clip_ary);
+ this.removeClips(remove_clip_ary);
+
+ //doEdit selected clips (updated selecte resource)
+ this.doEditSelectedClip();
},
//add a single or set of clips
//to a given position and track_inx
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs