禁用本地视频轨道会导致TwilioVideo崩溃

时间:2018-09-25 16:07:03

标签: ios swift twilio twilio-video

我正在使用TwilioVideo通过互联网拨打电话。基于他们的example project,我能够毫无问题地实现通话。现在,我正在尝试支持禁用视频。

基于示例代码,我希望这可以解决问题:

localVideoTrack?.isEnabled = false

localVideoTrackTVILocalVideoTrack的实例,使用以下方法创建:

let camera = TVICameraCapturer(source: .frontCamera, delegate: self)
localVideoTrack = TVILocalVideoTrack.init(capturer: camera!)

我使用与TVILocalAudioTrack基本上相同的方法来使麦克风静音和取消静音,这就像一种魅力。

但是,有视频时,我打电话给

localVideoTrack?.isEnabled = false

我崩溃了:

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

enter image description here

知道为什么会这样吗?

1 个答案:

答案 0 :(得分:0)

此问题是由2.3.0版中的Twilio Video SDK引入的错误引起的,并已在2.5.1中解决-有关更多详细信息,请参见its GitHub issue

如果遇到相同的问题,并且您使用的版本> = 2.3.0但<= 2.5.0,只需更新为> = 2.5.1