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

リリースノート

WebPlanetKit 5.4のリリースノートです。

WebPlanetKit 5.4

リリース日:2025-08-11

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

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

API

追加
  • PLANET_KIT_USER_TYPE enum Group call
  • UserTypeContainer class Group call
  • PeerInfo data class Group call
    • var userType: UserTypeContainer
  • ConferenceParams data class Group call
    • var customUserType?: number
  • START_FAIL_REASON enum 1-to-1 callGroup call
    • INVALID_CUSTOM_USER_TYPE: 'invalid_custom_user_type'
    • INTERNAL_INITIALIZATION_ERROR: 'internal_initialization_error'

サンプルコード

  • アプリケーションのユーザータイプを定義し、グループ通話に参加する際に設定します。
const SAMPLE_BOT_TYPE = 100;
const conferenceParams = {
...,
customUserType: SAMPLE_BOT_TYPE
};
planetKit.joinConference(conferenceParams)
.then(() => {
// Successfully joined a conference
})
.catch((joinConferenceError) => {
// If the value of `customUserType` is invalid, joining a conference will fail with the reason code `INVALID_CUSTOM_USER_TYPE`.
});
  • 各ユーザータイプに応じて処理するタスクを実装します。
const onEvtPeerListUpdated = (peerListUpdatedParam) => {
const { addedPeers, removedPeers, totalPeersCount } = peerListUpdatedParam;

addedPeers.forEach((peer) => {
if (peer.userType.getCustomUserType() === SAMPLE_BOT_TYPE) {
console.log("Sample bot has joined.");
}
});

removedPeers.forEach((peer) => {
if (peer.userType.getCustomUserType() === SAMPLE_BOT_TYPE) {
console.log("Sample bot has left.");
}
});
};