Perhaps, we can move this code [here](https://github.com/edx/edx-platform/blob/jmclaus/disable_hd_control_when_hd_qualities_not_available/common/lib/xmodule/xmodule/js/src/video/03_video_player.js#L74).