setRTMPUrl static method

void setRTMPUrl(
  1. String roomUrl
)

This function is used to get the RTMP URL from the room link

Implementation

static void setRTMPUrl(String roomUrl) {
  if (roomUrl.contains("flutterhms.page.link") &&
      roomUrl.contains("meetingUrl")) {
    roomUrl = roomUrl.split("meetingUrl=")[1];
  }
  List<String> urlSplit = roomUrl.split('/');
  int index = urlSplit.lastIndexOf("meeting");
  if (index != -1) {
    urlSplit[index] = "preview";
  }
  Constant.streamingUrl = "${urlSplit.join('/')}?skip_preview=true";
}