div.className = 'vjs-webtorrent'
// Hide the stats before we get the info
- subDiv.style.display = 'none'
+ subDiv.className = 'vjs-webtorrent-hidden'
this.player_.on('torrentInfo', (event, data) => {
const downloadSpeed = bytes(data.downloadSpeed)
peersNumber.textContent = numPeers
- subDiv.style.display = 'block'
+ subDiv.className = 'vjs-webtorrent-displayed'
})
return div
text-align: right;
padding-right: 60px;
+ .vjs-webtorrent-displayed {
+ display: block;
+ }
+
+ .vjs-webtorrent-hidden {
+ display: none;
+ }
+
.download-speed-number, .upload-speed-number, .peers-number {
font-weight: $font-semibold;
}
}
}
}
+
+ @media screen and (max-width: 450px) {
+ .vjs-webtorrent-displayed {
+ display: none !important;
+ }
+ }
}
// Thanks: https://projects.lukehaas.me/css-loaders/
}
}
}
+