Skip to main content

Room.TryCreateOrUpdateChannel(number channelID, MLAudioChannelPolicy channelPolicy)

Create a channel with the given channel policy if it doesn't exist. Otherwise, updates the channel policy. Changes become active not immediately but when the server executes this operation (approximately RTT/2).

Parameters:

NameTypeDescription
channelIDnumberChannel ID range [0 - 255].
channelPolicyMLAudioChannelPolicyChannel policy to be used for this channel.

Returns:

typeDescription
booleantrue if operation could be sent to the server, otherwise false, also return false if channel policy is null.

Usage

---@type number
local channelID;

---@type MLAudioChannelPolicy
local channelPolicy;


local val0 = Room:TryCreateOrUpdateChannel(channelID, channelPolicy)