Skip to content

Commit

Permalink
feat(FEC-9056): 10-second fast forward button (#398)
Browse files Browse the repository at this point in the history
https://user-images.githubusercontent.com/17685520/62209957-a58c7e80-b3a3-11e9-8b88-6854647aa73a.png

* add 10-sec FF button and generic FF button for non-10 configured
* reduce time-display padding to 12px in the MEDIUM player (480px-768px)
* increase control-button-container margin to 3px in the X-SMALL/SMALL player (280px-480px)
  • Loading branch information
yairans authored and OrenMe committed Aug 19, 2019
1 parent 29fbeb5 commit fd23f3b
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 17 deletions.
11 changes: 7 additions & 4 deletions src/components/bottom-bar/_bottom-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,24 @@
.left-controls {
display: none;
}
.control-button-container{
.control-button-container {
display: none;
margin: 0;
}
}
&.size-xs {
.control-button-container{
margin: 0 1px;
}
.left-controls {
.control-button-container {
display: none;
}
}
}
&.size-xs,
&.size-sm {
.control-button-container {
margin: 0 3px;
}
}
}


Expand Down
101 changes: 101 additions & 0 deletions src/components/forward/forward.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
//@flow
import style from '../../styles/style.scss';
import {h} from 'preact';
import {Localizer, Text} from 'preact-i18n';
import BaseComponent from '../base';
import {default as Icon, IconType} from '../icon';
import {KeyMap} from '../../utils/key-map';

const COMPONENT_NAME = 'Forward';

/**
* Default forward step
* @type {number}
* @const
*/
export const FORWARD_DEFAULT_STEP = 10;

/**
* Forward component
*
* @class Forward
* @example <Forward player={this.player} step={5} />
* @extends {BaseComponent}
*/
class Forward extends BaseComponent {
/**
* Creates an instance of Forward.
* @param {Object} obj obj
* @memberof Forward
*/
constructor(obj: Object) {
super({name: COMPONENT_NAME, player: obj.player});
}

/**
* forward click handler
*
* @returns {void}
* @memberof Forward
*/
onClick(): void {
this.animate();
let to;
const step = this.props.step || FORWARD_DEFAULT_STEP;
const from = this.player.currentTime;
if (this.player.currentTime + step > this.player.duration) {
to = this.player.duration;
} else {
to = this.player.currentTime + step;
}
this.player.currentTime = to;
this.notifyClick({
from: from,
to: to
});
}

/**
* toggles the animation state to activate the rotate animation
*
* @returns {void}
* @memberof Forward
*/
animate(): void {
this.setState({animation: false});
this.forceUpdate();
this.setState({animation: true});
}

/**
* render component
*
* @param {*} props - component props
* @returns {React$Element} - component element
* @memberof Forward
*/
render(props: any): React$Element<any> | void {
return (
<div className={[style.controlButtonContainer, style.noIdleControl].join(' ')}>
<Localizer>
<button
tabIndex="0"
aria-label={<Text id={'controls.forward'} />}
className={`${style.controlButton} ${this.state.animation ? style.reverseRotate : ''}`}
onClick={() => this.onClick()}
onKeyDown={e => {
if (e.keyCode === KeyMap.ENTER) {
this.onClick();
}
}}>
<Icon type={!props.step || props.step === FORWARD_DEFAULT_STEP ? IconType.Forward10 : IconType.Forward} />
</button>
</Localizer>
</div>
);
}
}

Forward.displayName = COMPONENT_NAME;

export {Forward};
1 change: 1 addition & 0 deletions src/components/forward/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {Forward} from './forward';
12 changes: 8 additions & 4 deletions src/components/icon/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ const IconType = {
Link: 'link',
ArrowDown: 'arrow-down',
StartOver: 'start-over',
SeekForward: 'seek-forward',
SeekEnd: 'seek-end',
Rewind: 'rewind',
Rewind10: 'rewind10',
Forward: 'forward',
Forward10: 'forward10',
vrStereo: 'vr-stereo',
vrStereoFull: 'vr-stereo-full',
Cast: 'cast',
Expand Down Expand Up @@ -149,9 +150,6 @@ class Icon extends Component {
case IconType.StartOver:
return <i className={[style.icon, style.iconStartOver].join(' ')} />;

case IconType.SeekForward:
return <i className={[style.icon, style.iconSeekForward].join(' ')} />;

case IconType.SeekEnd:
return <i className={[style.icon, style.iconSeekEnd].join(' ')} />;

Expand All @@ -161,6 +159,12 @@ class Icon extends Component {
case IconType.Rewind10:
return <i className={[style.icon, style.iconRewind10].join(' ')} />;

case IconType.Forward:
return <i className={[style.icon, style.iconForward].join(' ')} />;

case IconType.Forward10:
return <i className={[style.icon, style.iconForward10].join(' ')} />;

case IconType.vrStereo:
return <i className={[style.icon, style.iconVrStereo].join(' ')} />;

Expand Down
18 changes: 12 additions & 6 deletions src/components/icon/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@
'<path fill="#{$color}" d="M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z" />',
startOver:
'<path fill="#{$color}" d="M255.271 339.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z" />',
seekForward:
'<path fill="#{$color}" opacity="0.5" d="M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z"/><path fill="#{$color}" d="M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z"/>',
seekEnd:
'<path fill="#{$color}" d="M742.494 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z"/>',
rewind:
'<path fill="#{$color}" opacity="0.5" d="M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z"></path><path fill="#{$color}" d="M816.068 431.974c-20.553-78.699-71.369-149.456-147.375-193.338-139.923-80.785-316.040-42.095-410.222 84.418l89.738-4.499c20.299-1.018 37.579 14.613 38.596 34.911s-14.613 37.579-34.911 38.596l-159.799 8.011c-16.335 0.819-31.25-9.242-36.61-24.694l-52.434-151.164c-6.66-19.202 3.506-40.167 22.708-46.828s40.167 3.506 46.828 22.708l27.226 78.49c116.254-155.703 333.248-203.244 505.682-103.69 91.184 52.645 152.976 136.648 179.618 230.523l-69.044 26.555z"></path>',
rewind10:
'<path fill="#{$color}" d="M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z"></path><path fill="#{$color}" d="M413.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM596.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM529.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z"></path>',
forward:
'<path fill="#{$color}" opacity="0.5" d="M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z"></path><path fill="#{$color}" d="M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z"></path>',
forward10:
'<path fill="#{$color}" d="M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z"></path><path fill="#{$color}" d="M365.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM548.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM481.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z"></path>',
vrStereo:
'<path fill="#{$color}" d="M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM128 351.997v384.003c0 17.673 14.327 32 32 32h219.764c11.24 0 21.657-5.898 27.44-15.536l49.917-83.195c5.405-9.008 12.944-16.547 21.952-21.952 30.309-18.185 69.622-8.357 87.807 21.952l49.917 83.195c5.783 9.639 16.199 15.536 27.44 15.536h219.764c17.673 0 32-14.327 32-32v-384.004c0-17.673-14.327-32-32-32h-704c-17.673 0-32 14.327-32 32zM304 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80zM720 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80z"></path>',
vrStereoFull:
Expand Down Expand Up @@ -240,10 +242,6 @@
background-image: icon(startOver, '#fff');
}

.icon-seek-forward {
background-image: icon(seekForward, '#fff');
}

.icon-seek-end {
background-image: icon(seekEnd, '#fff');
}
Expand All @@ -256,6 +254,14 @@
background-image: icon(rewind10, '#fff');
}

.icon-forward {
background-image: icon(forward, '#fff');
}

.icon-forward-10 {
background-image: icon(forward10, '#fff');
}

.icon-vr-stereo {
background-image: icon(vrStereo, '#fff');
}
Expand Down
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export {OverlayPortal} from './overlay-portal';
export {PlayPauseControl} from './play-pause';
export {PrePlaybackPlayOverlay} from './pre-playback-play-overlay';
export {RewindControl} from './rewind';
export {Forward} from './forward';
export {SeekBarControl} from './seekbar';
export {SeekBarLivePlaybackContainer} from './seekbar-live-playback-container';
export {SeekBarPlaybackContainer} from './seekbar-playback-container';
Expand Down
2 changes: 1 addition & 1 deletion src/components/keyboard/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class KeyboardControl extends BaseComponent {
const to = newTime > this.player.duration ? this.player.duration : newTime;
this.logger.debug(`Seek. ${from} => ${to}`);
this.player.currentTime = newTime > this.player.duration ? this.player.duration : newTime;
this.props.updateOverlayActionIcon(IconType.SeekForward);
this.props.updateOverlayActionIcon(IconType.Forward);
this.toggleHoverState();
return {from: from, to: to};
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/picture-in-picture/picture-in-picture.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PictureInPicture extends BaseComponent {
* render component
*
* @returns {React$Element} - component element
* @memberof RewindControl
* @memberof PictureInPicture
*/
render(): React$Element<any> | void {
if (this.props.isPictureInPictureSupported && this.props.playerSize !== PLAYER_SIZE.EXTRA_SMALL) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/rewind/rewind.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RewindControl extends BaseComponent {
*/
render(props: any): React$Element<any> | void {
return (
<div className={[style.controlButtonContainer, style.controlRewind].join(' ')}>
<div className={[style.controlButtonContainer, style.noIdleControl].join(' ')}>
<Localizer>
<button
tabIndex="0"
Expand Down
5 changes: 5 additions & 0 deletions src/components/time-display/_time-display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
}

.player {
&.size-md {
.time-display {
padding: 0 12px;
}
}
&.size-xs,
&.size-sm {
.time-display {
Expand Down
1 change: 1 addition & 0 deletions src/event/event-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const EventType: {[event: string]: string} = {
USER_CLICKED_PLAY: `${namespace}-userclickedplay`,
USER_CLICKED_PAUSE: `${namespace}-userclickedpause`,
USER_CLICKED_REWIND: `${namespace}-userclickedrewind`,
USER_CLICKED_FORWARD: `${namespace}-userclickedforward`,
USER_CLICKED_LIVE_TAG: `${namespace}-userclickedlivetag`,
USER_CLICKED_MUTE: `${namespace}-userclickedmute`,
USER_CLICKED_UNMUTE: `${namespace}-userclickedunmute`,
Expand Down
26 changes: 26 additions & 0 deletions src/event/events/forward-clicked.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// @flow
import {FakeEvent} from '../fake-event';

/**
* ForwardClickedEvent event
*
* @class ForwardClickedEvent
* @extends {FakeEvent}
*/
class ForwardClickedEvent extends FakeEvent {
/**
* @constructor
*
* @param {number} from - The start seek time.
* @param {number} to - The target seek time.
*/
constructor(from: number, to: number) {
super(FakeEvent.Type.USER_CLICKED_FORWARD);
this.payload = {
from: from,
to: to
};
}
}

export {ForwardClickedEvent};
5 changes: 5 additions & 0 deletions src/middlewares/event-dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {SeekedEvent} from '../event/events/seeked-event';
import {SpeedSelectedEvent} from '../event/events/speed-selected-event';
import {UIVisibilityChangedEvent} from '../event/events/ui-visibility-changed-event';
import {RewindClickedEvent} from '../event/events/rewind-clicked';
import {ForwardClickedEvent} from '../event/events/forward-clicked';
import {VolumeChangedEvent} from '../event/events/volume-changed';
import {KeyMap} from '../utils/key-map';

Expand Down Expand Up @@ -122,6 +123,10 @@ function onClickableComponentsHandler(store: any, action: Object, player: Object
player.dispatchEvent(new RewindClickedEvent(action.payload.from, action.payload.to));
break;

case 'Forward':
player.dispatchEvent(new ForwardClickedEvent(action.payload.from, action.payload.to));
break;

case 'LiveTag':
player.dispatchEvent(new FakeEvent(FakeEvent.Type.USER_CLICKED_LIVE_TAG));
break;
Expand Down
59 changes: 59 additions & 0 deletions src/styles/_control-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
&:hover {
opacity: 1;
}

&.control-button-rounded:hover {
background-color: rgba(0, 0, 0, 0.4);
border-radius: 18px;
Expand All @@ -56,13 +57,26 @@
}
}

.player.state-idle {
.no-idle-control {
display: none;
}
}

.rotate {
-moz-animation: spin 0.3s 1 linear;
-o-animation: spin 0.3s 1 linear;
-webkit-animation: spin 0.3s 1 linear;
animation: spin 0.3s 1 linear;
}

.reverse-rotate {
-moz-animation: reverse-spin 0.3s 1 linear;
-o-animation: reverse-spin 0.3s 1 linear;
-webkit-animation: reverse-spin 0.3s 1 linear;
animation: reverse-spin 0.3s 1 linear;
}

@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(359deg);
Expand Down Expand Up @@ -107,3 +121,48 @@
transform: rotate(0deg);
}
}

@-webkit-keyframes reverse-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

@-moz-keyframes reverse-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

@-o-keyframes reverse-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

@-ms-keyframes reverse-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

@keyframes reverse-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

0 comments on commit fd23f3b

Please sign in to comment.