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

Added back missing deprecated fullscreen functions and fixed a warning #1488

Merged
merged 1 commit into from
Sep 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/js/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ goog.exportProperty(vjs.Player.prototype, 'preload', vjs.Player.prototype.preloa
goog.exportProperty(vjs.Player.prototype, 'remainingTime', vjs.Player.prototype.remainingTime);
goog.exportProperty(vjs.Player.prototype, 'supportsFullScreen', vjs.Player.prototype.supportsFullScreen);
goog.exportProperty(vjs.Player.prototype, 'currentType', vjs.Player.prototype.currentType);
goog.exportProperty(vjs.Player.prototype, 'requestFullScreen', vjs.Player.prototype.currentType);
goog.exportProperty(vjs.Player.prototype, 'cancelFullScreen', vjs.Player.prototype.currentType);
goog.exportProperty(vjs.Player.prototype, 'isFullScreen', vjs.Player.prototype.currentType);

goog.exportSymbol('videojs.MediaLoader', vjs.MediaLoader);
goog.exportSymbol('videojs.TextTrackDisplay', vjs.TextTrackDisplay);
Expand Down
2 changes: 1 addition & 1 deletion src/js/tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ vjs.TextTrack.prototype.mode = function(){
* and restore it to its normal size when not in fullscreen mode.
*/
vjs.TextTrack.prototype.adjustFontSize = function(){
if (this.player_.isFullScreen()) {
if (this.player_.isFullscreen()) {
// Scale the font by the same factor as increasing the video width to the full screen window width.
// Additionally, multiply that factor by 1.4, which is the default font size for
// the caption track (from the CSS)
Expand Down
5 changes: 5 additions & 0 deletions test/unit/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ test('should be able to access expected player API methods', function() {
ok(player.usingNativeControls, 'usingNativeControls exists');
ok(player.isFullscreen, 'isFullscreen exists');

// Deprecated methods that should still exist
ok(player.requestFullScreen, 'requestFullScreen exists');
ok(player.isFullScreen, 'isFullScreen exists');
ok(player.cancelFullScreen, 'cancelFullScreen exists');

player.dispose();
});

Expand Down
4 changes: 2 additions & 2 deletions test/unit/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ test('should set controls and trigger events', function() {
// var player = PlayerTest.makePlayer();
// player.on('fullscreenchange', function(){
// ok(true, 'fullscreenchange event fired');
// ok(this.isFullScreen() === true, 'isFullScreen is true');
// ok(this.isFullscreen() === true, 'isFullscreen is true');
// ok(this.el().className.indexOf('vjs-fullscreen') !== -1, 'vjs-fullscreen class added');

// player.dispose();
// start();
// });

// player.requestFullScreen();
// player.requestFullscreen();
// });

test('should toggle user the user state between active and inactive', function(){
Expand Down