Protocols

The following protocols are available globally.

  • Channelイベントデリゲート

    See more

    Declaration

    Objective-C

    @protocol SKWChannelDelegate <NSObject>

    Swift

    protocol ChannelDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol SKWContextDelegate <NSObject>
    @optional
    
    /// SkyWayサーバと再接続開始後にコールされるイベント
    - (void)startReconnecting;
    
    /// SkyWayサーバと再接続成功後にコールされるイベント
    - (void)reconnectingSucceeded;
    
    /// トークンが期限切れにより失効した後にコールされるイベント
    - (void)tokenExpired;
    
    /// トークンの失効が切れる前にコールされるイベント
    ///
    /// このイベントがどの程度前にコールされるかの時間は`ContextOptions`の`token`から設定できます。
    - (void)shouldUpdateToken;
    
    /// SkyWay内部で回復不能なエラーが発生した後にコールされるイベント
    ///
    /// 再度ご利用いただくためには、インターネット接続状況を確認した上で`dispose(completion:)`をコールして完了コールバックを待った後、再度`setup(withToken:options:completion:)`をコールし直してください。
    ///
    /// また、`dispose(completion:)`をコール後はそれまでSDKで生成されたリソースにアクセスしないでください。クラッシュする可能性があります。
    ///
    - (void)fatalErrorOccurred:(NSError* _Nonnull)error;
    
    @end

    Swift

    protocol ContextDelegate : NSObjectProtocol
  • LocalPersonイベントデリゲート

    See more

    Declaration

    Objective-C

    @protocol SKWLocalPersonDelegate <SKWMemberDelegate>

    Swift

    protocol LocalPersonDelegate : MemberDelegate
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol SKWLoggerDelegate <NSObject>
    @optional
    
    /// SkyWay内部で出力したログのハンドラです。
    ///
    /// 出力されるログのレベルは`ContextOptions.logLevel`で設定した値に依存します。
    ///
    /// @param log ログメッセージ
    /// @param level  発生したログのレベル
    - (void)didReceiveLog:(NSString* _Nonnull)log atLevel:(SKWLogLevel)level;
    
    @end

    Swift

    protocol LoggerDelegate : NSObjectProtocol
  • Memberイベントデリゲート

    See more

    Declaration

    Objective-C

    @protocol SKWMemberDelegate <NSObject>

    Swift

    protocol MemberDelegate : NSObjectProtocol
  • Publicationイベントデリゲート

    See more

    Declaration

    Objective-C

    @protocol SKWPublicationDelegate <NSObject>

    Swift

    protocol PublicationDelegate : NSObjectProtocol
  • RemoteDataStreamイベントデリゲート

    See more

    Declaration

    Objective-C

    @protocol SKWRemoteDataStreamDelegate <NSObject>

    Swift

    protocol RemoteDataStreamDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol SKWRemotePersonDelegate <SKWMemberDelegate>
    @optional
    - (void)remotePerson:(SKWRemotePerson* _Nonnull)remotePerson
        didSubscribePublicationOfSubscription:(SKWSubscription* _Nonnull)subscription;
    - (void)remotePerson:(SKWRemotePerson* _Nonnull)remotePerson
        didUnsubscribePublicationOfSubscription:(SKWSubscription* _Nonnull)subscription;
    @end

    Swift

    protocol RemotePersonDelegate : MemberDelegate
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol SKWVideoStreamProtocol <NSObject>
    - (void)attachView:(SKWVideoView* _Nonnull)view;
    - (void)detachView:(SKWVideoView* _Nonnull)view;
    @end

    Swift

    protocol VideoStreamProtocol : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol SKWSubscriptionDelegate <NSObject>
    @optional
    
    /// RoomSubscriptionがUnsubscribeされCanceled状態に変化した後にコールされます。
    /// @param subscription Subscription
    - (void)subscriptionCanceled:(SKWSubscription* _Nonnull)subscription;
    
    /// RoomSubscriptionの接続状態が変化した後にコールされるイベント
    ///
    /// @param subscription Subscription
    /// @param connectionState 接続状態
    - (void)subscription:(SKWSubscription* _Nonnull)subscription
        connectionStateDidChange:(SKWConnectionState)connectionState;
    @end

    Swift

    protocol SubscriptionDelegate : NSObjectProtocol