com presentations: Added a no-autoplay tag.: slides/map/flat-sphere-flickr.xml templates/default/video.ezt

[email protected] (Derick Rethans)
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    2449d96146488098a7be75c51e8052e90a001412
Author:    Derick Rethans <[email protected]>         Tue, 29 Oct 2013 17:34:25 +0000
Parents:   e5264a55405f30d002f37ac820e8606d1fdefda1
Branches:  master

Link:       http://git.php.net/?p=presentations.git;a=commitdiff;h=2449d96146488098a7be75c51e8052e90a001412

Log:
Added a no-autoplay tag.

Changed paths:
  M  slides/map/flat-sphere-flickr.xml
  M  templates/default/video.ezt


Diff:
diff --git a/slides/map/flat-sphere-flickr.xml b/slides/map/flat-sphere-flickr.xml
index c6c2d66..59928ac 100644
--- a/slides/map/flat-sphere-flickr.xml
+++ b/slides/map/flat-sphere-flickr.xml
@@ -1,5 +1,5 @@
 <slide>
 <title>Flat vs. Sphere</title>
 
-<iframe filename='examples/3angle/?l=flickr&amp;zoom=12'/>
+<video filename="gc-example.webm" autoplay="false"/>
 </slide>
diff --git a/templates/default/video.ezt b/templates/default/video.ezt
index f3658ad..14c351e 100644
--- a/templates/default/video.ezt
+++ b/templates/default/video.ezt
@@ -3,6 +3,10 @@
 {var $attr = get_attribute( $node, 'attr' )}
 {var $width = get_attribute( $node, 'width' )}
 {var $height = get_attribute( $node, 'height' )}
+{var $autoplay = "true"}
+{if has_attribute( $node, 'autoplay' )}
+{$autoplay = get_attribute( $node, 'autoplay' )}
+{/if}
 {var $source = ''}
 {if !$width}{$width = 1010}{/if}
 {if !$height}{$height = 592}{/if}
@@ -12,7 +16,7 @@
 {$source = str_append($pres->base, get_attribute( $node, 'filename' ))}
 {/if}
 <div{if $align} align='{$align}'{/if}>
-<video {if $inline}class='inline' {/if} width="{$width}" height="{$height}" preload controls autoplay>
+<video {if $inline}class='inline' {/if} width="{$width}" height="{$height}" preload controls{if $autoplay == "true"} autoplay{/if}>
 	<source src="{$source}" type='video/webm; codecs="vp8, vorbis"' />
 </video>
 {if $attr}<span class='attribution'>{$attr}</span>{/if}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.