-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: picture in picture * chore: add docs
- Loading branch information
Showing
17 changed files
with
204 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/griffith/src/components/Controller/items/PipButtonItem.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react' | ||
import {css} from 'aphrodite/no-important' | ||
import {ua} from 'griffith-utils' | ||
import styles from '../styles' | ||
import Icon from '../../Icon' | ||
import * as icons from '../../Icon/icons/controller' | ||
import Tooltip from '../../Tooltip' | ||
import Hover from '../../Hover' | ||
|
||
const {isMobile} = ua | ||
|
||
const PipButtonItem = ({isPip, onClick}) => ( | ||
<Hover className={css(styles.menuContainer)}> | ||
{isPipHovered => ( | ||
<React.Fragment> | ||
<button className={css(styles.button)} onClick={onClick}> | ||
<Icon icon={isPip ? icons.exitPip : icons.pip} /> | ||
</button> | ||
<div | ||
className={css( | ||
styles.pipTooltip, | ||
styles.menu, | ||
isPipHovered && styles.menuShown | ||
)} | ||
> | ||
{!isMobile && ( | ||
<Tooltip content={isPip ? 'action-exit-pip' : 'action-enter-pip'} /> | ||
)} | ||
</div> | ||
</React.Fragment> | ||
)} | ||
</Hover> | ||
) | ||
|
||
export default PipButtonItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/griffith/src/components/Icon/icons/controller/exitPip.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
packages/griffith/src/components/Icon/icons/controller/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export {default as exitPip} from './exitPip' | ||
export {default as fullscreen} from './fullscreen' | ||
export {default as muted} from './muted' | ||
export {default as pause} from './pause' | ||
export {default as pip} from './pip' | ||
export {default as play} from './play' | ||
export {default as smallscreen} from './smallscreen' | ||
export {default as volume} from './volume' |
7 changes: 7 additions & 0 deletions
7
packages/griffith/src/components/Icon/icons/controller/pip.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.