mirror of
https://github.com/videojs/video.js.git
synced 2025-04-15 11:56:32 +02:00
Merge pull request #316 from Sundrique/315-fullscreen-icon
315 Fullscreen button CSS rules for webkit and Firefox added
This commit is contained in:
commit
aa0ea90ee2
@ -53,6 +53,7 @@ vjs.Player = function(tag, options, ready){
|
||||
this.on('progress', this.onProgress);
|
||||
this.on('durationchange', this.onDurationChange);
|
||||
this.on('error', this.onError);
|
||||
this.on('fullscreenchange', this.onFullscreenChange);
|
||||
|
||||
// Make player easily findable by ID
|
||||
vjs.players[this.id_] = this;
|
||||
@ -387,6 +388,14 @@ vjs.Player.prototype.onError = function(e) {
|
||||
vjs.log('Video Error', e);
|
||||
};
|
||||
|
||||
vjs.Player.prototype.onFullscreenChange = function(e) {
|
||||
if (this.isFullScreen) {
|
||||
this.addClass('vjs-fullscreen');
|
||||
} else {
|
||||
this.removeClass('vjs-fullscreen');
|
||||
}
|
||||
};
|
||||
|
||||
// /* Player API
|
||||
// ================================================================================ */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user