DmitrMakeev commited on
Commit
51fa69d
1 Parent(s): 9ede144

Update se_mes_im2.html

Browse files
Files changed (1) hide show
  1. se_mes_im2.html +7 -4
se_mes_im2.html CHANGED
@@ -39,6 +39,13 @@
39
  justify-content: center;
40
  align-items: center;
41
  flex-direction: column;
 
 
 
 
 
 
 
42
  }
43
  #imageUrl {
44
  margin-top: 20px;
@@ -90,15 +97,11 @@
90
  if (['jpg', 'jpeg', 'png', 'gif'].includes(extension)) {
91
  var img = document.createElement('img');
92
  img.src = url;
93
- img.style.width = '300px';
94
- img.style.height = '300px';
95
  mediaContainer.appendChild(img);
96
  } else if (['mp4', 'webm', 'ogg'].includes(extension)) {
97
  var video = document.createElement('video');
98
  video.src = url;
99
  video.controls = true;
100
- video.style.width = '300px';
101
- video.style.height = '300px';
102
  mediaContainer.appendChild(video);
103
  } else if (['mp3', 'wav', 'ogg'].includes(extension)) {
104
  var audio = document.createElement('audio');
 
39
  justify-content: center;
40
  align-items: center;
41
  flex-direction: column;
42
+ max-width: 100%;
43
+ height: auto;
44
+ }
45
+ #mediaContainer img, #mediaContainer video {
46
+ max-width: 100%;
47
+ height: auto;
48
+ object-fit: contain;
49
  }
50
  #imageUrl {
51
  margin-top: 20px;
 
97
  if (['jpg', 'jpeg', 'png', 'gif'].includes(extension)) {
98
  var img = document.createElement('img');
99
  img.src = url;
 
 
100
  mediaContainer.appendChild(img);
101
  } else if (['mp4', 'webm', 'ogg'].includes(extension)) {
102
  var video = document.createElement('video');
103
  video.src = url;
104
  video.controls = true;
 
 
105
  mediaContainer.appendChild(video);
106
  } else if (['mp3', 'wav', 'ogg'].includes(extension)) {
107
  var audio = document.createElement('audio');