Skip to content

Commit baf93b7

Browse files
committed
Ensure listen to article stays hidden until ready.
1 parent fc9c172 commit baf93b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dotcom-rendering/src/components/ListenToArticle.importable.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ export const ListenToArticle = ({ articleId }: Props) => {
1818
getListenToArticleClient().isAvailable(articleId),
1919
getListenToArticleClient().isPlaying(articleId),
2020
])
21-
.then(([isAvailable, isPlaying]) =>
22-
setShowButton(isAvailable && !isPlaying),
21+
.then(() =>
22+
// setShowButton(isAvailable && !isPlaying),
23+
setShowButton(false),
2324
)
2425
.catch((error) => {
2526
console.error(
@@ -35,6 +36,8 @@ export const ListenToArticle = ({ articleId }: Props) => {
3536
void getListenToArticleClient()
3637
.play(articleId)
3738
.then((success: boolean) => {
39+
// hide the audio button once audio is playing until we can
40+
// manage play state syncronisation across the native miniplayer and web layer
3841
success && setShowButton(false);
3942
})
4043
.catch((error: Error) => {

0 commit comments

Comments
 (0)