-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* next/prev hovering poster * mobile controls (play/pause and playlist controls) * countdown
- Loading branch information
Showing
19 changed files
with
541 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.player-gui > .playback-controls { | ||
display: none; | ||
|
||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
margin-top: -32px; | ||
margin-left: -48px; | ||
} | ||
|
||
.player.playlist { | ||
.player-gui > .playback-controls { | ||
margin-left: -144px; | ||
} | ||
} | ||
|
||
.bottom-bar .playback-controls { | ||
display: inline; | ||
} | ||
|
||
.player.size-sm, .player.touch { | ||
|
||
.bottom-bar .playback-controls { | ||
display: none; | ||
} | ||
|
||
&.hover { | ||
.player-gui > .playback-controls { | ||
display: block; | ||
|
||
.control-button { | ||
width: auto; | ||
height: auto; | ||
padding: 0 16px; | ||
} | ||
.icon { | ||
width: 64px; | ||
height: 64px; | ||
} | ||
|
||
.poster-preview { | ||
opacity: 0; | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
export {PlaybackControls} from './playback-controls'; |
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,44 @@ | ||
//@flow | ||
import style from '../../styles/style.scss'; | ||
import {h, Component} from 'preact'; | ||
import {connect} from 'preact-redux'; | ||
import {PlaylistButton} from '../playlist-button'; | ||
import {PlayPauseControl} from '../play-pause'; | ||
|
||
/** | ||
* mapping state to props | ||
* @param {*} state - redux store state | ||
* @returns {Object} - mapped state to this component | ||
*/ | ||
const mapStateToProps = state => ({ | ||
playlist: state.engine.playlist | ||
}); | ||
|
||
@connect(mapStateToProps) | ||
/** | ||
* PlaybackControls component | ||
* | ||
* @class PlaybackControls | ||
* @example <PlaybackControls>...</PlaybackControls> | ||
* @extends {Component} | ||
*/ | ||
class PlaybackControls extends Component { | ||
/** | ||
* render component | ||
* | ||
* @param {*} props - component props | ||
* @returns {React$Element} - component element | ||
* @memberof PlaybackControls | ||
*/ | ||
render(props: any): React$Element<any> { | ||
return ( | ||
<div className={[style.playbackControls]}> | ||
{props.playlist ? <PlaylistButton player={props.player} type="prev" /> : undefined} | ||
<PlayPauseControl player={props.player} /> | ||
{props.playlist ? <PlaylistButton player={props.player} type="next" /> : undefined} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export {PlaybackControls}; |
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
Oops, something went wrong.