จัดการการประชุมแบบสด

หลังจากเปิดและลงชื่อเข้าใช้แล้ว เราขอแนะนำให้เรียกใช้แอปพลิเคชันการแชร์สด AddonClient.registerMeetingStatusListener() เพื่อฟังสถานะการประชุมที่ดำเนินอยู่

ค่า MeetingStatus ที่ส่งไปยัง MeetingStatusListener.onMeetingStatusChange() จะแจ้งให้แอปการแชร์สดทราบถึงวิธีมีส่วนร่วมกับการแชร์สด

ตัวอย่างโค้ดต่อไปนี้แสดง MeetingStatus ที่เป็นไปได้ของการประชุม

Java

public abstract class MeetingStatus {
  …

  /**
   * Describes the status of the user in Meet.
   *
   * <p>Note: This status is only relevant to the Meet application and meetings. It doesn't mention anything about
   * whether the Live Sharing SDK is connected to the Meet app or is participating in a
   * live sharing session. Hence, it's possible for a status of {@code ADDON_SESSION} but the local
   * user isn't participating.
   */
  public enum Status {
    ADDON_SESSION,
    MEETING,
    NO_MEETING
  }

  …
}

กรณีเหล่านี้ควรจัดการแยกกัน

  • ADDON_SESSION: ผู้ใช้เข้าร่วมการประชุมที่จัดเซสชันการแชร์สดด้วย จำเป็นต้องเชื่อมต่อกับเซสชันการแชร์สดทันที ดูข้อมูลเพิ่มเติมได้ที่ใช้ Co-Watching API หรือใช้ Co-Doing API
  • MEETING: ผู้ใช้เข้าร่วมการประชุม แต่การประชุมดังกล่าวไม่ได้จัดเซสชันการแชร์สด จำเป็นต้องเริ่มเซสชันการแชร์สดเนื่องจากผู้ใช้มีแนวโน้มที่จะเริ่มการแชร์สด
  • NO_MEETING: ผู้ใช้ไม่ได้เข้าร่วมการประชุม จึงไม่จำเป็นต้องเริ่มเซสชันการแชร์สดจนกว่าผู้ใช้จะระบุอย่างชัดเจนว่าต้องการเริ่มเซสชันใหม่