Test 0: 'Low', // 120kbps }, labelCallback: function(playbackLevel, customLabel) { return customLabel + playbackLevel.level.height+'p'; // High 720p } }, hlsjsConfig: { xhrSetup: function(xhr, url) { xhr.withCredentials = false; } }, maxBufferLength: "20", parentId: "#video-container"}); function resizePlayer(){ var aspectRatio = 9/16, newWidth = (document.getElementById("video-container").parentElement.offsetWidth)-25, newHeight = 2 * Math.round(newWidth * aspectRatio/2); } resizePlayer(); window.onresize = resizePlayer;