ios - Disabling local video track causes crash in TwilioVideo
问题描述
I am using TwilioVideo
for calls over the internet. Based on their example project I was able to implement the call without a problem. Now I am trying to support disabling video.
Based on the example code, I expected this would do the trick:
localVideoTrack?.isEnabled = false
Where localVideoTrack
is an instance of TVILocalVideoTrack
created using:
let camera = TVICameraCapturer(source: .frontCamera, delegate: self)
localVideoTrack = TVILocalVideoTrack.init(capturer: camera!)
I used basically the same approach with the TVILocalAudioTrack
to mute and unmute microphone, which works like a charm.
However, with video, when I call:
localVideoTrack?.isEnabled = false
I get a crash:
2018-09-25 17:58:47.270895+0200 App[714:101541] -[TVIRTCI420Buffer coreVideoFrameBuffer]: unrecognized selector sent to instance 0x280d8ce00
2018-09-25 17:58:47.289063+0200 App[714:101541] Encountered an uncaught exception. All Mixpanel instances were archived.
2018-09-25 17:58:47.289128+0200 App[714:101541] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TVIRTCI420Buffer coreVideoFrameBuffer]: unrecognized selector sent to instance 0x280d8ce00'
*** First throw call stack:
(0x18f53bef8 0x18e709a40 0x18f453154 0x18f541810 0x18f5434bc 0x1043b754c 0x1043b6cac 0x1043f4524 0x10460e358 0x10461ed0c 0x104431f58 0x104433d18 0x10443bf24 0x109068de4 0x109070e88 0x109071b7c 0x10907bc18 0x18f1560f0 0x18f158d00)
libc++abi.dylib: terminating with uncaught exception of type NSException
Any idea why this is happening?
解决方案
该问题是由版本 2.3.0 中引入 Twilio Video SDK 的错误引起的,并在 2.5.1 中得到解决 - 有关更多详细信息,请参阅其 GitHub 问题。
如果您遇到同样的问题,并且您的版本 >= 2.3.0 但 <= 2.5.0,只需更新到 >= 2.5.1
推荐阅读
- ios - Facebook Audience Network 框架 SDK 5.3.2 错误
- jquery - 如何修复模态确认ajax后的时间延迟
- python - 如何删除文件夹中除我要保留的一两个文件夹之外的所有内容?
- excel - Excel公式比较两列的颜色并获取具有琥珀色的列的数据
- typescript - chart.js 与 Angular 8 兼容吗?
- java - 即使我在字段中输入了一些数据,EditText 字段也被识别为空,因此程序不会继续进行
- verilog - 我正在尝试在 edaplayground 中制作测试台代码
- laravel - 无法添加外键约束,- laravel
- vim - 从 gvim 命令行突出显示语法
- c# - 当倒计时 Deltatime 达到一定数量时,打印只打印一次(Unity)