You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of a "utterance" property, iOS WebKit appears to put the utterance into CurrentTarget.
A minor adjustment to code as follows was enough to fix it for me
me.currentContext.utterances.forEach(function (u, index) {
if (index === 0) {
// Note: iOS WebViews (in at least v11.2.6) put the event utterance into currentTarget for some reason.
u.onstart = function (e) {
me.currentContext.currentUtterance = e.utterance || e.currentTarget;
p.done();
me.internalEvents.onPlay();
};
} else {
u.onstart = function (e) {
me.currentContext.currentUtterance = e.utterance || e.currentTarget;
};
}
I'll try to remember to submit a pull request sometime tonight. As far as I can tell, this is the only spot where this matters.
The text was updated successfully, but these errors were encountered:
It appears that the mobile Safari and WebViews on (some?) iOS devices do not provide a SpeechSynthesisEvent that is built in a way that is consistent with the way they are defined at MDN (https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent)
Instead of a "utterance" property, iOS WebKit appears to put the utterance into CurrentTarget.
A minor adjustment to code as follows was enough to fix it for me
Original code
Modified code
I'll try to remember to submit a pull request sometime tonight. As far as I can tell, this is the only spot where this matters.
The text was updated successfully, but these errors were encountered: