Podcast voices: an iPhone note on where the other voices live
Safari hands web pages one voice per language, whatever the iPhone has installed, so the picker cannot fix that on iOS. It now carries the way out instead: Accessibility -> Spoken Content -> Voices -> your language, download an Enhanced/Premium voice and make it preferred. The speaker button wears an amber dot while the note is waiting, and the voice-less banner appends the same guidance. Detection covers iPadOS too (maxTouchPoints, since it reports as a Mac). The suite fakes an iPhone user agent, a single Daniel voice and pins the dot and the note's actual steps (37 checks). Version 0.7.5, SW v97.
This commit is contained in:
parent
4ec986da12
commit
9882d775e7
7 changed files with 83 additions and 7 deletions
|
|
@ -229,3 +229,16 @@ export function onlyRoboticVoices(locale: string, voices?: SpeechSynthesisVoice[
|
|||
}
|
||||
|
||||
export const MALE_VOICE_HINTS = MALE_NAMES;
|
||||
|
||||
/**
|
||||
* iPhone/iPad (all iOS browsers are WebKit): Safari hands web pages a single
|
||||
* voice per language — the system's preferred one — no matter how many are
|
||||
* installed, so the picker needs to say where to get a better one.
|
||||
*/
|
||||
export function isAppleMobile(): boolean {
|
||||
if (typeof navigator === "undefined") return false;
|
||||
const ua = navigator.userAgent;
|
||||
if (/iPhone|iPod/.test(ua)) return true;
|
||||
/* iPadOS 13+ reports as a Mac; the touch points give it away. */
|
||||
return /iPad/.test(ua) || (/Macintosh/.test(ua) && navigator.maxTouchPoints > 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue