com presentations: Added a no-autoplay tag.: slides/map/flat-sphere-flickr.xml templates/default/video.ezt
| From: | Derick Rethans | Date: | Tue, 29 Oct 2013 17:34:25 +0000 |
| Subject: | com presentations: Added a no-autoplay tag.: slides/map/flat-sphere-flickr.xml templates/default/video.ezt | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1931@lists.php.net to get a copy of this message | ||
Commit: 2449d96146488098a7be75c51e8052e90a001412
Author: Derick Rethans <github@derickrethans.nl> 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&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}