Skip to content

Commit

Permalink
Merge pull request #3447 from edx/jmclaus/bugfix_hd_button_activates_…
Browse files Browse the repository at this point in the history
…by_itself

Set initial video quality to large instead of default to avoid automatic switch to HD when iframe resizes. [BLD 981]
  • Loading branch information
jmclaus committed Apr 24, 2014
2 parents 38378cd + 69ed95b commit e7e9fb3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
download a handout associated with a video (of arbitrary file format). BLD-1000.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
.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',
function () {
videoPlayer.onPlay();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ function () {
if (this.config.availableHDQualities.length > 0) {
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) {
Expand Down

0 comments on commit e7e9fb3

Please sign in to comment.