Lagrange [work/v1.10]

Media: Fixed premature notification about audio playback

=> 1e6003b4de7516031d3cf823c5e0e0fa38457b0b

diff --git a/src/media.c b/src/media.c
index df90fd6f..b9d66dd9 100644
--- a/src/media.c
+++ b/src/media.c
@@ -469,8 +469,9 @@ iBool setData_Media(iMedia *d, iGmLinkId linkId, const iString *mime, const iBlo
             }
             pushBack_PtrArray(&d->items[audio_MediaType], audio);
             /* Start playing right away. */
-            start_Player(audio->player);
-            postCommandf_App("media.player.started player:%p", audio->player);
+            if (start_Player(audio->player)) {
+                postCommandf_App("media.player.started player:%p", audio->player);
+            }
             isNew = iTrue;
 #endif /* LAGRANGE_ENABLE_AUDIO */
         }
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.10/cdiff/1e6003b4de7516031d3cf823c5e0e0fa38457b0b
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
52.141882 milliseconds
Gemini-to-HTML Time
0.184049 milliseconds

This content has been proxied by September (ba2dc).