mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
PHRAS-2862 Lightbox mobile :video resize #time 4h
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
"normalize-css": "^2.1.0",
|
||||
"npm": "^6.0.0",
|
||||
"npm-modernizr": "^2.8.3",
|
||||
"phraseanet-production-client": "0.34.99-d",
|
||||
"phraseanet-production-client": "0.34.102-d",
|
||||
"requirejs": "^2.3.5",
|
||||
"tinymce": "^4.0.28",
|
||||
"underscore": "^1.8.3",
|
||||
|
@@ -59,7 +59,8 @@
|
||||
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
|
||||
{% set thumbnail_height = thumbnail.get_height() > 0 ? thumbnail.get_height() : 120 %}
|
||||
{% set thumbnail_width = thumbnail.get_width() > 0 ? thumbnail.get_width() : 120 %}
|
||||
<input type="hidden" class="hidden" id="videoRatio" name="videoRatio" value="{{ thumbnail_width / thumbnail_height }}"/>
|
||||
<input type="hidden" class="hidden" id="videoHeight" name="videoHeight" value="{{ thumbnail_height }}"/>
|
||||
<input type="hidden" class="hidden" id="videoWidth" name="videoWidth" value="{{ thumbnail_width }}"/>
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ url('alchemy_embed_view', {url: url|trim, autoplay: autoplay|default('false') }) }}"
|
||||
frameborder="0" allowfullscreen class="video-iframe"></iframe>
|
||||
|
@@ -93,21 +93,4 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/*resize of PDF */
|
||||
$(window).on("load resize ",function(e){
|
||||
if($('.pdf-iframe').length > 0) {
|
||||
var pdfHeight = $('.pdf-iframe').width() / 0.707;
|
||||
$('.pdf-iframe').css('height', pdfHeight);
|
||||
}
|
||||
});
|
||||
/*resize of VIDEO */
|
||||
$(window).on("load resize ",function(e){
|
||||
if($('.video-iframe').length > 0) {
|
||||
var ratio = $('[name=videoRatio]').val();
|
||||
var videoHeight = $('.video-iframe').width() / ratio;
|
||||
$('.video-iframe').css('height', videoHeight).css('min-height',0);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@@ -7577,10 +7577,10 @@ phraseanet-common@^0.4.5-d:
|
||||
js-cookie "^2.1.0"
|
||||
pym.js "^1.3.1"
|
||||
|
||||
phraseanet-production-client@0.34.99-d:
|
||||
version "0.34.99-d"
|
||||
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.99-d.tgz#fc06941163f698dc77ebca8a4c16663aa3ac458a"
|
||||
integrity sha512-016LZam+eNQqAYyduiGinT79YkGeUDWZ9uk7r01BHmgsYjWc+UoCvUvExhCCHcoyMm+qd29VfHhQAWoyCCkG6g==
|
||||
phraseanet-production-client@0.34.102-d:
|
||||
version "0.34.102-d"
|
||||
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.102-d.tgz#ee2772fd712a5fb2acc87eae5c7d4a2a46f5a28a"
|
||||
integrity sha512-3KtY3n9uI42o6mDUDDXX6KgP3Os2FlQE3nkzEJc3eVbstG9V6rNlk8J/ujXaMKy1hibBT+9f7TTSYy0Z9ARPBA==
|
||||
dependencies:
|
||||
"@mapbox/mapbox-gl-language" "^0.9.2"
|
||||
"@turf/turf" "^5.1.6"
|
||||
|
Reference in New Issue
Block a user