ferrinweb / voice-input-button2

New version of voice input button using new interface of iflytek voice dictation (the stream version). 基于讯飞新版语音听写(流式版) api 的语音输入按钮 vue 组件。
96 stars 16 forks source link

发现源码里面没有动态判断ws还是wss #21

Closed 2410024100 closed 4 years ago

2410024100 commented 4 years ago

connectWebsocket () { const url = 'wss://iat-api.xfyun.cn/v2/iat' 。。。。。。

希望作者加下判断哈。。。测试环境是http。。。正式环境才是https QQ:2410024100

2410024100 commented 4 years ago

var ishttps = 'https:' == location.protocol ? true: false; const url = ishttps?'wss://iat-api.xfyun.cn/v2/iat':'ws://iat-api.xfyun.cn/v2/iat'

到时加了。。。我再拉哈 哈哈

ferrinweb commented 4 years ago

这个需要你自己处理下。