File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ Object.assign(MediaElementPlayer.prototype, {
242242 t . updateQualityButton ( this , player , currentQuality ) ;
243243 t . switchHLSQuality ( player , media ) ;
244244 } else {
245- t . updateQualityButton ( this , player , currentQuality ) ;
245+ currentQuality = t . updateQualityButton ( this , player , currentQuality ) ;
246246
247247 let currentTime = media . currentTime ;
248248 const paused = media . paused ;
@@ -442,12 +442,14 @@ Object.assign(MediaElementPlayer.prototype, {
442442 }
443443
444444 player . qualitiesContainer . querySelector ( 'button' ) . innerHTML = newQuality ;
445+ return newQuality ;
445446 } ,
446447
447448 /**
448- * Returns the quality represnetaion base on the height of the loaded video
449- * @param {Number } height the pixel height of the video
450- **/
449+ * Returns the quality represnetaion base on the height of the loaded video
450+ * @param {Number } height the pixel height of the video
451+ * @param {Number } height the pixel height of the video
452+ **/
451453 getQualityFromHeight ( height ) {
452454 if ( height >= 4320 ) {
453455 return "8K UHD" ;
You can’t perform that action at this time.
0 commit comments