-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
pass non-fs state info up to the player from tech, split fullscreen and fullwindow styles #2357
Changes from 2 commits
51d4e38
77b3195
01b16b1
0b8cb00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -975,7 +975,10 @@ class Player extends Component { | |
* | ||
* @method handleTechFullscreenChange | ||
*/ | ||
handleTechFullscreenChange() { | ||
handleTechFullscreenChange(event, data) { | ||
if (data && data === 'not-fullscreen') { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the conversation below, just a reminder that this should become There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, we should explicitly check for false here. |
||
this.isFullscreen(false); | ||
} | ||
this.trigger('fullscreenchange'); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,7 +321,7 @@ class Html5 extends Tech { | |
if ('webkitDisplayingFullscreen' in video) { | ||
this.one('webkitbeginfullscreen', function() { | ||
this.one('webkitendfullscreen', function() { | ||
this.trigger('fullscreenchange'); | ||
this.trigger('fullscreenchange', 'not-fullscreen'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we said event data should be a hash. So There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have any specific thoughts/concerns on it? I can't really think of a better way. It doesn't require the tech to know about the player, so that's good. I think we need to make sure this event doesn't bubble, and #2351 isn't finished yet. We might be seeing multiple fullscreen events at the player level right now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might want to name the data key There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to balance this, so that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am seeing two There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, I think so. |
||
}); | ||
|
||
this.trigger('fullscreenchange'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can add it for symmetry, but seems to work fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for adding it. I don't really understand why it was working otherwise, but feels better to be consistent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably because the player was still getting the |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the top/bottom/left/right need to be here or can they stay in the non-full-window vjs-fullscreen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess just moving the
position:fixed
will be less invasive; though, it seems like the top/bottom/etc are for the full-window and not really for fullscreen, so, it's more correct to keep them here.However, I tried this out on ios, android, firefox, chrome, safari, IE11, and IE8 and they all work fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess it's position relative otherwise, so that's ok with me.