do_api_req( {
'data':{'avinfo':1},
'url':_this.dnUrl + rObj.resourceKey + '/format=Ogg+video'
- },function(data){
+ },function(data){
if(data['length'])
rObj.duration = data['length'];
if(data['width'])
if(!options)
options ={};
var id_attr = (options['id'])?' id = "' + options['id'] +'" ': '';
- var src = rObj.src + '?t=0:0:0/'+ seconds2npt( rObj.duration );
+ if( rObj.duration ){
+ var src = rObj.src + '?t=0:0:0/'+ seconds2npt( rObj.duration );
+ }else{
+ var src = rObj.src;
+ }
if(rObj.mime == 'application/ogg' || rObj.mime == 'audio/ogg' || rObj.mime=='video/ogg'){
return '<video ' + id_attr + ' src="' + src + '" poster="' + rObj.poster + '" type="video/ogg"></video>';
}
/*
- hanndles clip edit controls
+ handles clip edit controls
'inoutpoints':0, //should let you set the in and out points of clip
- 'panzoom':0, //should allow setting keyframes and tweenning modes
+ 'panzoom':0, //should allow setting keyframes and tweening modes
'overlays':0, //should allow setting "locked to clip" overlay tracks
'audio':0 //should allow controlling the audio volume (with keyframes)
*/
var start_ntp = (_this.rObj.embed.start_ntp) ? _this.rObj.embed.start_ntp : seconds2npt( 0 );
if(!start_ntp)
seconds2npt( 0 );
-
- $j(target).html(
- _this.getSetInOutHtml({
- 'start_ntp' : start_ntp,
- 'end_ntp' : end_ntp
- })
- );
- _this.setInOutBindings();
+ //make sure we have an end time
+ if( end_ntp ){
+ $j(target).html(
+ _this.getSetInOutHtml({
+ 'start_ntp' : start_ntp,
+ 'end_ntp' : end_ntp
+ })
+ );
+ _this.setInOutBindings();
+ }
}
},
'fileopts':{
eb.preview_mode = true;
$j('#'+this.control_ct).html('<h3>' + gM('mwe-edit-video-tools') + '</h3>');
if( eb.supportsURLTimeEncoding() ){
- $j('#'+this.control_ct).append(
- _this.getSetInOutHtml({
- 'start_ntp' : eb.start_ntp,
- 'end_ntp' : eb.end_ntp
- })
- );
- _this.setInOutBindings();
+ if(eb.end_ntp){
+ $j('#'+this.control_ct).append(
+ _this.getSetInOutHtml({
+ 'start_ntp' : eb.start_ntp,
+ 'end_ntp' : eb.end_ntp
+ })
+ );
+ _this.setInOutBindings();
+ }
}
//if in a sequence we have no need for insertDesc
if( !_this.p_seqObj){
doLinkBack:function(){
if(this.roe && this.media_element.addedROEData==false){
var _this = this;
- this.displayHTML(gM('mwe-loading_txt'));
+ this.displayHTML( gM('mwe-loading_txt') );
do_request(this.roe, function(data)
{
_this.media_element.addROE(data);
_this.doLinkBack();
});
}else{
- if(this.media_element.linkback){
+ if( this.linkback){
+ window.location = this.linkback;
+ }else if(this.media_element.linkback){
window.location = this.media_element.linkback;
}else{
- this.displayHTML(gM('mwe-could_not_find_linkback'));
+ this.displayHTML( gM('mwe-could_not_find_linkback') );
}
}
},
$cpTxt.click(function(){
$j(this).get(0).select();
});
+
//add copy binding:
$cpBtn.click(function(){
$cpTxt.focus().get(0).select();
'<p class="short_match vo_showcode"><a href="#"><span>'+gM('mwe-share')+'</span></a></p>';
//link to the stream page if we are not already there:
- if( ctrlObj.embedObj.roe && typeof mv_stream_interface == 'undefined' )
+ if( ( ctrlObj.embedObj.roe || ctrlObj.embedObj.linkback ) && typeof mv_stream_interface == 'undefined' )
o+='<p class="short_match"><a href="javascript:$j(\'#'+ctrlObj.id+'\').get(0).doLinkBack()"><span><strong>Source Page</strong></span></a></p>';
o+='</div>'+