Xcode 9.0中的opentok流式传输错误:OT.Publisher.onStreamAvailableError

问题描述:

我正在使用opentok在我的Hybrid离子应用程序中进行直播。 我正面临一个问题,我无法看到实时流在ios应用程序,虽然它的工作在我的Android应用程序已经发布在谷歌播放, 现在我需要发布我的iOS应用程序,但我坚持这些错误在Xcode显示我使用Xcode 9.0中的opentok流式传输错误:OT.Publisher.onStreamAvailableError

"ERROR: OT.Publisher.onStreamAvailableError OT_MEDIA_ERR_ABORTED: Argument 1 ('mediaStream') to webkitAudioContext.createMediaStreamSource must be an instance of MediaStream" 

"ERROR: OT.exception :: title: Unable to Publish (1500) msg: GetUserMedia" 

设备是iPhone 6(OS 11.0和Safari 11.0)

我有同样的问题。 对我来说,问题在于OT.initPublisher的发布者选项。 选项“分辨率”是多余的。它只为ios而崩溃,我评论说它现在一切都很好。祝你好运!

+0

你确定你使用** OS 11.0和11.0的Safari ** 我使用它像这样 '出版商= OT.initPublisher(“myPublisher”, pubOptions,功能(错误){ 如果(错误){ 的console.log( “错误”);} 其他{ 的console.log( “出版商初始化。”);} });' –

+0

是,iphone 6+,safari 11. 错误参数'resolution'出现在pubOptions – asmproger

+0

我的pubOptions是var'pubOptions = {publishAudio:true,publishVideo:true};' –

可以使用科尔多瓦OpenTok插件将实时视频添加到您的应用程序离子: https://github.com/opentok/cordova-plugin-opentok/

该插件允许您发布,订阅和使用OpenTok信令API两个iOS和Android。对于离子样品,看看下面的回购:https://github.com/opentok/opentok-ionic-samples