Commit e7e9fb32 by jmclaus

Merge pull request #3447 from edx/jmclaus/bugfix_hd_button_activates_by_itself

Set initial video quality to large instead of default to avoid automatic switch to HD when iframe resizes. [BLD 981]
parents 38378cda 69ed95b4
...@@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes, ...@@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes,
in roughly chronological order, most recent first. Add your entries at or near in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected. the top. Include a label indicating the component affected.
Blades: Set initial video quality to large instead of default to avoid automatic switch to HD when iframe resizes. BLD-981.
Blades: Add an upload button for authors to provide students with an option to Blades: Add an upload button for authors to provide students with an option to
download a handout associated with a video (of arbitrary file format). BLD-1000. download a handout associated with a video (of arbitrary file format). BLD-1000.
......
...@@ -57,6 +57,12 @@ ...@@ -57,6 +57,12 @@
.toEqual(1); .toEqual(1);
}); });
it('initializes with a quality equal to large', function () {
videoPlayer.onPlay();
expect(player.setPlaybackQuality).toHaveBeenCalledWith('large');
});
it('shows the quality control on play if HD is available', it('shows the quality control on play if HD is available',
function () { function () {
videoPlayer.onPlay(); videoPlayer.onPlay();
......
...@@ -104,6 +104,12 @@ function () { ...@@ -104,6 +104,12 @@ function () {
if (this.config.availableHDQualities.length > 0) { if (this.config.availableHDQualities.length > 0) {
this.trigger('videoQualityControl.showQualityControl'); this.trigger('videoQualityControl.showQualityControl');
} }
// On initialization, force the video quality to be 'large' instead of
// 'default'. Otherwise, the player will sometimes switch to HD
// automatically, for example when the iframe resizes itself.
this.trigger('videoPlayer.handlePlaybackQualityChange',
this.videoQualityControl.quality
);
} }
function onQualityChange(value) { function onQualityChange(value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment