mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
PHRAS-2665 #comment Fix video tool ratio #time 8h
This commit is contained in:
0
cache/.gitkeep
vendored
0
cache/.gitkeep
vendored
@@ -45,6 +45,8 @@
|
|||||||
{% set dataH = constant('media_subdef::TC_DATA_HEIGHT') %}
|
{% set dataH = constant('media_subdef::TC_DATA_HEIGHT') %}
|
||||||
|
|
||||||
{% set technical_info = record.get_technical_infos %}
|
{% set technical_info = record.get_technical_infos %}
|
||||||
|
|
||||||
|
{#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 %}
|
||||||
|
|
||||||
@@ -56,12 +58,32 @@
|
|||||||
{% set ratio = '' %}
|
{% set ratio = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<video id="thumb_video" controls="" preload="auto" data-ratio="{{ ratio }}">
|
{#Set the document Ratio #}
|
||||||
{% for subdef in previewHtml5 %}
|
{% for subdef in outputFormats %}
|
||||||
<source type="{{ subdef.get_mime() }}" src="{{ subdef.get_url() }}"/>
|
|
||||||
{% endfor %}
|
{% set width = subdef.get_width() %}
|
||||||
{{ 'No preview available' | trans }}
|
{% set height = subdef.get_height() %}
|
||||||
</video>
|
|
||||||
|
{% if width and height %}
|
||||||
|
{% set rawRatio = (width / height)|number_format(3, '.') %}
|
||||||
|
{% set rawRatioLength = rawRatio|length %}
|
||||||
|
{% set docRatio = rawRatio|slice(0,rawRatioLength-1) %}
|
||||||
|
{% else %}
|
||||||
|
{% set docRatio = '' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<video id="thumb_video" controls="" preload="auto" data-ratio="{{ docRatio }}">
|
||||||
|
{% for subdef in previewHtml5 %}
|
||||||
|
<source type="{{ subdef.get_mime() }}" src="{{ subdef.get_url() }}"/>
|
||||||
|
{% endfor %}
|
||||||
|
{{ 'No preview available' | trans }}
|
||||||
|
</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>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="thumb_camera_button"></div>
|
<div id="thumb_camera_button"></div>
|
||||||
@@ -109,7 +131,7 @@
|
|||||||
<canvas data-width="{{ subdef.get_width() }}"
|
<canvas data-width="{{ subdef.get_width() }}"
|
||||||
data-height="{{ subdef.get_height() }}"
|
data-height="{{ subdef.get_height() }}"
|
||||||
data-name="{{ subdef.get_name() }}"
|
data-name="{{ subdef.get_name() }}"
|
||||||
class="alt_canvas" id="{{ subdef.get_name() }}"></canvas>
|
class="alt_canvas" id="{{ subdef.get_name() }}" ></canvas>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user