Webrtc tokbox:Safari上的订户超时错误

Webrtc tokbox:Safari上的订户超时错误,webrtc,opentok,tokbox,Webrtc,Opentok,Tokbox,使用opentok.jsv2,视频频道可以与Chrome和Firefox配合使用。使用的opentok版本来自以下链接: 但它不适用于safari 11.0.3。 在会话的stream created事件上,它生成以下错误消息“由于网络错误,流无法连接。请确保您的连接未被防火墙阻止” 发布服务器已成功发布,即会话。发布(..)工作正常 下面的代码用于进行视频通话: this.session=OT.initSession(this.apiKey,this.sessionId) opentok.j

使用opentok.jsv2,视频频道可以与Chrome和Firefox配合使用。使用的opentok版本来自以下链接:

但它不适用于safari 11.0.3。 在会话的stream created事件上,它生成以下错误消息“由于网络错误,流无法连接。请确保您的连接未被防火墙阻止” 发布服务器已成功发布,即会话。发布(..)工作正常

下面的代码用于进行视频通话:

this.session=OT.initSession(this.apiKey,this.sessionId)

opentok.js在控制台中生成的其他异常如下:

[Error] OT.exception :: title: undefined (1554) msg: OT.Subscriber PeerConnection Error: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
_exceptionHandler (vendor.js:150924)
handleJsException (vendor.js:151002)
onPeerConnectionFailure (vendor.js:162673)
(anonymous function) (vendor.js:162414)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)


[Error] OT_ICE_WORKFLOW_FAILED: ICEWorkflow: Subscriber PeerConnection with connection (not found) failed: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
dispatchOTError (vendor.js:159161)
(anonymous function) (vendor.js:160080)
handleThisOnce (vendor.js:137437)
(anonymous function) (vendor.js:137675)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)



[Error] OT.exception :: title: undefined (1554) msg: ICEWorkflow: Subscriber PeerConnection with connection (not found) failed: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
_exceptionHandler (vendor.js:150924)
handleJsException (vendor.js:151002)
dispatchOTError (vendor.js:159163)
(anonymous function) (vendor.js:160080)
handleThisOnce (vendor.js:137437)
(anonymous function) (vendor.js:137675)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)


以上所有错误仅在Safari浏览器上生成。

您需要确保已在OpenTok帐户门户中创建Safari项目。详情请浏览

看起来您正在使用polyfills.js文件。如果这是包含zone.js的Angular的polyfill,则需要在polyfills.js文件中包含RTPeerConnections“zone.js/dist/WebAPI rtc对等连接”的修复程序

import 'zone.js/dist/webapis-rtc-peer-connection';

您可能还希望包含getUserMedia的polyfill。更多详细信息参见

是的,我已经创建了一个safari项目,并使用safari项目中的apikey。您能告诉我您的应用程序运行的位置,以便我调试它吗?看起来里面有一些多边形填充,我想知道它们是否与本机PeerConnection对象发生了冲突?啊,是的,您使用的是Angular的多边形填充吗?特别是使用zone.js?我想你可能遇到了这个问题,如果是这样的话,你需要像我在这里做的那样在你的polyfills中包含'zone.js/dist/webapi rtc peer connection'文件是的,我打赌就是这样,让我编辑我的原始答案。
import 'zone.js/dist/webapis-rtc-peer-connection';