-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(FEC-8277): Add picture-in-picture support #283
Conversation
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.
move actual logic to playkit-js and expose as API enterPiP
, exitPiP
. isInPiP
and add events for it like we have for full screen (and please add unit tests).
This component will just use the API methods on player.
+ player API + new icon
* @class PictureInPicture | ||
* @extends {BaseComponent} | ||
*/ | ||
class PictureInPicture extends BaseComponent { |
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.
Don't create the component at all if isPictureInPictureSupported() returns false.
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.
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.
?
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.
@dan-ziv we will use this component rendering like this.
virtual DOM knows to render or not by receiving undefined.
webkitpresentationmode is updated after 'loadedmetadata' event is raised. Checking this after loadedmetadata event is updated.
@odedhutzler need to listen to enter exit chrome events and change state accordingly |
* @class PictureInPicture | ||
* @extends {BaseComponent} | ||
*/ | ||
class PictureInPicture extends BaseComponent { |
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.
?
@@ -59,6 +60,7 @@ export function playbackUI(props: any): React$Element<any> { | |||
<LanguageControl player={props.player} /> | |||
<SettingsControl player={props.player} /> | |||
<CastControl player={props.player} /> | |||
<PictureInPicture player={props.player} /> |
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.
dont create the component if PIP isn't supported
@@ -0,0 +1,4 @@ | |||
.picture-in-picture{ |
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.
place this inside .player
class
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.
fixed
Description of the Changes
added a picture in picture support for chrome (from version 70) + safari.
still pending design. the icon place + design is still pending Hillel design
CheckLists