メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Migrating from 2.x to 3.x - iOS

This guide provides an introduction to the 3.x Programmable Video iOS SDK and a set of guidelines to migrate an application from 2.x to 3.x.

Programming Model

The programming model has not changed from 2.x to 3.x. Refer to our 2.x migration guide for a refresher on the Video iOS SDK models.

Xcode and iOS Version Support

Twilio Video 3.x is built with Xcode 11 and officially adds support for iOS 13 and iPadOS 13 APIs. The framework can be consumed with previous versions of Xcode. However, re-compiling Bitcode when exporting for Ad Hoc or Enterprise distribution requires the use of Xcode 11.x. 3.0 also removes support for iOS 9 and iOS 10, and raises the minimum supported iOS version to 11.0.

If your application's Deployment Target was previously set to iOS 10.3 or earlier, you will need to update it to 11.0 or greater to use the 3.x SDK.

Region Selection

The SDK uses a new WebSocket based signaling transport, and communicates with globally available signaling Servers over IPv4 and IPv6 networks. The TVIConnectOptions.region property has been added which allows you to specify the region of the signaling server. By default, the Client will connect to the nearest signaling Server determined by latency based routing. Setting a value other than "gll" bypasses routing and guarantees that signaling traffic will be terminated in the region that you prefer.

let connectOptions = ConnectOptions(token: accessToken) { (builder) in
    builder.region = "us1"
    builder.roomName = "my-room"
}
self.room = TwilioVideoSDK.connect(with: connectOptions, delegate: self)

If you were previously whitelisting signaling servers by IP address you will now need to whitelist the FQDN for the region that you are connecting to. See the Signaling Communication section of the IP Address Whitelisting guide for more information.

アクセストークン

With this new WebSocket based signaling transport, some modifications may need to be made to the Access Tokens that you generate. Specifically:

  • Ensure that the AccessToken does not contain a configuration profile sid. Configuration profiles were previously deprecated and are no longer supported.
  • Set the Time-To-Live (TTL) of your AccessToken to the maximum allowed session duration, currently 14400 seconds (4 hours). This ensures that when a network loss occurs the client will be able to re-authenticate the reconnection. Note, a reconnection attempt with an expired AccessToken will result in an AccessTokenExpiredError.

TVICameraSource Orientation Tracking Changes

With support for iOS 13, we now have the ability to monitor UIWindowScene based notifications, for determining the orientation of the camera for capture and preview. The TVICameraSourceOrientationTracker protocol has been added and TVICameraSourceOptionsBuilder has a new property, orientationTracker which allows you to adopt this method of tracking.

To opt into tracking based on the rotation of a UIWindowScene you must provide the scene to track when creating the TVICameraSourceOptions.

// Track the orientation of the key window's scene.
let options = CameraSourceOptions { (builder) in
    if let keyScene = UIApplication.shared.keyWindow?.windowScene {
        builder.orientationTracker = UserInterfaceTracker(scene: keyScene)
    }
}
let camera = CameraSource(options: options, delegate: self)

You will also need to forward UIWindowScene events from your UIWindowSceneDelegate to keep TVIUserInterfaceTracker up to date as the scene changes.

// Forward UIWindowScene events
func windowScene(_ windowScene: UIWindowScene,
                 didUpdate previousCoordinateSpace: UICoordinateSpace,
                 interfaceOrientation previousInterfaceOrientation: UIInterfaceOrientation,
                 traitCollection previousTraitCollection: UITraitCollection) {
    UserInterfaceTracker.sceneInterfaceOrientationDidChange(windowScene)
}

Removal of Deprecated Items

The deprecated TVIVideoCapturer APIs have been removed:

  • TVIVideoCapturer
  • TVICameraCapturer
  • TVIScreenCapturer
  • TVIVideoConstraints
  • TVILocalVideoTrack.capturer
  • TVILocalVideoTrack.constraints
  • TVILocalVideoTrack.trackWithCapturer:
  • TVILocalVideoTrack.trackWithCapturer:enabled:constraints:name:

Refer to our Video Source APIs document for more information on working with the Video Source APIs introduced in 2.6.0.

The TVIAudioOptions that are no longer supported by WebRTC have been removed.

  • TVIAudioOptions.levelControl
  • TVIAudioOptions.levelControlInitialPeakLevelDBFS
  • TVIAudioOptionsBuilder.levelControl
  • TVIAudioOptionsBuilder.levelControlInitialPeakLevelDBFS

The TVIAudioSessionActivated() and TVIAudioSessionDeactivated() methods have been removed as the Video SDK no longer needs to terminate the signaling connection when an application is backgrounded.

The TVIVideoRenderer.optionalPixelFormats property has been removed. TVIVideoRenderer is expected to deal with video in any of the valid TVIPixelFormats. If the renderer cannot handle a frame it should drop that frame. There will be no more automatic conversion to I420 for renderers that do not support a particular format.

Improved Objective-C API

In 3.x we have refactored the TVILocalParticipantDelegate and TVIRemoteParticipantDelegate methods to be consistent with the did naming convention used in the Swift APIs. Listed below are the changes to the Objective-C APIs:

TwilioVideoSDK

新規 +[TwilioVideoSDK sdkVersion]
+[TwilioVideo version]

TVILocalParticipantDelegate

新規 -[TVILocalParticipantDelegate localParticipant:didPublishAudioTrack:]
-[TVILocalParticipantDelegate localParticipant:publishedAudioTrack:]
新規 -[TVILocalParticipantDelegate localParticipant:didFailToPublishAudioTrack:withError:]
-[TVILocalParticipantDelegate localParticipant:failedToPublishAudioTrack:withError:]
新規 -[TVILocalParticipantDelegate localParticipant:didPublishDataTrack:]
-[TVILocalParticipantDelegate localParticipant:publishedDataTrack:]
新規 -[TVILocalParticipantDelegate localParticipant:didFailToPublishDataTrack:withError:]
-[TVILocalParticipantDelegate localParticipant:failedToPublishDataTrack:withError:]
新規 -[TVILocalParticipantDelegate localParticipant:didPublishVideoTrack:]
-[TVILocalParticipantDelegate localParticipant:publishedVideoTrack:]
新規 -[TVILocalParticipantDelegate localParticipant:didFailToPublishVideoTrack:withError:]
-[TVILocalParticipantDelegate localParticipant:failedToPublishVideoTrack:withError:]

TVIRemoteParticipantDelegate

新規 -[TVIRemoteParticipantDelegate remoteParticipant:didPublishVideoTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:publishedVideoTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didUnpublishVideoTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:unpublishedVideoTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didPublishAudioTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:publishedAudioTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didUnpublishAudioTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:unpublishedAudioTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didPublishDataTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:publishedDataTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didUnpublishDataTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:unpublishedDataTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didEnableVideoTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:enabledVideoTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didDisableVideoTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:disabledVideoTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didEnableAudioTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:enabledAudioTrack:]
新規 -[TVIRemoteParticipantDelegate remoteParticipant:didDisableAudioTrack:]
-[TVIRemoteParticipantDelegate remoteParticipant:disabledAudioTrack:]
新規 -[TVIRemoteParticipantDelegate didSubscribeToVideoTrack:publication:forParticipant:]
-[TVIRemoteParticipantDelegate subscribedToVideoTrack:publication:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didFailToSubscribeToVideoTrack:error:forParticipant:]
-[TVIRemoteParticipantDelegate failedToSubscribeToVideoTrack:error:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didUnsubscribeFromVideoTrack:publication:forParticipant:]
-[TVIRemoteParticipantDelegate unsubscribedFromVideoTrack:publication:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didSubscribeToAudioTrack:publication:forParticipant:]
-[TVIRemoteParticipantDelegate subscribedToAudioTrack:publication:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didFailToSubscribeToAudioTrack:error:forParticipant:]
-[TVIRemoteParticipantDelegate failedToSubscribeToAudioTrack:error:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didUnsubscribeFromAudioTrack:publication:forParticipant:]
-[TVIRemoteParticipantDelegate unsubscribedFromAudioTrack:publication:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didSubscribeToDataTrack:publication:forParticipant:]
-[TVIRemoteParticipantDelegate subscribedToDataTrack:publication:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didFailToSubscribeToDataTrack:error:forParticipant:]
-[TVIRemoteParticipantDelegate failedToSubscribeToDataTrack:error:forParticipant:]
新規 -[TVIRemoteParticipantDelegate didUnsubscribeFromDataTrack:publication:forParticipant:]
-[TVIRemoteParticipantDelegate unsubscribedFromDataTrack:publication:forParticipant:]

Improved Swift API

In 3.x we have revisited the way the Programmable Video iOS SDK is exposed in Swift to make developing Swift applications more idiomatic. Numerous changes were made across the entire surface area of the SDK which will require modifications in your current project. Among the high level changes:

  • The TVI prefix has been removed from all exposed types.
  • Many of the delegate and class function declarations have been renamed to provide better clarity of their intent.
  • The TwilioVideo class has been renamed to TwilioVideoSDK. This was necessary to allow type clashes to be resolved by qualifying the type name with the module name. For instance, if your application also declares a Room type, it will be necessary to distinguish the SDK's Room type by prefixing it with module name, TwilioVideo.Room. In previous versions of the iOS SDK, this would fail because Swift would recognize that there was a TwilioVideo class and it would attempt to find the Room type declared there. This is a known issue in Swift where type qualification will fail if a module contains a type of the same name.

For example, consider an application, MyApp, that contains its own implementation of a RemoteParticipant class. To differentiate between the RemoteParticipant class from the application and from the SDK, you would prefix the type definition with the module name:

var remoteParticipantFromApp: MyApp.RemoteParticipant?
var remoteParticipantFromSDK: TwilioVideo.RemoteParticipant?

Listed below are the major changes to the Swift APIs:

TwilioVideoSDK

新規 TwilioVideoSDK.Error
TVIError
新規 TwilioVideoSDK.ErrorDomain
kTVIErrorDomain
新規 TwilioVideoSDK.LogLevel
TVILogLevel
新規 TwilioVideoSDK.LogModule
TVILogModule
新規 TwilioVideoSDK.sdkVersion
TwilioVideo.version
新規 class func connect(options: ConnectOptions,
delegate: RoomDelegate?) -> Room
class func connect(with options: TVIConnectOptions,
delegate: TVIRoomDelegate?) -> TVIRoom

AudioDevice

新規 public func AudioDeviceFormatChanged(context: AudioDeviceContext)
public func TVIAudioDeviceFormatChanged(_ context: TVIAudioDeviceContext)
新規 public func AudioDeviceWriteCaptureData(context: AudioDeviceContext,
data: UnsafeMutablePointer<Int8>,
sizeInBytes: Int)
public func TVIAudioDeviceWriteCaptureData(_ context: TVIAudioDeviceContext,
_ data: UnsafeMutablePointer<Int8>,
_ sizeInBytes: Int)
新規 public func AudioDeviceReadRenderData(context: AudioDeviceContext,
data: UnsafeMutablePointer<Int8>,
sizeInBytes: Int)
public func TVIAudioDeviceReadRenderData(_ context: TVIAudioDeviceContext,
_ data: UnsafeMutablePointer<Int8>,
_ sizeInBytes: Int)
新規 public typealias AudioDeviceWorkerBlock = () -> Void
public typealias TVIAudioDeviceWorkerBlock = () -> Void
新規 public func AudioDeviceExecuteWorkerBlock(context: AudioDeviceContext,
block: @escaping AudioDeviceWorkerBlock)
public func TVIAudioDeviceExecuteWorkerBlock(_ context: TVIAudioDeviceContext,
_ block: @escaping TVIAudioDeviceWorkerBlock)

AudioDeviceRenderer

新規 func startRendering(context: AudioDeviceContext) -> Bool
func startRendering(_ context: TVIAudioDeviceContext) -> Bool

AudioDeviceCapturer

新規 func startCapturing(context: AudioDeviceContext) -> Bool
func startCapturing(_ context: TVIAudioDeviceContext) -> Bool

AudioFormat

新規 AudioFormat.SampleRate8000
TVIAudioSampleRate8000
新規 AudioFormat.SampleRate16000
TVIAudioSampleRate16000
新規 AudioFormat.SampleRate24000
TVIAudioSampleRate24000
新規 AudioFormat.SampleRate32000
TVIAudioSampleRate32000
新規 AudioFormat.SampleRate44100
TVIAudioSampleRate44100
新規 AudioFormat.SampleRate48000
TVIAudioSampleRate48000
新規 AudioFormat.ChannelsMono
TVIAudioChannelsMono
新規 AudioFormat.ChannelsStereo
TVIAudioChannelsStereo

AudioOptionsBuilder

新規 AudioOptionsBuilder.Block
TVIAudioOptionsBuilderBlock

CameraSource

新規 CameraSource.ErrorDomain
kTVICameraSourceErrorDomain
新規 CameraSource.Error
TVICameraSourceError
新規 CameraSource.StartedBlock
TVICameraSourceStartedBlock
新規 CameraSource.StoppedBlock
TVICameraSourceStoppedBlock
新規 func startCapture(device: AVCaptureDevice)
func startCapture(with device: AVCaptureDevice)
新規 func startCapture(device: AVCaptureDevice,
completion: CameraSource.StartedBlock? = nil)
func startCapture(with device: AVCaptureDevice,
completion: TVICameraSourceStartedBlock? = nil)
新規 func startCapture(device: AVCaptureDevice,
format: VideoFormat,
completion: CameraSource.StartedBlock? = nil)
func startCapture(with device: AVCaptureDevice,
format: TVIVideoFormat,
completion: TVICameraSourceStartedBlock? = nil)
新規 func selectCaptureDevice(_ device: AVCaptureDevice)
func select(_ device: AVCaptureDevice)
新規 func selectCaptureDevice(_ device: AVCaptureDevice,
completion: CameraSource.StartedBlock? = nil)
func select(_ device: AVCaptureDevice,
completion: TVICameraSourceStartedBlock? = nil)
新規 func selectCaptureDevice(_ device: AVCaptureDevice,
format: VideoFormat,
completion: CameraSource.StartedBlock? = nil)
func select(_ device: AVCaptureDevice,
format: TVIVideoFormat,
completion: TVICameraSourceStartedBlock? = nil)
新規 class func captureDevice(position: AVCaptureDevice.Position) -> AVCaptureDevice?
class func captureDevice(for position: AVCaptureDevice.Position) -> AVCaptureDevice?
新規 class func captureDevice(position: AVCaptureDevice.Position,
deviceType: AVCaptureDevice.DeviceType) -> AVCaptureDevice?
class func captureDevice(for position: AVCaptureDevice.Position,
type deviceType: AVCaptureDevice.DeviceType) -> AVCaptureDevice?
新規 class func supportedFormats(captureDevice: AVCaptureDevice) -> NSOrderedSet
class func supportedFormats(for captureDevice: AVCaptureDevice) -> NSOrderedSet

CameraSourceDelegate

新規 func cameraSourceInterruptionEnded(source: CameraSource)
func cameraSourceInterruptionEnded(_ source: TVICameraSource)
新規 func cameraSourceWasInterrupted(source: CameraSource,
reason: AVCaptureSession.InterruptionReason)
func cameraSourceWasInterrupted(_ source: TVICameraSource,
reason: AVCaptureSession.InterruptionReason)
新規 func cameraSourceDidFail(source: CameraSource,
error: Error)
func cameraSource(_ source: TVICameraSource,
didFailWithError error: Error)

CameraSourceOptionsBuilder

新規 CameraSourceOptionsBuilder.Block
TVICameraSourceOptionsBuilderBlock

ConnectOptionsBuilder

新規 ConnectOptionsBuilder.Block
TVIConnectOptionsBuilderBlock

DataTrackOptions

新規 DataTrackOptions.DefaultMaxPacketLifeTime
kTVIDataTrackOptionsDefaultMaxPacketLifeTime
新規 DataTrackOptions.DefaultMaxRetransmits
kTVIDataTrackOptionsDefaultMaxRetransmits

DataTrackOptionsBuilder

新規 DataTrackOptionsBuilder.Block
TVIDataTrackOptionsBuilderBlock

DefaultAudioDevice

新規 DefaultAudioDevice.IOBufferDurationSimulator
kTVIDefaultAudioDeviceIOBufferDurationSimulator
新規 DefaultAudioDevice.SampleRateSimulator
kTVIDefaultAudioDeviceSampleRateSimulator
新規 DefaultAudioDevice.AVAudioSessionConfigurationBlock
TVIAVAudioSessionConfigurationBlock
新規 DefaultAudioDevice.DefaultAVAudioSessionConfigurationBlock
kDefaultAVAudioSessionConfigurationBlock

IceCandidatePairStats

新規 IceCandidatePairStats.State
TVIIceCandidatePairState

IceOptions

新規 IceOptions.IceTransportPolicy
TVIIceTransportPolicy

IceOptionsBuilder

新規 IceOptionsBuilder.Block
TVIIceOptionsBuilderBlock

IsacCodec

新規 IsacCodec.SampleRate
TVIIsacCodecSampleRate

LocalParticipantDelegate

新規 func localParticipantDidPublishAudioTrack(participant: LocalParticipant,
audioTrackPublication: LocalAudioTrackPublication)
func localParticipant(_ participant: TVILocalParticipant,
publishedAudioTrack: TVILocalAudioTrackPublication)
新規 func localParticipantDidFailToPublishAudioTrack(participant: LocalParticipant,
audioTrack: LocalAudioTrack,
error: Error)
func localParticipant(_ participant: TVILocalParticipant,
failedToPublishAudioTrack audioTrack: TVILocalAudioTrack,
withError error: Error)
新規 func localParticipantDidPublishDataTrack(participant: LocalParticipant,
dataTrackPublication: LocalDataTrackPublication)
func localParticipant(_ participant: TVILocalParticipant,
publishedDataTrack: TVILocalDataTrackPublication)
新規 func localParticipantDidFailToPublishDataTrack(participant: LocalParticipant,
dataTrack: LocalDataTrack,
error: Error)
func localParticipant(_ participant: TVILocalParticipant,
failedToPublishDataTrack dataTrack: TVILocalDataTrack,
withError error: Error)
新規 func localParticipantDidPublishVideoTrack(participant: LocalParticipant,
videoTrackPublication: LocalVideoTrackPublication)
func localParticipant(_ participant: TVILocalParticipant,
publishedVideoTrack: TVILocalVideoTrackPublication)
新規 func localParticipantDidFailToPublishVideoTrack(participant: LocalParticipant,
videoTrack: LocalVideoTrack,
error: Error)
func localParticipant(_ participant: TVILocalParticipant,
failedToPublishVideoTrack videoTrack: TVILocalVideoTrack,
withError error: Error)
新規 func localParticipantNetworkQualityLevelDidChange(participant: LocalParticipant,
networkQualityLevel: NetworkQualityLevel)
func localParticipant(_ participant: TVILocalParticipant,
didChange networkQualityLevel: TVINetworkQualityLevel)

RemoteDataTrackDelegate

新規 func remoteDataTrackDidReceiveString(remoteDataTrack: RemoteDataTrack,
message: String)
func remoteDataTrack(_ remoteDataTrack: TVIRemoteDataTrack,
didReceive message: String)
新規 func remoteDataTrackDidReceiveData(remoteDataTrack: RemoteDataTrack,
message: Data)
func remoteDataTrack(_ remoteDataTrack: TVIRemoteDataTrack,
didReceive message: Data)

RemoteParticipantDelegate

新規 func remoteParticipantDidPublishVideoTrack(participant: RemoteParticipant,
publication: RemoteVideoTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
publishedVideoTrack publication: TVIRemoteVideoTrackPublication)
新規 func remoteParticipantDidUnpublishVideoTrack(participant: RemoteParticipant,
publication: RemoteVideoTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
unpublishedVideoTrack publication: TVIRemoteVideoTrackPublication)
新規 func remoteParticipantDidPublishAudioTrack(participant: RemoteParticipant,
publication: RemoteAudioTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
publishedAudioTrack publication: TVIRemoteAudioTrackPublication)
新規 func remoteParticipantDidUnpublishAudioTrack(participant: RemoteParticipant,
publication: RemoteAudioTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
unpublishedAudioTrack publication: TVIRemoteAudioTrackPublication)
新規 func remoteParticipantDidPublishDataTrack(participant: RemoteParticipant,
publication: RemoteDataTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
publishedDataTrack publication: TVIRemoteDataTrackPublication)
新規 func remoteParticipantDidUnpublishDataTrack(participant: RemoteParticipant,
publication: RemoteDataTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
unpublishedDataTrack publication: TVIRemoteDataTrackPublication)
新規 func remoteParticipantDidEnableVideoTrack(participant: RemoteParticipant,
publication: RemoteVideoTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
enabledVideoTrack publication: TVIRemoteVideoTrackPublication)
新規 func remoteParticipantDidDisableVideoTrack(participant: RemoteParticipant,
publication: RemoteVideoTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
disabledVideoTrack publication: TVIRemoteVideoTrackPublication)
新規 func remoteParticipantDidEnableAudioTrack(participant: RemoteParticipant,
publication: RemoteAudioTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
enabledAudioTrack publication: TVIRemoteAudioTrackPublication)
新規 func remoteParticipantDidDisableAudioTrack(participant: RemoteParticipant,
publication: RemoteAudioTrackPublication)
func remoteParticipant(_ participant: TVIRemoteParticipant,
disabledAudioTrack publication: TVIRemoteAudioTrackPublication)
新規 func didSubscribeToVideoTrack(videoTrack: RemoteVideoTrack,
publication: RemoteVideoTrackPublication,
participant: RemoteParticipant)
func subscribed(to videoTrack: TVIRemoteVideoTrack,
publication: TVIRemoteVideoTrackPublication,
for participant: TVIRemoteParticipant)
新規 func didFailToSubscribeToVideoTrack(publication: RemoteVideoTrackPublication,
error: Error,
participant: RemoteParticipant)
func failedToSubscribe(toVideoTrack publication: TVIRemoteVideoTrackPublication,
error: Error,
for participant: TVIRemoteParticipant)
新規 func didUnsubscribeFromVideoTrack(videoTrack: RemoteVideoTrack,
publication: RemoteVideoTrackPublication,
participant: RemoteParticipant)
func unsubscribed(from videoTrack: TVIRemoteVideoTrack,
publication: TVIRemoteVideoTrackPublication,
for participant: TVIRemoteParticipant)
新規 func didSubscribeToAudioTrack(audioTrack: RemoteAudioTrack,
publication: RemoteAudioTrackPublication,
participant: RemoteParticipant)
func subscribed(to audioTrack: TVIRemoteAudioTrack,
publication: TVIRemoteAudioTrackPublication,
for participant: TVIRemoteParticipant)
新規 func didFailToSubscribeToAudioTrack(publication: RemoteAudioTrackPublication,
error: Error,
participant: RemoteParticipant)
func failedToSubscribe(toAudioTrack publication: TVIRemoteAudioTrackPublication,
error: Error,
for participant: TVIRemoteParticipant)
新規 func didUnsubscribeFromAudioTrack(audioTrack: RemoteAudioTrack,
publication: RemoteAudioTrackPublication,
participant: RemoteParticipant)
func unsubscribed(from audioTrack: TVIRemoteAudioTrack,
publication: TVIRemoteAudioTrackPublication,
for participant: TVIRemoteParticipant)
新規 func didSubscribeToDataTrack(dataTrack: RemoteDataTrack,
publication: RemoteDataTrackPublication,
participant: RemoteParticipant)
func subscribed(to dataTrack: TVIRemoteDataTrack,
publication: TVIRemoteDataTrackPublication,
for participant: TVIRemoteParticipant)
新規 func didFailToSubscribeToDataTrack(publication: RemoteDataTrackPublication,
error: Error,
participant: RemoteParticipant)
func failedToSubscribe(toDataTrack publication: TVIRemoteDataTrackPublication,
error: Error,
for participant: TVIRemoteParticipant)
新規 func didUnsubscribeFromDataTrack(dataTrack: RemoteDataTrack,
publication: RemoteDataTrackPublication,
participant: RemoteParticipant)
func unsubscribed(from dataTrack: TVIRemoteDataTrack,
publication: TVIRemoteDataTrackPublication,
for participant: TVIRemoteParticipant)

Room

新規 Room.State
TVIRoomState
新規 Room.GetStatsBlock
TVIRoomGetStatsBlock
新規 func getRemoteParticipant(sid: String) -> RemoteParticipant?
func getRemoteParticipant(withSid sid: String) -> TVIRemoteParticipant?
新規 func getStats(_ block: @escaping Room.GetStatsBlock)
func getStatsWith(_ block: @escaping TVIRoomGetStatsBlock)

RoomDelegate

新規 func roomDidConnect(room: Room)
func didConnect(to room: TVIRoom)
新規 func roomDidFailToConnect(room: Room,
error: Error)
func room(_ room: TVIRoom,
didFailToConnectWithError error: Error)
新規 func roomDidDisconnect(room: Room,
error: Error?)
func room(_ room: TVIRoom,
didDisconnectWithError error: Error?)
新規 func roomIsReconnecting(room: Room,
error: Error)
func room(_ room: TVIRoom,
isReconnectingWithError error: Error)
新規 func roomDidReconnect(room: Room)
func didReconnect(to room: TVIRoom)
新規 func participantDidConnect(room: Room,
participant: RemoteParticipant)
func room(_ room: TVIRoom,
participantDidConnect participant: TVIRemoteParticipant)
新規 func participantDidDisconnect(room: Room,
participant: RemoteParticipant)
func room(_ room: TVIRoom,
participantDidDisconnect participant: TVIRemoteParticipant)
新規 func roomDidStartRecording(room: Room)
func roomDidStartRecording(_ room: TVIRoom)
新規 func roomDidStopRecording(room: Room)
func roomDidStopRecording(_ room: TVIRoom)
新規 func dominantSpeakerDidChange(room: Room,
participant: RemoteParticipant?)
func room(_ room: TVIRoom,
dominantSpeakerDidChange participant: TVIRemoteParticipant?)

Track

新規 Track.State
TVITrackState

VideoOrientation

新規 VideoOrientation.makeTransform(orientation: VideoOrientation) -> CGAffineTransform
TVIVideoOrientationMakeTransform(_ orientation: TVIVideoOrientation) -> CGAffineTransform
新規 VideoOrientation.isRotated(orientation: VideoOrientation) -> Bool
TVIVideoOrientationIsRotated(_ orientation: TVIVideoOrientation) -> Bool
新規 VideoOrientation.isValid(orientation: VideoOrientation) -> Bool
TVIVideoOrientationIsValid(_ orientation: TVIVideoOrientation) -> Bool

VideoView

新規 VideoView.RenderingType
TVIVideoRenderingType

VideoViewDelegate

新規 func videoViewDidReceiveData(view: VideoView)
func videoViewDidReceiveData(_ view: TVIVideoView)
新規 func videoViewDimensionsDidChange(view: VideoView,
dimensions: CMVideoDimensions)
func videoView(_ view: TVIVideoView,
videoDimensionsDidChange dimensions: CMVideoDimensions)
新規 func videoViewOrientationDidChange(view: VideoView,
dimensions orientation: VideoOrientation)
func videoView(_ view: TVIVideoView,
videoOrientationDidChange orientation: TVIVideoOrientation)
Rate this page:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。