--- a/src/pyams_media/zmi/templates/video-preview.pt Mon Jul 09 11:43:41 2018 +0200
+++ b/src/pyams_media/zmi/templates/video-preview.pt Mon Jul 09 13:42:20 2018 +0200
@@ -2,22 +2,22 @@
data-ams-plugins="flowplayer"
data-ams-plugin-flowplayer-async="false"
data-ams-callback="PyAMS_media.initPlayer"
- tal:attributes="data-ams-plugin-flowplayer-src extension:resource_path('pyams_media.skin:flowplayer');
- data-ams-plugin-flowplayer-css extension:resource_path('pyams_media.skin:functional_css');
- data-ams-callback-source extension:resource_path('pyams_media.skin:pyams_media');">
+ tal:attributes="data-ams-plugin-flowplayer-src tales:resource_path('pyams_media.skin:flowplayer');
+ data-ams-plugin-flowplayer-css tales:resource_path('pyams_media.skin:functional_css');
+ data-ams-callback-source tales:resource_path('pyams_media.skin:pyams_media');">
<video
- tal:define="href extension:absolute_url(context);
- thumbnails extension:thumbnails(context);
- conversions extension:conversions(context);
+ tal:define="href tales:absolute_url(context);
+ thumbnails tales:thumbnails(context);
+ conversions tales:conversions(context);
size thumbnails.get_image_size();"
tal:attributes="poster string:${href}/++thumb++${size[0]}x${size[1]}.png?_=${view.timestamp}">
<tal:loop repeat="conversion conversions.get_conversions(order=('video/webm','video/mp4','video/x-flv'))">
<source type="video/mp4"
tal:define="media_width conversions.get_conversion_width(conversion.__name__);
- video_type extension:video_type(conversion);"
+ video_type tales:video_type(conversion);"
tal:condition="video_type"
tal:attributes="type video_type;
- src extension:absolute_url(conversion);
+ src tales:absolute_url(conversion);
media 'all and (max-width: {0}px)'.format(media_width) if media_width else None;" />
</tal:loop>
</video>