-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
As a web developer, I wish there was a way to feature-detect before calling start(audioTrack) following #118 changes. This is not possible for now, even after calling it.
May I suggest some ideas?
1. Rename start(MediaStreamTrack audioTrack) - bikeshedding is welcome
undefined start();
- undefined start(MediaStreamTrack audioTrack);
+ undefined startWithMediaStreamTrack(MediaStreamTrack audioTrack);if ('startWithMediaStreamTrack' in webkitSpeechRecognition.prototype) {
// MediaStreamTrack is supported by the Web Speech API.
}2. Tie MediaStreamTrack support to other properties
It may be appropriate to assume some of the changes to the Web Speech API will come with MediaStreamTrack support. I'm not sure though which ones yet. Maybe SpeechRecognitionMode mode from #122?
if ('mode' in webkitSpeechRecognition.prototype) {
// MediaStreamTrack is supported by the Web Speech API.
}FYI @evanbliu
Metadata
Metadata
Assignees
Labels
No labels