|
From: <ma...@us...> - 2011-11-16 21:39:24
|
Revision: 521
http://openautomation.svn.sourceforge.net/openautomation/?rev=521&view=rev
Author: mayerch
Date: 2011-11-16 21:39:18 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Update video element: remove Copy&Paster error "refresh" and add the more sensible "autoplay"
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-11-16 13:41:25 UTC (rev 520)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-11-16 21:39:18 UTC (rev 521)
@@ -659,22 +659,20 @@
var ret_val = $('<div class="widget video" />');
var labelElement = $p.find('label')[0];
ret_val.append( labelElement ? '<div class="label">' + labelElement.textContent + '</div>' : '' );
+ var autoplay = ($p.attr('autoplay') && $p.attr('autoplay')=='true') ? ' autoplay="autoplay"' : '';
var style = '';
if( $p.attr('width' ) ) style += 'width:' + $p.attr('width' ) + ';';
if( $p.attr('height') ) style += 'height:' + $p.attr('height') + ';';
if( style != '' ) style = 'style="' + style + '"';
- var actor = '<div class="actor"><video src="' +$p.attr('src') + '" ' + style + ' controls="controls" /></div>';
- var refresh = $p.attr('refresh') ? $p.attr('refresh')*1000 : 0;
- ret_val.append( $(actor).data( {
- 'refresh': refresh
- } ).each(setupRefreshAction) ); // abuse "each" to call in context...
+ var actor = '<div class="actor"><video src="' +$p.attr('src') + '" ' + style + autoplay + ' controls="controls" /></div>';
+ ret_val.append( $(actor).data( {} ) );
return ret_val;
},
attributes: {
src: { type: 'uri' , required: true },
width: { type: 'string' , required: false },
height: { type: 'string' , required: false },
- refresh: { type: 'numeric', required: false }
+ autoplay:{ type: 'list' , required: true, list: {'true': "yes", 'false': "no"} }
},
elements: {
label: { type: 'string', required: false, multi: false }
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-11-16 13:41:25 UTC (rev 520)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-11-16 21:39:18 UTC (rev 521)
@@ -178,6 +178,14 @@
<label>Image: mit Größenangabe</label>
</image>
</page>
+ <break/>
+ <page name="Video..." align="center">
+ <text>In dem Video-Element lassen sich Videos nach dem HTML5 Standard einbinden</text>
+ <break/>
+ <video src="https://upload.wikimedia.org/wikipedia/commons/b/b5/I-15bis.ogg" autoplay="false">
+ <label>Polikarpov I-15bis - Ogg Theora</label>
+ </video>
+ </page>
<line/>
<page name="iframe Test" align="center" >
<iframe src="http://www.cometvisu.org" width="500px" height="500px"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|