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

Native controls updates #2499

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
remove techCalls from usingNativeControls method
  • Loading branch information
gkatsev committed Aug 21, 2015
commit 693ae2eb199ecd84805b4f5a261911cc6f445e27
2 changes: 0 additions & 2 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,6 @@ class Player extends Component {
if (bool) {
this.removeTechControlsListeners();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to remove these listeners if they got added, otherwise, it will mess things up.
Our custom controls will show up unnecessarily, and also do weird stuff like prevent the video from playing correctly (#2277)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't hurt as a code comment if you feel like adding it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to re-add the listeners if we swap back to non-native controls?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should also re-add them below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

this.addClass('vjs-using-native-controls');
this.techCall('setControls', true);

/**
* player is using the native device controls
Expand All @@ -1955,7 +1954,6 @@ class Player extends Component {
} else {
this.addTechControlsListeners();
this.removeClass('vjs-using-native-controls');
this.techCall('setControls', false);

/**
* player is using the custom HTML controls
Expand Down