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

リリースノート

Windows向けPlanetKit 6.1のリリースノートです。

PlanetKit 6.1

リリース日:2025-08-08

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

  • アプリケーションで定義したユーザータイプを区別できる機能を追加しました。この機能は、アプリケーションが各ユーザータイプごとに動作やUI構成を変更する必要がある場合に使用できます。例えば、一般ユーザーとボットユーザーを区別するのに使用できます。
  • ユーザータイプの値は、1から9999の範囲内で定義して使用できます。
  • 10000以上の値は、LINE Planetが提供するエージェントを区別するのに使用されます。詳しくは、エージェント通話を参照してください。
  • ユーザータイプに関する詳細は、ユーザータイプ設定を参照してください。

API

追加
  • ConferenceParam class Group call
    • bool SetCustomUserType(unsigned int customUserType)
    • unsigned int GetCustomUserType()
  • PlanetKitUserType enum class Group call
    • Undefined = 0
    • AudioCaller = 10000
    • AudioEchoCallee = 10001
    • VideoEchoCallee = 10002
    • MentalHealthCounselor = 10003
    • Reserved01 = 10004
    • Reserved02 = 10005
    • Reserved03 = 10006
    • Reserved04 = 10007
    • Reserved05 = 10008
    • ParticipantInterpreter = 20000
    • ParticipantTranscriber = 20001
    • ParticipantMentalHealthCounselor = 20002
    • ParticipantReserved01 = 20003
    • ParticipantReserved02 = 20004
    • ParticipantReserved03 = 20005
    • ParticipantReserved04 = 20006
    • ParticipantReserved05 = 20007
    • Unknown = 99999
  • UserTypeContainer class Group call
    • PlanetKitUserTypeOptional GetPlanetKitUserType()
    • UIntOptional GetCustomUserType()
    • bool IsPlanetKitUserType() const
  • Peer class Group call
    • UserTypeContainerPtr GetUserType()

サンプルコード

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

    constexpr unsigned int CustomUserTypeRegularUser = 1
    constexpr unsigned int CustomUserTypeBot = 2

    class YourConference {
    public :
    void JoinConference(PlanetKit::UserIdPtr pMyId, PlanetKit::MicPtr) {
    auto pConferenceParam = PlanetKit::ConferenceParam::CreateWithAccessToken(pMyId, L"YourRoomId", L"YourRoomServiceId", L"YourAccessToken");

    // Set other parameters as you needed.
    ...

    bool bResult = pConferenceParam->SetCustomUserType(CustomUserTypeRegularUser);

    auto pMic = PlanetKit::PlanetKitManager::GetInstance()->GetAudioManager()->GetCurrentMic();
    auto sJoinResult = PlanetKit::PlanetKitManager::GetInstance()->JoinConference(pConferenceParam, pMic, m_pConference);
    }

    private :
    PlanetKit::PlanetKitConferencePtr m_pConference;
    }
  • ステップ2:各ユーザータイプに応じて処理するタスクを実装します。

    class YourConferenceEvent : public PlanetKit::IConferenceEvent {
    public :
    void OnPeerListUpdate(PlanetKit::PlanetKitConferencePtr pPlanetKitConference, PlanetKit::ConferencePeerUpdateParamPtr pParam) override {
    auto arrayAddedPeer = pParam->GetAddedPeer();

    for(int idx = 0; idx < arrayAddedPeer.Size(); ++idx) {
    auto pPeer = arrayAddedPeer.At(idx);

    auto pUserTypeContainer = pPeer->GetUserType();

    if(pUserTypeContainer->IsPlanetKitUserType()) {
    // Predefined user types in PlanetKit.
    auto ePlanetKitPredefined = pUserTypeContainer->GetPlanetKitUserType().Value();
    }
    else {
    // Custom user type that you set.
    switch(pUserTypeContainer->GetCustomUserType().Value()) {
    case CustomUserTypeRegularUser :
    // CustomUserTypeRegularUser
    break;

    case CustomUserTypeBot :
    // CustomUserTypeBot
    break;
    }
    }
    }
    }
    };