Open clyde1021 opened 6 years ago
You need videojs 7.xx and HLS technology on the server
at least in chrome, you don't need HLS. you can use the NetworkConnection framework.
We also use this:
connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
connectionType = connection.effectiveType
downlinkMax = navigator.connection.downlinkMax || navigator.connection.downlink
dataSaving = navigator.connection.saveData || false
if (dataSaving) return 'low'
if(not downlinkMax) return 'low'
// now distinguish your resolution based on your video profiles and the downlinkMax (in Mbps)
I would like to know if there is a way to automatically change the video resolution according to the bandwidth? Kind of like on Youtube with the "auto" resolution?