import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import Service from '/imports/ui/components/audio/captions/service'; import Button from '/imports/ui/components/common/button/component'; const intlMessages = defineMessages({ start: { id: 'app.audio.captions.button.start', description: 'Start audio captions', }, stop: { id: 'app.audio.captions.button.stop', description: 'Stop audio captions', }, }); const CaptionsButton = ({ intl, active, enabled, }) => { const onClick = () => Service.setAudioCaptions(!active); if (!enabled) return null; return (