Sceenic - WatchTogether
  • Watch Together and Synchronization SDKs
  • Watch together SDK
    • Watch Together SDK overview
    • Authentication overview
    • Tutorials
      • Android
        • Android - Java/Kotlin
      • iOS
        • iOS Swift/Objective-c adapter
      • Web
        • Authentication
        • Create a New Project
        • Adding WT SDK library to the project
        • Installing the NPM package
        • Sample application
          • The conference skeleton
          • Connecting to a Session
          • How to turn on and off video and audio
          • How to change video quality
          • Errors handling
          • Leave the call
        • Support
    • API references
      • Android reference
        • Session
        • SessionListener
        • SessionReconnectListener
        • SessionConnectionListener
        • Participant
          • ParticipantType
        • SessionError
      • iOS Swift reference
        • Session
        • SessionDelegate
        • Participant
        • ParticipantActiveSpeakerDelegate
        • ParticipantDelegate
        • LocalParticipant
        • WTError
        • DataTypes
      • iOS Objective-c adapter reference
        • SessionAdapter
        • SessionAdapterDelegate
        • ParticipantAdapter
        • LocalParticipantAdapter
        • ParticipantAdpaterDelegate
        • ParticipantAdapterActiveSpeakerDelegate
        • NSError
        • DataTypes
      • Web reference
        • WT Session
          • WTSession.connect(sToken, pName, uC, m)
          • WTSession.connectAsAViewer(sToken, pName)
          • WTSession.connectWithSharingScreen(sToken, pName)
          • WTSession.disconnect()
          • WTSession.enableStats()
          • WTSession.sendMessage(msg)
          • WTSession.sendPlayerData(time)
          • async WTSession.getSessionState()
        • SessionListeners
          • WTSessionListeners.onConnected(fn)
          • WTSessionListeners.onDisconnected(fn)
          • WTSessionListeners.onStreamCreated(fn)
          • WTSessionListeners.onLocalStreamCreated(fn)
          • WTSessionListeners.onMosReport(fn)
          • WTSessionListeners.offMosReport(fn)
          • WTSessionListeners.onMessageReceived(fn)
          • WTSessionListeners.onSyncData(fn)
          • WTSessionListeners.onIceDisconnected(fn)
        • Participant
          • setMediaQuality
        • ParticipantListeners
        • ErrorsListeners
        • ReconnectListeners
        • MediaDevices
      • Cluster authentication service reference (CAS)
  • Synchronization SDK
    • Synchronization SDK overview
    • Tutorials
      • Android
        • Android - Java/Kotlin
      • iOS
        • iOS - Swift/Objective-c
      • Web
        • Installing the NPM package
        • Web - TypeScript/React
        • v2.0 Migration Guide
    • API references
      • Android reference
        • SynchSDK
        • SynchListener
      • iOS reference
        • SynchSDK
        • SynchListener
      • Web reference
  • Celebrity SDK
    • Celebrity SDK overview
    • Tutorials
      • Web
        • Installing the NPM package
        • Web - TypeScript/React
    • API References
      • Web reference
  • Chat SDK
    • Chat SDK overview
    • Tutorials
      • Web
        • Installing the NPM package
        • Web - TypeScript/React
    • API Refences
      • Web reference
  • Public Chat SDK
    • Public Chat SDK overview
    • Tutorials
      • Web
        • Installing the NPM package
        • Web - TypeScript/React
    • API Refences
      • Web reference
  • Celebrity Watch Party
    • Web application
    • Android
    • iOS
    • Celebrity View & Fan View
Powered by GitBook
On this page
  • SessionBuilder
  • Field Summary
  • Method Summary
  • Static Method Summary

Was this helpful?

  1. Watch together SDK
  2. API references
  3. iOS Swift reference

Session

SessionBuilder

Return type

Method

Description

Params

init()

The default initializer

SessionBuilder

withUsername(_ username: String) -> SessionBuilder

Specify the username

  • username - a display name

SessionBuilder

withDelegate(_ delegate: SessionDelegate) -> SessionBuilder

Subscribe a delegate for receiving callbacks

  • delegate - an instance for reporting callbacks

SessionBuilder

withCallbackQueue(_ queue: DispatchQueue) -> SessionBuilder

Register a queue for receiving callbacks

  • queue - a dispatch queue for reporting callbacks

SessionBuilder

withVideoCodec(_ codec: VideoCodec) -> SessionBuilder

Specify a video codec type

  • codec - a video codec type

SessionBuilder

withVideoRenderer(_ renderer: VideoRenderer) -> SessionBuilder

Specify a video renderer type

  • renderer - a video renderer type

Session

build() -> Session

Construct a session instance

Field Summary

LocalParticipant

localParticipant

Represents a local user

SessionDelegate?

delegate

An optional delegate for receiving callbacks

DispatchQueue

callbackQueue

A dispatch queue for receiving callbacks. The default queue is the main queue

SessionState

sessionState

Enum with current session state

Method Summary

Return type
Methods
Description
Parameters

void

connect(with token: String)

Connect a session

  • token - authentication token

void

disconnect()

Leave a room and teardown WebRTC session

UIViewController

createLogsViewController()

Return view controller with all Session logs

void

sendMessage(message: String)

sends message to all conference participants

  • message - text to send

void

forceDisconnect(participantId: String, message: String?)

kick partitipant by id from session

  • participantId -selected participant id

  • message - optional supplemental message(kick reason)

Static Method Summary

Return type

Methods

Description

Parameters

void

setMinLogLevel(_ logLevel: WTLogLevel)

Specify a log level

  • logLevel - a level for logs produced

PreviousiOS Swift referenceNextSessionDelegate

Last updated 3 years ago

Was this helpful?