2021-03-29 19:40:55 +02:00
|
|
|
const VideoRatio = function(w) {
|
2021-03-29 13:58:05 +02:00
|
|
|
this.window = w;
|
|
|
|
}
|
|
|
|
|
|
|
|
VideoRatio.prototype.init = function() {
|
|
|
|
var videos = this.window.document.querySelectorAll('.video-ratio');
|
|
|
|
|
|
|
|
for (var i = 0, len = videos.length; i < len; i++) {
|
|
|
|
videos[i].style.paddingBottom = videos[i].getAttribute('data-ratio');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = VideoRatio
|