PluginProbe
BeyondWords – AI audio for publishers / 7.0.0
BeyondWords – AI audio for publishers v7.0.0
7.1.0 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.7.0 All 43 releases
speechkit / src / editor / components / play-audio / check.js

check.js in BeyondWords – AI audio for publishers 7.0.0, at src/editor/components/play-audio/check.js

17 lines 492 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Internal dependencies
3 */
4 import { useHasPlayAudioAction } from './hooks';
5
6 /**
7 * Renders its children only when the BeyondWords player can load a preview.
8 *
9 * @param {Object} props Component props.
10 * @param {Element} props.children Content to gate behind the play-audio check.
11 *
12 * @return {Element|null} The children when the player can load, else null.
13 */
14 export default function PlayAudioCheck( { children } ) {
15 return useHasPlayAudioAction() ? children : null;
16 }
17