Sends a message into the channel.
Broadcast a message to all connected clients to a channel.
Arguments to send to channel
Options to be used during the send process
supabase
.channel('room1')
.subscribe((status) => {
if (status === 'SUBSCRIBED') {
channel.send({
type: 'broadcast',
event: 'cursor-pos',
payload: { x: Math.random(), y: Math.random() },
})
}
})
supabase
.channel('room1')
.send({
type: 'broadcast',
event: 'cursor-pos',
payload: { x: Math.random(), y: Math.random()
},
})