Merge branch 'master' into PHRAS-2671_change_behaviour_of_display_audio

This commit is contained in:
Nicolas Maillat
2019-08-01 22:13:51 +02:00
committed by GitHub
3 changed files with 24 additions and 11 deletions

View File

@@ -7,14 +7,14 @@
# - server # - server
# - repositories # - repositories
# - vagrant_local # - vagrant_local
# - nginx - nginx
# - mariadb # - mariadb
# - elasticsearch # - elasticsearch
# - rabbitmq # - rabbitmq
# - php # - php
# - xdebug - xdebug
# - composer # - composer
# - mailcatcher - mailcatcher
# - node # - node
# - yarn # - yarn
# - ffmpeg # - ffmpeg

View File

@@ -13,7 +13,7 @@
- name: Install mailcatcher gem - name: Install mailcatcher gem
# gem module is flaky, this is consistent # gem module is flaky, this is consistent
command: gem install mailcatcher --conservative command: gem install mailcatcher -v 0.6.4 --conservative
ignore_errors: yes ignore_errors: yes
- name: Install mailcatcher supervisord conf - name: Install mailcatcher supervisord conf

View File

@@ -45,23 +45,36 @@
{% 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 %}
{% set prevRatio = '' %}
{% if width and height %} {% if width and height %}
{% set rawRatio = (width / height)|number_format(3, '.') %} {% set ratio = (width / height)|number_format(2, '.') %}
{% set rawRatioLength = rawRatio|length %}
{% set ratio = rawRatio|slice(0,rawRatioLength-1) %}
{% else %}
{% set ratio = '' %}
{% endif %} {% endif %}
<video id="thumb_video" controls="" preload="auto" data-ratio="{{ ratio }}"> {#Set the document Ratio #}
{% for subdef in previewHtml5 %}
{% set width = subdef.get_width() %}
{% set height = subdef.get_height() %}
{% if width and height %}
{% if subdef.get_name()=='preview' %}
{% set prevRatio = (width / height)|number_format(2, '.') %}
{% endif %}
{% 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> </div>
<div id="thumb_camera_button"></div> <div id="thumb_camera_button"></div>
@@ -109,7 +122,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>