PHRAS-2665 #time 3h

This commit is contained in:
Harrys Ravalomanana
2019-07-16 14:07:41 +04:00
parent 4671f5948c
commit 1ba27e55c7

View File

@@ -49,6 +49,7 @@
{#Set the preview Ratio #} {#Set the preview Ratio #}
{% set width = technical_info[dataW].value %} {% set width = technical_info[dataW].value %}
{% set height = technical_info[dataH].value %} {% set height = technical_info[dataH].value %}
{% set prevRatio = '' %}
{% if width and height %} {% if width and height %}
{% set rawRatio = (width / height)|number_format(3, '.') %} {% set rawRatio = (width / height)|number_format(3, '.') %}
@@ -59,7 +60,7 @@
{% endif %} {% endif %}
{#Set the document Ratio #} {#Set the document Ratio #}
{% for subdef in outputFormats %} {% for subdef in previewHtml5 %}
{% set width = subdef.get_width() %} {% set width = subdef.get_width() %}
{% set height = subdef.get_height() %} {% set height = subdef.get_height() %}
@@ -67,24 +68,21 @@
{% if width and height %} {% if width and height %}
{% set rawRatio = (width / height)|number_format(3, '.') %} {% set rawRatio = (width / height)|number_format(3, '.') %}
{% set rawRatioLength = rawRatio|length %} {% set rawRatioLength = rawRatio|length %}
{% set docRatio = rawRatio|slice(0,rawRatioLength-1) %} {% if subdef.get_name()=='preview' %}
{% else %} {% set prevRatio = rawRatio|slice(0,rawRatioLength-1) %}
{% set docRatio = '' %}
{% endif %} {% endif %}
{% if loop.index == 1 %} {% else %}
<video id="thumb_video" controls="" preload="auto" data-ratio="{{ docRatio }}" data-test="{{ loop.index }}"> {% set prevRatio = '' %}
{% endif %}
{% endfor %}
<video id="thumb_video" controls="" preload="auto" data-ratio="{{ prevRatio }}">
{% for subdef in previewHtml5 %} {% for subdef in previewHtml5 %}
<source type="{{ subdef.get_mime() }}" src="{{ subdef.get_url() }}"/> <source type="{{ subdef.get_mime() }}" src="{{ subdef.get_url() }}"/>
{% endfor %} {% endfor %}
{{ 'No preview available' | trans }} {{ 'No preview available' | trans }}
</video> </video>
<div data-width="{{ subdef.get_width() }}"
data-height="{{ subdef.get_height() }}"
data-name="{{ subdef.get_name() }}"
class="alt_canvas" id="{{ subdef.get_name() }}" ></div>
{% endif %}
{% endfor %}
</div> </div>
<div id="thumb_camera_button"></div> <div id="thumb_camera_button"></div>