The unique way i've found that work is via Javascript, maybe with a throttler function, reducing to a reasonable minimum the computation:
Code: Select all
let w3vtp_ve = document.querySelectorAll("video");
(function() {
window.addEventListener("resize", resizeThrottler, false);
var resizeTimeout;
function resizeThrottler() {
if ( !resizeTimeout ) {
resizeTimeout = setTimeout(function() {
resizeTimeout = null;
vtpResizeHandler();
}, 990);
}}
function vtpResizeHandler() {
if (window.matchMedia("(min-width: 400px)").matches) {
for (var i = 0, len = w3vtp_ve.length; i < len; i++) {
var el = document.getElementById('w3_vtp_recording'+[i]);
if(el !== null){
el.controls = true;
}
}} else {
for (var i = 0, len = w3vtp_ve.length; i < len; i++) {
var el = document.getElementById('w3_vtp_recording'+[i]);
if(el !== null){
el.controls = false;
}
}}
}}());
Anybody can find out a better solution than this?
Of course, yes there is: remove native controls on html5 video element (that is rendered browser by browser in different ways) and add your own styled buttons.
So excluding the above, any possibility more for some css ninja to achieve the same? (i do not think for what i know at date of this post).