PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | modules/theme-tools/responsive-videos/responsive-videos.js +2 -1 12.9.5 → 16.3-beta View file →
@@ -26,9 +26,8 @@
26 26 video.style.display = 'block';
27 27 video.style.margin = videoMargin;
28 28 }
29 29
30 - const videoWidth = video.getAttribute( 'data-width' );
31 30 const videoHeight = video.getAttribute( 'data-height' );
32 31 const videoRatio = video.getAttribute( 'data-ratio' );
33 32 const containerWidth = video.parentElement.clientWidth;
34 33
@@ -39,8 +38,10 @@
39 38 video.style.width = '100%';
40 39 video.style.height = videoHeight + 'px';
41 40 return;
42 41 }
42 +
43 + const videoWidth = video.getAttribute( 'data-width' );
43 44
44 45 if ( parseInt( videoWidth, 10 ) > containerWidth ) {
45 46 video.style.width = containerWidth + 'px';
46 47 video.style.height = containerWidth * parseFloat( videoRatio ) + 'px';