Offer speech retry after iOS playback errors
Build and publish frontend / publish (push) Successful in 43s

This commit is contained in:
Ein Anderssono
2026-10-16 00:40:52 +02:00
parent cc17b501cc
commit c5c0fb6b03
3 changed files with 17 additions and 3 deletions
+10
View File
@@ -165,6 +165,16 @@ test('speech start timeout tells the player how to recover when mobile playback
assert.equal(h.synthesis.cancelled, cancelledBeforeRetry);
});
test('iOS not-allowed speech error offers an immediate gesture-based retry', () => {
const h = makeHarness();
h.controller.speak('En replik');
h.utterances[0].onerror({error: 'not-allowed'});
assert.match(h.states.at(-1).message, /Safari blockerade uppläsningen/);
assert.match(h.states.at(-1).message, /Läs senaste repliken/);
assert.equal(h.controller.speak('Försök igen'), true);
assert.equal(h.synthesis.spoken.at(-1).text, 'Försök igen');
});
test('character voice identity gives stable distinct masculine, feminine, and neutral timbres', () => {
const profile = GameVoice.characterVoiceProfile;
const masculine = profile('masculine', 'character-1');