The Twilio Programmable Video SDKs use Semantic Versioning.
Maintenance
armv7
and i386
).Known Issues
armv7
devices. [ISDK-3063]armv7
devices. [ISDK-3064]armv7
devices. [ISDK-3065]TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34This release improves support for local network privacy on iOS 14.0 and iPadOS 14.0. As iOS 14 does not support 32-bit devices, support for the armv7
32 bit processors has been removed from this release.
By default, the SDK no longer uses your local network on iOS 14 and above. Twilio Video balances privacy and performance, blocking communication routes that use your local network inappropriately in Peer-to-Peer Rooms while still ensuring a high rate of direct connections on iOS 14 devices.
If you use Peer-to-Peer Rooms then we recommend that you update your applications to this release in order to prepare for iOS 14. If you need features like multi-party video, network quality or recordings, then use Group Rooms. These Rooms use media servers provided by Twilio that are available on the public internet.
By default, Twilio Video does not access the local network on iOS 14 and above. If you want to allow Twilio Video to use the local network in a Peer-to-Peer Room then you can override the TVILocalNetworkPrivacyPolicy
.
1let connectOptions = TVIConnectOptions(token: accessToken) { (builder) in2// A permissions request may be triggered on iOS 14.3builder.networkPrivacyPolicy = .allowAll4})
If you select TVILocalNetworkPolicyAllowAll
then you must add a privacy usage description with the NSLocalNetworkUsageDescription
key in your application's .plist file.
You can find more information about network privacy in our Getting Started Guide.
Bug Fixes
Maintenance
armv7
and i386
).Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Bug Fixes
TVIPixelFormatYUV420BiPlanarFullRange
or TVIPixelFormatYUV420BiPlanarVideoRange
formats. [ISDK-2631]TVICameraSource
might produce distorted frames after being interrupted with AVCaptureSessionInterruptionReasonVideoDeviceInUseByAnotherClient
on iOS 13.0. #53Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Bug Fixes
TVIVideoSource
, and the source's buffer pool becomes empty.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34This release adds support for publish only Participants (such as a ReplayKit Broadcast Extension) in a Group Room.
Enhancements
TVIConnectOptions.automaticSubscriptionEnabled
to control Track subscription behavior in Group Rooms:
YES
(the default value) causes the Participant to be subscribed to all Tracks that are published in the RoomNO
causes the Participant to be subscribed to none of the Tracks that are published in the RoomNO
has no impact in a Peer-to-Peer Room1let connectOptions = TVIConnectOptions(token: accessToken) { (builder) in2builder.automaticSubscriptionEnabled = true3builder.roomName = "my-room"4}5self.room = TwilioVideo.connect(with: connectOptions, delegate: self)
Bug Fixes
Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34API Changes
TVIConnectOptions.networkQualityEnabled
property to YES
when connecting to a Group Room.TVILocalParticipant.networkQualityLevel
. Note, this will return TVINetworkQualityLevelUnknown
if:
TVIConnectOptions.networkQualityEnabled
property was set to NO
OR[TVILocalParticipantDelegate localParticipant:networkQualityLevelDidChange:]
method on your TVILocalParticipantDelegate
will allow you to receive callbacks when the network quality level changes.1@IBAction func connectToRoom(sender: AnyObject) {2let connectOptions = TVIConnectOptions(token: accessToken) { (builder) in3builder.networkQualityEnabled = true4builder.roomName = "my-room"5}6room = TwilioVideo.connect(with: connectOptions, delegate: self)7}89...1011// MARK: TVILocalParticipantDelegate12func localParticipant(_ participant: TVILocalParticipant, didChange networkQualityLevel: TVINetworkQualityLevel) {1314print("Network Quality Level Changed: \(networkQualityLevel)")15}
Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Bug Fixes
TVILocalVideoTrack
TVICameraSource
, waiting for its completion handler, and then starting a new TVICameraSource
could result in the 2nd source being interrupted.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34API Changes
TVIConnectOptions.dominantSpeakerEnabled
property to YES
when connecting to a Group Room.TVIRoom.dominantSpeaker
property for a TVIRemoteParticipant
. Note, this will return nil
if:
TVIConnectOptions.dominantSpeakerEnabled
property was set to NO
ORTVIRoom.dominantSpeaker
property will return the appropriate TVIRemoteParticipant
.[TVIRoomDelegate room:dominantSpeakerDidChange:]
method on your TVIRoomDelegate
will allow you to receive callbacks when the dominant speaker in a Group Room changes. The dominantSpeakerDidChange:
argument will contain the TVIRemoteParticipant
of the dominant speaker, or nil
if there is no longer a dominant speaker.1@IBAction func connectToRoom(sender: AnyObject) {2let connectOptions = TVIConnectOptions(token: accessToken) { (builder) in3builder.dominantSpeakerEnabled = true4builder.roomName = "my-room"5}6room = TwilioVideo.connect(with: connectOptions, delegate: self)7}89...1011// MARK: TVIRoomDelegate12func room(_ room: TVIRoom, dominantSpeakerDidChange participant: TVIRemoteParticipant?) {13var identity = "N/A"1415if let participant = participant {16identity = participant.identity17}1819print("Dominant Speaker Changed: \(identity)")20}
Bug Fixes
[TVIRoom getStatsWithBlock:]
will execute the provided block if called while TVIRoom.state == TVIRoomStateReconnecting
. [CSDK-2787]Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34API Changes
TVIRoomStateReconnecting
to signify that the Client is attempting to reconnect to the Room due to a network disruption.
TVIRoomStateConnected
, then you may want to update it to include TVIRoomStateReconnecting
.1// Before2func updateStatsDisplay() {3if let room = self.room,4room.state == .connected {5room.getStatsWith { ([TVIStatsReport]) in6// Populate UI with stats report.7}8}9}
1// After2func updateStatsDisplay() {3if let room = self.room,4room.state == .connected || room.state == .reconnecting {5room.getStatsWith { ([TVIStatsReport]) in6// Populate UI with stats report.7}8}9}
TVIRoomDelegate
[TVIRoomDelegate room:isReconnectingWithError:]
- Invoked when the Client experiences a network interruption in signaling or media. The TVIRoom.state
property will transition to TVIRoomStateReconnecting
and the Client will attempt to restore the connection.[TVIRoomDelegate didReconnectToRoom:]
- Invoked after the Client successfully reconnects to the Room. If the reconnection attempts fail, [TVIRoomDelegate room\:didDisconnectWithError:]
is invoked instead.Enhancements
TwilioVideo.framework
is now built with Xcode 10.1.Bug Fixes
Known Issues
[TVIRoom getStatsWithBlock:]
will not execute the provided block if called while TVIRoom.state == TVIRoomStateReconnecting
. [CSDK-2787]TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34API Changes
TVICameraSource.torchLevel
TVICameraSource.torchMode
TVICameraSource.zoomFactor
TVICameraSourceOptions.torchMode
and TVICameraSourceOptions.torchLevel
.TVILocalVideoTrack.source
property to retrieve the TVIVideoSource
used when creating the local video track.Bug Fixes
TVILocalVideoTrack.capturer
and TVILocalVideoTrack.constraints
no longer return nil
when called while the VideoSource
APIs are being used. [ISDK-2331]TVICameraSourceStartedBlock
is now fired when calling [TVICameraSource selectCaptureDevice:completion:]
repeatedly, with the same device. [ISDK-2321]Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34This preview refines the TVICameraSource
APIs, introducing manual orientation, torch and zoom controls. We've also squashed a few bugs with TVIVideoSource
and picked up the latest fixes from the 2.5.6 release.
API Changes
TVICameraSource
if the supplied TVICameraSourceOptions.torchMode
is set to AVCaptureTorchModeOn
. [ISDK-2327][TVICameraSource initWithDelegate:]
method.TVICameraSourceOptions
and TVICameraSourceOptionsBuilder
classes, including options for the torch and camera zoom.[TVICameraSource initWithPreviewEnabled:delegate:]
with [TVICameraSource initWithOptions:delegate:]
, which accepts TVICameraSourceOptions
.TVICameraSourceStartedBlock
now includes a TVIVideoFormat
argument.Enhancements
[TVICameraSource updateVideoOrientation:]
method to enable manual control of orientation tags. #324TVIVideoOrientationIsValid
.TVIConnectOptions
for improved resource management. [ISDK-1943]Bug Fixes
TVIVideoOrientationDown
. [ISDK-2307]TVIVideoSink.sourceRequirements
is populated after calling TVIVideoSink.onFormatRequest()
. [ISDK-2309]TVIAudioSink
from a TVIAudioTrack
.TVICameraSource.init
is now correctly marked as null_unspecified
.TVICameraSourceStartedBlock
is now fired when calling [TVICameraSource selectCaptureDevice:format:completion:]
repeatedly, with different formats.[TVICameraSource supportedFormatsForDevice:]
no longer returns duplicate formats.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVICameraSourceStartedBlock
is not fired when calling [TVICameraSource selectCaptureDevice:completion:]
repeatedly, with the same device. [ISDK-2321]This release introduces new TVIVideoSource
APIs as a replacement for TVIVideoCapturer
. A Source is a producer of video content (such as frames from the Camera), and delivers that content to a Sink.
We have updated ReplayKitExample to use the TVIVideoSource
APIs, and you can try this app today. We will be updating our other examples during the preview period.
As part of this transition we are deprecating the following classes, protocols, and methods:
TVICameraCapturer
TVICameraCapturerDelegate
TVILocalVideoTrack.capturer
TVILocalVideoTrack.constraints
TVILocalVideoTrack.trackWithCapturer:
TVILocalVideoTrack.trackWithCapturer:enabled:constraints:name:
TVIVideoCapturer
TVIVideoCaptureConsumer
TVIVideoConstraints
TVIVideoConstraintsBuilder
The existing TVIVideoCapturer
APIs will continue to function until the next major release of our SDK. The following replacement APIs are now available in this preview:
TVICameraSource
TVICameraSourceDelegate
TVILocalVideoTrack.trackWithSource:
TVILocalVideoTrack.trackWithSource:enabled:name:
TVIVideoSource
TVIVideoSink
Enhancements
TVICameraSource
and [TVIVideoSource requestOutputFormat:]
. For example, you can now stream square 480x480 video for multi-party conferencing scenarios.TVIVideoSource
is used.Bug Fixes
TVIVideoFrame
to produce an I420 buffer (suitable for VP8 and VP9 encoding) no longer stretches the source image.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIVideoOrientationDown
. [ISDK-2307]TVIVideoSink.sourceRequirements
is not populated after calling TVIVideoSink.onFormatRequest()
. [ISDK-2309]Bug Fixes
Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Bug Fixes
TVIVideoView
could display video which was rotated incorrectly on an iPhone XS, iPhone XS Max, or iPhone XR running iOS 12.1. #326Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Enhancements
Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIVideoView
can display video which is rotated incorrectly on an iPhone XS, iPhone XS Max, or iPhone XR running iOS 12.1. #326Enhancements
Bug Fixes
MetalKit.framework
optional so apps consuming TwilioVideo.framework
can be run in an iOS 9.x simulator. #130 [ISDK-2207]TVILocalVideoTrack
using OpenGL renderer. [ISDK-2211]Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Enhancements
TwilioVideo
is now built and distributed as both a dynamic framework, TwilioVideo
, and a static library, libTwilioVideo.a
. The static library is not available as a Carthage or CocoaPods dependency and is only available as a manual download from the Video iOS Releases page.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Bug Fixes
TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34API Changes
TVIScreenCapturer
on iOS 12.0 and above, due to performance issues on some device and UIView
combinations. We recommend that anyone who is interested in sharing their screen use ReplayKit, along with a custom TVIVideoCapturer
instead. We are putting the finishing touches on a new ReplayKit example app. #303Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308Bug Fixes
signaling::PeerConnectionSignaling
processes a close message.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308Enhancements
TwilioVideo.framework
is now built with Xcode 9.4.1.[TVIRoomDelegate room\:didDisconnectWithError:]
callback with the error code TVIErrorRoomRoomCompletedError
.softwareAecEnabled
property to TVIAudioOptions
to use the software acoustic echo cancellation.TwilioVideo.framework
now uses C++14 internally.Bug Fixes
TVIRoom
is destroyed while fetching ICE servers. [CSDK-2499]Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308We have promoted 2.3.0-preview2 to 2.3.0. This release is based on WebRTC 67 and also resolves conflicts when using Twilio Video alongside other WebRTC based dependencies.
Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308Features
TVI
. It is now possible to use the Video SDK side by side with any other Chromium WebRTC based dependency in the same application.API Changes
TVIVideoRenderingType.OpenGLES
on iOS 12.0+ to match Apple's deprecation notice for OpenGLES.framework.Bug Fixes
TVIVideoRenderingType.OpenGLES
renderer doesn't display i420, and y420 frames produced by a TVIVideoCapturer
. [ISDK-2078]TVIIceOptions.iceServersTimeout
to increase reliability.AVAudioSession.inputNumberOfChannels == 0
and TVIDefaultAudioDevice
is used. [ISDK-2143]TVIDefaultAudioDevice
no longer overrides AVAudioSession.preferredInputNumberOfChannels
and AVAudioSession.preferredOutputNumberOfChannels
after executing your block. The default block has also been updated to set channel preferences.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308Enhancements
TVIAVAudioSessionConfigurationBlock
now configures AVAudioSession.preferredIOBufferDuration
to 20 milliseconds by default, to match changes in WebRTC.API Changes
TVIAudioOptions.levelControl
and TVIAudioOptions.levelControlInitialPeakLevelDBFS
properties as they are no longer supported in Chromium WebRTC 67.TVIAudioSink
to a TVIRemoteAudioTrack
.Bug Fixes
[TVIRoom getStatsWithBlock:]
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIVideoRenderingTypeOpenGLES
renderer doesn't display i420, and y420 frames produced by a TVIVideoCapturer
. [ISDK-2078]AVAudioSession.inputNumberOfChannels == 0
and TVIDefaultAudioDevice
is used. [ISDK-2143]UIApplication
APIs from a background thread. [ISDK-2051]TVILocalVideoTrack
published with the H.264 codec. [ISDK-2210] #308Enhancements
TVIVideoViewDelegate
.Bug Fixes
[TVIRoom getStatsWithBlock:]
.TVIIceOptions.iceServersTimeout
to increase reliability.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Improvements
Bug Fixes
[TVIRoomDelegate room\:didDisconnectWithError:]
callbacks by up to 1 second.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34[TVIRoom getStatsWithBlock:]
.Enhancements
TVIRoom
's delegate
property is no longer read only. #13TVIVideoView
, the black frame is rendered synchronously rather than on the next vsync.Bug Fixes
@return
documentation for the [TwilioVideo connectWithOptions:delegate:]
method. #14[TVIVp8Codec isEqual:]
returned YES
when TVIVp8Codec.isSimulcast
did not match.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34[TVIRoom getStatsWithBlock:]
.Enhancements
TwilioVideo.framework
is now built with the Xcode 9.3 toolchain.TVIVideoRenderer
collection in TVIVideoTrack
.TVIVp8Codec
to enable simulcast. Enabling simulcast causes the encoder to generate multiple spatial and temporal layers for the video that is published. Simulcast should only be enabled in a Group Room.TVIVideoView
could be incorrect. #266TVIIceOptions
to control how ICE servers are fetched.
abortOnIceServersTimeout
- Require ICE server fetching to complete, and disallow the use of default STUN servers if the request fails.iceServersTimeout
- A custom timeout to use when fetching ICE servers.Bug Fixes
TVIRemoteDataTrack
and disconnecting from a Room at the same time.PeerConnectionSignaling
teardown.PeerConnectionSignaling
which could cause DTLS roles to be negotiated incorrectly in a multi-party Peer-to-Peer Room.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34Features
TVIVideoView
now uses MTKView
from MetalKit.framework when Metal rendering is selected.Bug Fixes
TVIVideoView
and an internal class named TVIDisplayLinkTimer
when Metal rendering is used.UIView
APIs on a background thread while invalidating a TVIVideoView
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIVideoView
could be incorrect. #266This is our first Generally Available (GA) 2.0 release.
Thank you for the feedback that you've provided on our preview and beta releases. This version includes some minor API changes around TVIVideoFrame
and TVIVideoRenderer
/ TVIVideoView
reuse, but otherwise is very similar to 2.0.0-beta4.
Features
TVIVideoFrame.timestamp
now uses CMTime
instead of int64_t
(in microseconds). We've found that developers writing custom TVIVideoCapturer
s are sometimes confused at having to convert time into microseconds. Furthermore, this conversion can be a destructive operation which causes the original timescale to be lost. For those working with CFTimeInterval
we've also added an initializer which accepts this argument. The following code snippet demonstrates how to modify your capture logic when dealing with a source which produces CMSampleBuffer
s.1// Before2- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {3CMTime presentationTimestamp = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);4int64_t timestamp = (int64_t)(CMTimeGetSeconds( presentationTimestamp ) * INT64_C( 1000000 ));5TVIVideoFrame *frame = [[TVIVideoFrame alloc] initWithTimestamp:timestamp6buffer:CMSampleBufferGetImageBuffer( sampleBuffer )7orientation:TVIVideoOrientationUp];89[_captureConsumer consumeCapturedFrame:frame];10}
1// After2- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {3CMTime timestamp = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);4TVIVideoFrame *frame = [[TVIVideoFrame alloc] initWithTimestamp:timestamp5buffer:CMSampleBufferGetImageBuffer( sampleBuffer )6orientation:TVIVideoOrientationUp];78[_captureConsumer consumeCapturedFrame:frame];9}
TVIVideoFrame
initializers are now marked as nullable
instead of null_unspecified
.invalidateRenderer
method to the TVIVideoRenderer
protocol. This method, if implemented, will be invoked when a TVIVideoRenderer
object is removed from a video track by calling the [TVIVideoTrack removeRenderer:]
method. This method allows the TVIVideoRenderer
to perform any necessary cleanup that is required, for instance when the TVIVideoRender
is to be reused with a different video track.TVIVideoView
implements the invalidateRenderer
protocol method and will now better support reusing the view between different video tracks. #240 Now, when a TVIVideoView
is removed as a renderer for a video track, the following will occur:
hasVideoData
flag is reset. This will allow the [TVIVideoViewDelegate videoViewDidReceiveData:]
method to be fired again when new video data arrives.videoDimensions
, videoOrientation
, viewShouldRotateContent
and mirror
properties are reset to their respective default values.Bug Fixes
TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34UIView
APIs on a background thread while invalidating a TVIVideoView
.Features
framesEncoded
stats field to TVILocalVideoTrackStats
.trackId
from TVIBaseTrackStats
. trackSid
can be used to identify track stats in a TVIStatsReport
.trackId
from TVILocalAudioTrack
, TVILocalDataTrack
, and TVILocalVideoTrack
. trackSid
or name
can be used to identify local tracks.TVIRemoteAudioTrack.sid
, TVIRemoteVideoTrack.sid
and TVIRemoteDataTrack.sid
properties.TVIAudioCodec
enumeration with TVIAudioCodec
, TVIG722Codec
, TVIIsacCodec
, TVIOpusCodec
, TVIPcmaCodec
and TVIPcmuCodec
classes.TVIVideoCodec
enumeration with TVIH264Codec
, TVIVp8Codec
and TVIVp9Codec
classes.Improvements
Bug Fixes
[TVIRoomDelegate room\:didDisconnectWithError:]
was not raised for connected Participants when a Room is completed via the REST API.[TVIRoom hash]
could change between the time a TVIRoom
object is created and when it connects. This issue could cause issues when the TVIRoom
object was stored in a collection.TVIRoom
in bad network conditions.[TVIRoomDelegate room\:didDisconnectWithError:]
was not getting invoked due to a race condition between a network handover and a user initiated [TVIRoom disconnect]
call. #235turns
scheme are now supported. The SDK will now use turns
by default if turn is enabled for your Room.stuns
scheme are now supported.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]Enhancements
TVIAudioSessionActivated()
and TVIAudioSessionDeactivated()
to support backgrounding for custom TVIAudioDevice
s. [ISDK-1842]reconnectAfterReturningToForeground
property from TVIConnectOptions
and TVIConnectOptionsBuilder
. The SDK will continue to support the default behavior of terminating signaling connections when AVAudioSession is inactive and the app is backgrounded.Bug Fixes
TVIDefaultAudioDevice
was not able to play or record audio if the user joins a Room with a bluetooth device. #236TVIAudioDevice
which could occur while invoking TVIAudioDeviceFormatChanged()
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]Enhancements
TVIAudioDeviceExecuteWorkerBlock
executes the supplied block asynchronously.Bug Fixes
TVIAudioDeviceFormatChanged
and TVIAudioDeviceExecuteWorkerBlock
. It should no longer be possible for these functions to access an invalid TVIAudioDeviceContext
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIDefaultAudioDevice
is not able to play or record audio if the user joins a Room with a bluetooth device. #236TVIDefaultAudioDevice
is used in a Room. [ISDK-1842]TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]This release is focused on enabling more advanced audio use cases in Twilio Video. In the past you've been able to use TVIAudioSink
to access raw audio samples from a TVIAudioTrack
. However, these APIs did not allow developers to control the mechanism by which audio is captured and rendered in a Room.
We're now pleased to introduce TVIAudioDevice
. This protocol works in concert with TVIAudioSink
, giving you the ability to replace TVIDefaultAudioDevice
. By implementing the TVIAudioDevice
protocol, you can write your own audio capturer to feed audio samples to the Video SDK and an audio renderer to receive the remote Participant's audio samples. For example, you could integrate with ReplayKit2
and capture application audio for broadcast or play music using AVAssetReader
.
See AudioDeviceExample which uses a custom Audio Device with CoreAudio to play the remote Participant's stereo audio. In the future, we will add more AudioDevices to the repo.
Please note, if you are providing your own custom audio device, it is necessary to support audio capturing in order to create an instance of TVILocalAudioTrack
. Also, if the supplied audio device does not support audio rendering then the you will not be able to receive any audio samples via TVIAudioSink
.
Enhancements
TVIAudioDevice
protocol. As a part of this change we've also added TVIAudioFormat
which describes audio that is being captured and rendered.TwilioVideo.audioDevice
class property, and removed TVIConnectOptions.audioDevice
. You should set your audio device on TwilioVideo
before performing any other actions with the SDK such as creating Tracks or connecting to a Room.TVILocalAudioTrack
and TVILocalDataTrack
now return nullable
instances.Bug Fixes
TVIDefaultAudioDevice
is not able to play or record audio after an AVAudioSessionInterruptionNotification
is triggered. #221Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIDefaultAudioDevice
is not able to play or record audio if the user joins a Room with a bluetooth device. #236TVIDefaultAudioDevice
is used in a Room. [ISDK-1842]TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]Enhancements
Bug Fixes
[TVIRoomDelegate room\:didFailToConnectWithError:]
, [TVIRoomDelegate roomDidStartRecording:]
and [TVIRoomDelegate roomDidStopRecording:]
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIDefaultAudioDevice
is not able to play or record audio if the user joins a Room with a bluetooth device. #236TVIDefaultAudioDevice
is not able to play or record audio after an AVAudioSessionInterruptionNotification
is triggered. #221TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]As of this release we are removing support for iOS 8 and raising our minimum target to iOS 9.0. Twilio Video 1.x releases will continue to support iOS 8.1 and later.
Enhancements
[TVICameraCapturerDelegate cameraCapturerWasInterrupted:reason:]
now uses AVCaptureSessionInterruptionReason
instead of TVICameraCapturerInterruptionReason
.TVIRemoteParticipantDelegate
.
failedToSubscribeToAudioTrack:error:forParticipant:
failedToSubscribeToDataTrack:error:forParticipant:
failedToSubscribeToVideoTrack:error:forParticipant:
TVIAudioController
and adds a new TVIDefaultAudioDevice
class. The TVIDefaultAudioDevice
class allows you to record and playback audio and allows to configure AVAudioSession
when you are connected to a Room.TVIAudioController.startAudio()
and TVIAudioController.stopAudio()
have been removed in favor of a new property called TVIDefaultAudioDevice.enabled
. This property provides developers with a mechanism to enable or disable the activation of the audio device prior to connecting to a Room or to stop or start the audio device while you are already connected to a Room. A Room can now be connected without activating the audio device by setting TVIDefaultAudioDevice.enabled
to NO
and can be enabled during the lifecycle of the Room by setting TVIDefaultAudioDevice.enabled
to YES
. The default value is YES
. This API change was made to ensure full compatibility with CallKit as well as supporting other use cases where developers may need to disable the audio device during a call.TVIDefaultAudioDevice
can be provided to TVIConnectOptions
while connecting to a Room.TVIRoom
has a new property audioDevice
which points to the audio device used by the Room.Examples #1 - Changing the audio route from speaker to receiver in a live call:
1TVIDefaultAudioDevice *audioDevice = [TVIDefaultAudioDevice audioDevice];23//...connect to a Room with audioDevice. By default the audio route will be configured to speaker.45room.audioDevice.block = ^ {6// We will execute `kDefaultAVAudioSessionConfigurationBlock` first.7kDefaultAVAudioSessionConfigurationBlock();89// Overwrite the audio route10AVAudioSession *session = [AVAudioSession sharedInstance];11NSError *error = nil;12if (![session setMode:AVAudioSessionModeVoiceChat error:&error]) {13NSLog(@"AVAudiosession setMode %@",error);14}1516if (![session overrideOutputAudioPort:AVAudioSessionPortOverrideNone error:&error]) {17NSLog(@"AVAudiosession overrideOutputAudioPort %@",error);18}19};20room.audioDevice.block();
Example #2 - Connecting to a Room using the AVAudioSessionCategoryPlayback
category:
1TVIDefaultAudioDevice *audioDevice = [TVIDefaultAudioDevice audioDeviceWithBlock:^ {23// Execute the `kDefaultAVAudioSessionConfigurationBlock` first.4kDefaultAVAudioSessionConfigurationBlock();56// Overwrite the category to `playback`7AVAudioSession *session = [AVAudioSession sharedInstance];8NSError *error = nil;9if (![session setCategory:AVAudioSessionCategoryPlayback10mode:AVAudioSessionModeVideoChat11options:AVAudioSessionCategoryOptionAllowBluetooth12error:&error]) {13NSLog(@"AVAudioSession setCategory:options:mode:error: %@",error);14}15}];1617TVIConnectOptions *connectOptions = [TVIConnectOptions optionsWithToken:token18block:^(TVIConnectOptionsBuilder *builder) {19builder.audioDevice = audioDevice;20}];2122TVIRoom *room = [TwilioVideo connectWithOptions: connectOptions]
TVIIceCandidatePairStats
activeCandidatePair
- indicates if the candidate pair is active.localCandidateIp
- the IP address of the local candidate associated with this candidate pair.remoteCandidateIp
- the IP address of the remote candidate associated with this candidate pair.relayProtocol
- the relay protocolBug Fixes
TVICameraCapturer.init()
is now annotated as null_unspecified
instead of inheriting from NSObject.init()
to match other initializers. [ISDK-1728]TVIRemoteParticipantDelegate
callbacks could be missed leading to [TVIRemoteParticipant unsubscribedFrom*Track:publication:forParticipant:]
events raised when the underlying C++ core track is nullptr
.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIDefaultAudioDevice
is not able to play or record audio if the user joins a Room with a bluetooth device. #236TVIDefaultAudioDevice
is not able to play or record audio after an AVAudioSessionInterruptionNotification
is triggered. #221TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]Enhancements
TwilioVideo.framework
is now built with Xcode 9.1.Bug Fixes
TVIAudioSink
now pre-allocates buffers used on a real-time CoreAudio thread. #104 [ISDK-1412]name
parameter has been removed from the TVILocalDataTrack trackWithOptions:name:
method. Track names can now be provided in the TVIDataTrackOptions
object. [ISDK-1708]TVITrackPublication
s track
property now returns nil
from within the unsubscribedFrom*Track:publication:forParticipant:
callback invocation. [ISDK-1710]Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]Features
TVILocalParticipantDelegate
. [ISDK-1625]
localParticipant:failedToPublishAudioTrack:withError:
localParticipant:failedToPublishDataTrack:withError:
localParticipant:failedToPublishVideoTrack:withError:
Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]TVIAudioSink
should pre-allocate buffers used on a real-time CoreAudio thread. #104 [ISDK-1412]Features
TVIDataTrack
API. A data track represents a unidirectional source that allows sharing
string and binary data with all Participants in a Room. Data tracks function similarly to audio and
video tracks and can be provided via TVIConnectOptions
and published using
[TVILocalParticipant publishDataTrack:]
. Messages sent on the data track are not guaranteed to be
delivered to all the Participants. Data tracks are currently supported in Peer-to-Peer Rooms only.
The following snippets demonstrate how to send and receive messages with data tracks.Creating a TVILocalDataTrack
TVILocalDataTrack *localDataTrack = [TVILocalDataTrack track];
Connecting to a Room
with a TVILocalDataTrack
1TVIConnectOptions *connectOptions = [TVIConnectOptions optionsWithToken:accessToken2block:^(TVIConnectOptionsBuilder *builder) {3builder.dataTracks = @[localDataTrack];4}];56TVIRoom *room = [TwilioVideo connectWithOptions:connectOptions delegate:self];
Publishing a TVILocalDataTrack
1// ... Connected to room2TVILocalParticipant *localParticipant = room.localParticipant;34[localParticipant publishDataTrack:dataTrack];
Observing TVIRemoteDataTrackPublication
and TVIRemoteDataTrack
on TVIRemoteParticipantDelegate
1@interface MyClass : NSObject <TVIRemoteParticipantDelegate>23// Participant has published data track4- (void)remoteParticipant:(nonnull TVIRemoteParticipant *)participant5publishedDataTrack:(nonnull TVIRemoteDataTrackPublication *)publication;678// Participant has unpublished data track9- (void)remoteParticipant:(nonnull TVIRemoteParticipant *)participant10unpublishedDataTrack:(nonnull TVIRemoteDataTrackPublication *)publication;1112// Data track has been subscribed to and messages can be observed.13- (void)subscribedToDataTrack:(nonnull TVIRemoteDataTrack *)dataTrack14publication:(nonnull TVIRemoteDataTrackPublication *)publication15forParticipant:(nonnull TVIRemoteParticipant *)participant;1617// Data track has been unsubsubscribed from and messages cannot be observed.18- (void)unsubscribedFromDataTrack:(nonnull TVIRemoteDataTrack *)dataTrack19publication:(nonnull TVIRemoteDataTrackPublication *)publication20forParticipant:(nonnull TVIRemoteParticipant *)participant;21@end
Sending messages on TVILocalDataTrack
1NSString *message = @"Hello DataTrack!";2[localDataTrack sendString:message];34NSData *messageBuffer = [NSData dataWithBytes:bytes length:length];5[localDataTrack sendData:messageBuffer];
Observing messages from data track
1@interface MyClass : NSObject <TVIRemoteDataTrackDelegate>23- (void)remoteDataTrack:(nonnull TVIRemoteDataTrack *)remoteDataTrack didReceiveString:(nonnull NSString *)message;45- (void)remoteDataTrack:(nonnull TVIRemoteDataTrack *)remoteDataTrack didReceiveData:(nonnull NSData *)message;67@end
Bug Fixes
TVIAudioSink
s added to a TVILocalAudioTrack
now raise callbacks. Audio recording does not start until you join an empty Group Room or a Peer-to-Peer Room with one or more Participants. #104Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]TVIAudioSink
should pre-allocate buffers used on a real-time CoreAudio thread. #104 [ISDK-1412]Features
trackSid
property to TVIBaseTrackStats
.trackId
, ssrc
and codec
properties in TVIBaseTrackStats
are now annotated as nonnull
.Bug Fixes
TVIAudioCodecPCMU
, TVIAudioCodecPCMA
and TVIAudioCodecG722
operate at 64 kbps. Setting a maximum bitrate for these codecs no longer results in a loss of audio and video.TVIAudioCodecISAC
no longer results in a crash.Known Issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]TVIAudioSink
s added to a TVILocalAudioTrack
do not raise any callbacks. #104Bug fixes
VTDecompressionSessionInvalidate
which could occur on iOS 11.0 when receiving H.264 video. [ISDK-1502]Known issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]TVIAudioSink
s added to a TVILocalAudioTrack
do not raise any callbacks. #104TVIAudioCodecPCMU
, TVIAudioCodecPCMA
and TVIAudioCodecG722
operate at 64 kbps. Setting a maximum bitrate for these codecs results in a loss of audio and video.TVIAudioCodecISAC
results in a crash.Bug fixes
Known issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]TVIAudioSink
s added to a TVILocalAudioTrack
do not raise any callbacks. #104TVIAudioCodecPCMU
, TVIAudioCodecPCMA
and TVIAudioCodecG722
operate at 64 kbps. Setting a maximum bitrate for these codecs results in a loss of audio and video.TVIAudioCodecISAC
results in a crash.Our first 2.0 preview release delivers several important features including:
The full list of changes is:
TVIRemoteAudioTrack
and TVIRemoteVideoTrack
. These new classes are derived from TVIAudioTrack
and TVIVideoTrack
respectively. They have following common properties:
sid
- Returns a unique identifier for the Track within the scope of a Room
isSubscribed
- Indicates if the TVILocalParticipant
is receiving audio or video.playbackEnabled
property to TVIRemoteAudioTrack
which allows developers to mute the audio received from a remote Participant.TVIParticipant
into a new class called TVIRemoteParticipant
. TVILocalParticipant
and TVIRemoteParticipant
are now derived from TVIParticipant
.TVIParticipantDelegate
to TVIRemoteParticipantDelegate
and changed the delegate to return TVIRemoteParticipant
, TVIRemoteAudioTrack
, and TVIRemoteVideoTrack
in callbacks.TVIRemoteParticipantDelegate
:
subscribedToAudioTrack:forParticipant:
- Audio will start flowing from a remote Participant's audio Track after receiving this event.unsubscribedFromAudioTrack:forParticipant:
- Audio will stop flowing from a remote Participant's audio Track after receiving this event.subscribedToVideoTrack:forParticipant:
- Video will start flowing from a remote Participant's video Track after receiving this event.unsubscribedFromVideoTrack:forParticipant:
- Video will stop flowing from a remote Participant's video Track after receiving this event.TVITrackStats
to TVIRemoteTrackStats
, TVIAudioTrackStats
to TVIRemoteAudioTrackStats
and TVIVideoTrackStats
to TVIRemoteVideoTrackStats
TVITrackPublication
, TVIAudioTrackPublication
and TVIVideoTrackPublication
which represent the mapping between a Track and its server generated sid
.audioTracks
and videoTracks
getters on TVIParticipant
now return TVITrackPublication
s instead of TVITrack
s.TVILocalAudioTrackPublication
and TVILocalVideoTrackPublication
to represent a published TVILocalAudioTrack
and TVILocalVideoTrack
. Track publication classes are derived from TVIAudioTrackPublication
and TVIVideoTrackPublication
respectively.[TVILocalParticipant addAudioTrack:]
and [TVILocalParticipant addVideoTrack:]
to [TVILocalParticipant publishAudioTrack:]
and [TVILocalParticipant publishVideoTrack:]
.TVILocalParticipantDelegate
which provides the following callbacks:
localParticipant:publishedAudioTrack:
- Invoked when a local audio Track has been published to a Room.localParticipant:publishedVideoTrack:
- Invoked when a local video Track has been published to a Room.localAudioTracks
and localVideoTracks
collections to TVILocalParticipant
. These collections return TVILocalAudioTrackPublication
s and TVILocalVideoTrackPublication
s respectively.name
property to TVITrack
. Names can be assigned to a TVILocalAudioTrack
and TVILocalVideoTrack
using their class factory methods.trackId
property from TVITrack
and moved it into TVILocalAudioTrack
and TVILocalVideoTrack
.TVIAudioCodec
and TVIVideoCodec
as part of the new codec preferences API. Audio and video codec preferences can be set in TVIConnectOptions
.TVIRemoteAudioTrackPublication
and TVIRemoteVideoTrackPublication
to represent a remote Participant's published audio and video Tracks. Track publication classes are derived from TVIAudioTrackPublication
and TVIVideoTrackPublication
respectively.TVIEncodingParameters
which constrains how much bandwidth is used to share audio and video. This object has been added to TVIConnectOptions
and can also be set on TVILocalParticipant
after joining a Room.Bug fixes
[TVIRoom disconnect:]
before [TVIRoomDelegate didConnectToRoom:]
is called and then destroying the TVIRoom
in the [TVIRoomDelegate room\:didDisconnectWithError:]
callback.Known issues
TVILocalAudioTrack
or TVILocalVideoTrack
might not be seen by Participants. #34TVIPixelFormatYUV420PlanarFullRange
or TVIPixelFormatYUV420PlanarVideoRange
. [ISDK-1489]TVIAudioSink
s added to a TVILocalAudioTrack
do not raise any callbacks. #104TVIAudioCodecPCMU
, TVIAudioCodecPCMA
and TVIAudioCodecG722
operate at 64 kbps. Setting a maximum bitrate for these codecs results in a loss of audio and video.TVIAudioCodecISAC
results in a crash.