Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched player.tech to tech_, to promote it as private #2590

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/js/control-bar/mute-toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ class MuteToggle extends Button {
this.on(player, 'volumechange', this.update);

// hide mute toggle if the current tech doesn't support volume control
if (player.tech && player.tech['featuresVolumeControl'] === false) {
if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {
this.addClass('vjs-hidden');
}

this.on(player, 'loadstart', function() {
this.update(); // We need to update the button to account for a default muted state.

if (player.tech['featuresVolumeControl'] === false) {
if (player.tech_['featuresVolumeControl'] === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class PlaybackRateMenuButton extends MenuButton {
* @method playbackRateSupported
*/
playbackRateSupported() {
return this.player().tech
&& this.player().tech['featuresPlaybackRate']
return this.player().tech_
&& this.player().tech_['featuresPlaybackRate']
&& this.playbackRates()
&& this.playbackRates().length > 0
;
Expand Down
4 changes: 2 additions & 2 deletions src/js/control-bar/text-track-controls/captions-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CaptionsButton extends TextTrackButton {
super.update();

// if native, then threshold is 1 because no settings button
if (this.player().tech && this.player().tech['featuresNativeTextTracks']) {
if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) {
threshold = 1;
}

Expand All @@ -61,7 +61,7 @@ class CaptionsButton extends TextTrackButton {
createItems() {
let items = [];

if (!(this.player().tech && this.player().tech['featuresNativeTextTracks'])) {
if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) {
items.push(new CaptionSettingsMenuItem(this.player_, { 'kind': this.kind_ }));
}

Expand Down
4 changes: 2 additions & 2 deletions src/js/control-bar/volume-control/volume-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class VolumeControl extends Component {
super(player, options);

// hide volume controls when they're not supported by the current tech
if (player.tech && player.tech['featuresVolumeControl'] === false) {
if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {
this.addClass('vjs-hidden');
}
this.on(player, 'loadstart', function(){
if (player.tech['featuresVolumeControl'] === false) {
if (player.tech_['featuresVolumeControl'] === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
Expand Down
2 changes: 1 addition & 1 deletion src/js/control-bar/volume-menu-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class VolumeMenuButton extends MenuButton {

// hide mute toggle if the current tech doesn't support volume control
function updateVisibility() {
if (player.tech && player.tech['featuresVolumeControl'] === false) {
if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
Expand Down
Loading