本文にスキップする
Version: 6.1

リリースノート

iOS/macOS向けPlanetKit 6.1のリリースノートです。

PlanetKit 6.1

リリース日:2025-08-08

ユーザータイプのサポート

  • アプリケーションで定義したユーザータイプに対応し、ユーザータイプに応じてアプリの動作やUIをカスタマイズできます(例:一般ユーザーとボットユーザーを区別)。
  • ユーザータイプの値は、1から9999まで設定できます。
  • 10000以上の値は、LINE Planetが提供するエージェントに予約されています。詳しくは、エージェント通話を参照してください。
  • ユーザータイプに関する詳細は、ユーザータイプ設定を参照してください。

API

追加
  • PlanetKitJoinConferenceSettingBuilder class Group call
    • func withCustomUserTypeKey(customUserType: Int) throws -> PlanetKitJoinConferenceSettingBuilder
  • PlanetKitUserType enum Group call
  • PlanetKitUserTypeContainer class Group call
  • PlanetKitConferencePeer class Group call
    • var userType: PlanetKitUserTypeContainer { get }
  • PlanetKitConference class Group call
    • var myCustomUserType: Int? { get }
    • var myCustomUserTypeValue: NSNumber? { get }

サンプルコード

  • ステップ1:アプリケーションのユーザータイプを定義し、グループ通話に参加する際に設定します。

    enum AppUserType: Int {
    case videoBot = 100
    }

    func joinConference(...) {
    ...
    let settings = try! PlanetKitJoinConferenceSettingBuilder()
    ...
    .withCustomUserTypeKey(userType: AppUserType.videoBot.rawValue)
    .build()

    let param = PlanetKitConferenceParam(myUserId: myUserId, roomId: roomId, roomServiceId: serviceId, displayName: displayName, delegate: manageable, accessToken: accessToken)
    ...

    let result = PlanetKitManager.shared.joinConference(param: param, settings: settings)
    ...
    }
  • ステップ2:各ユーザータイプに応じて処理するタスクを実装します。

    extension ConferenceViewController: PlanetKitConferenceDelegate {
    ...
    func peerListDidUpdate(_ conference: PlanetKitConference, updated: PlanetKitConferencePeerListUpdateParam) {
    for peer in updated.addedPeers {
    if peer.userType.customUserType == AppUserType.videoBot.rawValue {
    print("Video bot has joined. ID: \(peer.id.uniqueId)")
    }
    }
    for peer in updated.removedPeers {
    if peer.userType.customUserType == AppUserType.videoBot.rawValue {
    print("Video bot has left. ID: \(peer.id.uniqueId)")
    }
    }
    }
    }