@fortawesome/free-solid-svg-icons APIs
- faTimes
- faCheck
- faTrash
- faCog
- faInfoCircle
- faPlus
- faSearch
- faSpinner
- faArrowLeft
- faCopy
- faChevronDown
- faExclamationTriangle
- faUser
- faEdit
- faBars
- faHome
- faCheckCircle
- faExclamationCircle
- faQuestionCircle
- faPlay
- faTrashAlt
- faArrowRight
- faChevronRight
- faChevronUp
- fas
- faEye
- faSignOutAlt
- faLink
- faPen
- faSync
- faEyeSlash
- faStar
- faChevronLeft
- faLock
- faDownload
- faCaretDown
- faClock
- IconDefinition
- faEllipsisV
- faHeart
- faCode
- faAngleDown
- faTimesCircle
- faGlobe
- faFilter
- faSave
- faBell
- faList
- faSortDown
- faSortUp
- faUsers
- faArrowDown
- faArrowUp
- faPause
- faUndo
- faMoon
- faWindowMaximize
- faSyncAlt
- faExternalLinkAlt
- faAngleUp
- faAngleLeft
- faUpload
- faClipboard
- faBook
- faComments
- faSquare
- faCheckDouble
- faPlusCircle
- faComment
- faRandom
- faStop
- faFolderPlus
- faCamera
- faBan
- faEnvelope
- faGavel
- faPalette
- faPlane
- faTasks
- faPencilAlt
- faExchangeAlt
- faMapMarkerAlt
- faAngleRight
- faSun
- faMicrophone
- faMicrophoneSlash
- faVideo
- faVideoSlash
- faFile
- faLanguage
- faCogs
- faUserEdit
- faUserPlus
- faMinus
- faFolderOpen
- faCircleNotch
- faUserAlt
- faCodeBranch
- faCube
- faLaptopCode
- faMap
- faChartArea
- faHistory
- faShare
- faCloudDownloadAlt
- faFileUpload
- faCalendarAlt
- faLightbulb
- faPaperPlane
- faPaintBrush
- faExclamation
- faAnchor
- faBomb
- faMusic
- faCompress
- faExpand
- faRegistered
- faWifi
- faDrawPolygon
- faPhone
- faCommentDots
- faVolumeUp
- faCaretUp
- faBug
- faUserCircle
- faWallet
- faFileContract
- faTag
- faSearchPlus
- faSort
- faKey
- faVolumeMute
- faPowerOff
- faBolt
- faRedoAlt
- faSortAmountDown
- faCloudUploadAlt
- faShapes
- faSortAmountUp
- faTools
- faFileCode
- faRedo
- faAlignLeft
- faUserFriends
- faBookOpen
- faChartBar
- faFileExport
- faFileImport
- faSadCry
- faRocket
- faLinkSlash
- faTh
- faLongArrowAltRight
- faTags
- faDog
- faTv
- faCartPlus
- faMicrochip
- faNetworkWired
- faCommentSlash
- faAddressBook
- faCalendar
- faToggleOff
- faToggleOn
- faUserClock
- faHourglass
- faQuestion
- faStamp
- faAddressCard
- faPoo
- faAppleAlt
- faBible
- faBone
- faCar
- faCat
- faChess
- faSkull
- faFeatherAlt
- faFire
- faWindowMinimize
- faReplyAll
- faSignInAlt
- faBold
- faItalic
- faUnderline
- faHeading
- faQuoteRight
- faListOl
- faListUl
- faLevelDownAlt
- faLevelUpAlt
- faUndoAlt
- faPlug
- faBullhorn
- faPlaneDeparture
- faSimCard
- faBrush
- faAngleDoubleDown
- faCoins
- faCompressArrowsAlt
- faDiceD6
- faNewspaper
- faMinimize
- faUpRightFromSquare
- faCubes
- faRetweet
- faHandPeace
- faSpaceShuttle
- faXmark
- faFileAudio
- faStopwatch
- faDragon
- faSortNumericDown
- faSortNumericDownAlt
- faArrowUpRightFromSquare
- faArrowDown19
- faArrowDown91
- faHashtag
- faRepeat
- faLaptop
- faCloud
- faPiggyBank
- faRunning
- faBiking
- faBicycle
- faShareAlt
- faRuler
- faVial
- faUserTimes
- faUserMinus
- faCalendarDay
- faStepBackward
- faStepForward
- faDotCircle
- faUserLock
- faUserCog
- faTrophy
- faShareSquare
- faHandPointRight
- faChartLine
- faUserShield
- faCheckSquare
- faSortAmountDownAlt
- faIdCard
- faUserSlash
- faCalculator
- faEllipsisH
- faRulerCombined
- faSoap
- faMousePointer
- faHandRock
- faDroplet
- faThumbtack
- faReply
- faLayerGroup
- faMask
- faWindowRestore
- faThLarge
- faDesktop
- faInfo
- faHandsHelping
- faKeyboard
- faChartPie
- faColumns
- faTable
- faTachometerAlt
- faClipboardList
- faHammer
- faLockOpen
- faCity
- faChessRook
- faMountain
- faCampground
- faUniversity
- faCrosshairs
- faWrench
- faArrowCircleLeft
- faIdCardAlt
- faCreditCard
- faDollarSign
- faIdBadge
- faSlidersH
- faEuroSign
- faPoundSign
- faSearchDollar
- faPlayCircle
- faStream
- faFilm
- faSmile
- faPhoneAlt
- faArrowsAltV
- faUserAltSlash
- faLongArrowAltLeft
- faHdd
- faUnlink
- faInbox
- faMagic
- faImage
- faCalendarCheck
- faUserCheck
- faFolder
- faThermometerEmpty
- faCut
- faPaste
- faCircle
- faMobile
- faClipboardCheck
- faSortAlphaUp
- faSortAlphaDown
- faRss
- faPaw
Other Related APIs
@fortawesome/free-solid-svg-icons#faStop TypeScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faStop.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VoiceLinePlayer.tsx From apps with MIT License | 6 votes |
render() {
const command = this.state.playing ? "Stop" : "Play";
const title = `${command} ${this.props.title}`;
return (
<Button
variant={this.state.playing ? "warning" : "success"}
onClick={this.onClick}
className="voice-line-player-button"
title={title}
>
<FontAwesomeIcon icon={this.state.playing ? faStop : faPlay} />
{this.props.showTitle ? <> {title}</> : null}
</Button>
);
}
Example #2
Source File: AudioPlayer.tsx From frontend.ro with MIT License | 5 votes |
export default function AudioPlayer({ title, src, className } : Props) {
const ref = useRef<HTMLAudioElement>(null);
const [isPlaying, setIsPlaying] = useState(false);
const onPlay = () => { setIsPlaying(true); };
const onPause = () => { setIsPlaying(false); };
const togglePlay = () => {
const { paused } = ref.current;
if (paused) {
ref.current.play();
} else {
ref.current.pause();
}
};
const stop = () => {
ref.current.pause();
ref.current.currentTime = 0;
};
useEffect(() => {
ref.current.addEventListener('play', onPlay);
ref.current.addEventListener('pause', onPause);
return () => {
ref.current.removeEventListener('play', onPlay);
ref.current.removeEventListener('pause', onPause);
};
}, []);
return (
<div className={`${styles['audio-player']} ${className} d-flex align-items-center`}>
<Button onClick={togglePlay} className={styles['play-button']}>
<FontAwesomeIcon icon={isPlaying ? faPause : faPlay} />
</Button>
<Button className={`${styles['stop-button']}${isPlaying ? ` ${styles['stop-button--visible']}` : ''}`} onClick={stop}>
<FontAwesomeIcon icon={faStop} />
</Button>
<p title={title} className="text-white">{title}</p>
{/* eslint-disable-next-line jsx-a11y/media-has-caption */}
<audio ref={ref} src={src} hidden />
</div>
);
}
Example #3
Source File: ControlsView.tsx From livekit-react with Apache License 2.0 | 4 votes |
ControlsView = ({
room,
enableScreenShare,
enableAudio,
enableVideo,
onLeave,
}: ControlsProps) => {
const { cameraPublication: camPub, microphonePublication: micPub } = useParticipant(
room.localParticipant,
);
if (enableScreenShare === undefined) {
enableScreenShare = true;
}
if (enableVideo === undefined) {
enableVideo = true;
}
if (enableAudio === undefined) {
enableAudio = true;
}
const [audioButtonDisabled, setAudioButtonDisabled] = React.useState(false);
let muteButton: ReactElement | undefined;
if (enableAudio) {
const enabled = !(micPub?.isMuted ?? true);
muteButton = (
<AudioSelectButton
isMuted={!enabled}
isButtonDisabled={audioButtonDisabled}
onClick={async () => {
setAudioButtonDisabled(true);
room.localParticipant
.setMicrophoneEnabled(!enabled)
.finally(() => setAudioButtonDisabled(false));
}}
onSourceSelected={(device) => {
setAudioButtonDisabled(true);
room
.switchActiveDevice('audioinput', device.deviceId)
.finally(() => setAudioButtonDisabled(false));
}}
/>
);
}
const [videoButtonDisabled, setVideoButtonDisabled] = React.useState(false);
let videoButton: ReactElement | undefined;
if (enableVideo) {
const enabled = !(camPub?.isMuted ?? true);
videoButton = (
<VideoSelectButton
isEnabled={enabled}
isButtonDisabled={videoButtonDisabled}
onClick={() => {
setVideoButtonDisabled(true);
room.localParticipant
.setCameraEnabled(!enabled)
.finally(() => setVideoButtonDisabled(false));
}}
onSourceSelected={(device) => {
setVideoButtonDisabled(true);
room
.switchActiveDevice('videoinput', device.deviceId)
.finally(() => setVideoButtonDisabled(false));
}}
/>
);
}
const [screenButtonDisabled, setScreenButtonDisabled] = React.useState(false);
let screenButton: ReactElement | undefined;
if (enableScreenShare) {
const enabled = room.localParticipant.isScreenShareEnabled;
screenButton = (
<ControlButton
label={enabled ? 'Stop sharing' : 'Share screen'}
icon={enabled ? faStop : faDesktop}
disabled={screenButtonDisabled}
onClick={() => {
setScreenButtonDisabled(true);
room.localParticipant
.setScreenShareEnabled(!enabled)
.finally(() => setScreenButtonDisabled(false));
}}
/>
);
}
return (
<div className={styles.controlsWrapper}>
{muteButton}
{videoButton}
{screenButton}
{onLeave && (
<ControlButton
label="End"
className={styles.dangerButton}
onClick={() => {
room.disconnect();
onLeave(room);
}}
/>
)}
</div>
);
}