mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 17:27:37 -05:00
add system name
This commit is contained in:
@@ -18,9 +18,20 @@ const MediaPlayer = (props) => {
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const parentHandlePlayPause = props.onPlayPause
|
||||
|
||||
const handlePause = () => { setIsPlaying(false); parentHandlePlayPause(false); }
|
||||
const handlePlay = () => { setIsPlaying(true); parentHandlePlayPause(true); }
|
||||
const playPause = () => { const audio = audioRef.current.audioEl.current; if (isPlaying) { audio.pause(); } else { audio.play(); } }
|
||||
const handlePause = () => { setIsPlaying(false); }
|
||||
const handlePlay = () => { setIsPlaying(true); }
|
||||
const playPause = () => {
|
||||
const audio = audioRef.current.audioEl.current;
|
||||
if (isPlaying) {
|
||||
setIsPlaying(false);
|
||||
parentHandlePlayPause(false);
|
||||
audio.pause();
|
||||
} else {
|
||||
setIsPlaying(true);
|
||||
parentHandlePlayPause(true);
|
||||
audio.play();
|
||||
}
|
||||
}
|
||||
|
||||
const call = props.call;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user