const result = await zg.loginRoom(roomID, token, {userID, userName}); const result = await zg.loginRoom(roomID, token, {userID, userName});
const stream = await zg.createStream(source); const stream = await zg.createStream(source);
zg.startPublishingStream(streamID, localStream); zg.startPublishingStream(streamID, localStream);
const remoteStream = await zg.startPlayingStream(streamID); const remoteStream = await zg.startPlayingStream(streamID);
zg.logoutRoom(roomID); zg.logoutRoom(roomID);