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

feat(FEC-8277): Add picture-in-picture support #283

Merged
merged 8 commits into from
Nov 4, 2018
Merged

Conversation

odedhutzler
Copy link
Contributor

@odedhutzler odedhutzler commented Oct 23, 2018

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

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

@odedhutzler odedhutzler self-assigned this Oct 23, 2018
Copy link
Contributor

@OrenMe OrenMe left a 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 {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor

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
Copy link
Contributor Author

@odedhutzler need to listen to enter exit chrome events and change state accordingly

@odedhutzler odedhutzler reopened this Nov 4, 2018
* @class PictureInPicture
* @extends {BaseComponent}
*/
class PictureInPicture extends BaseComponent {
Copy link
Contributor

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} />
Copy link
Contributor

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{
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@odedhutzler odedhutzler merged commit 687426c into master Nov 4, 2018
@odedhutzler odedhutzler deleted the FEC-8277 branch November 4, 2018 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants