Checks the MediaSFU URL and processes the necessary actions based on the URL's validity.

The options for checking and handling the MediaSFU URL.

The data received from the room join response.

The member identifier.

The name of the room to join.

The level of the user.

The socket instance to use for communication.

Additional parameters for pre-join page actions.

The function to join a room on MediaSFU.

A promise that resolves when the actions are complete.

const options = {
data: {
mediasfuURL: "https://example.com/meet/room123/secret",
allowRecord: true,
apiKey: "1234567890123456789012345678901234567890123456789012345678901234",
apiUserName: "user123",
},
member: "user123",
roomName: "s12345678",
islevel: "1",
socket: socketInstance,
parameters: {
someParameter: "value",
},
joinMediaSFURoom: joinRoomOnMediaSFU,
localLink: "https://socketserver.example.com",
};

try {
await checkMediasfuURL(options);
console.log("MediaSFU URL processed successfully.");
} catch (error) {
console.error("Failed to process MediaSFU URL:", error);
}

Constructors

Methods

Constructors

Methods

  • Checks the MediaSFU URL and processes the necessary actions based on the URL's validity.

    Parameters

    Returns Promise<ResponseJoinLocalRoom>

    A promise that resolves when the actions are complete.

    const options = {
    data: {
    mediasfuURL: "https://example.com/meet/room123/secret",
    allowRecord: true,
    apiKey: "1234567890123456789012345678901234567890123456789012345678901234",
    apiUserName: "user123",
    },
    member: "user123",
    roomName: "s12345678",
    islevel: "1",
    socket: socketInstance,
    parameters: {
    someParameter: "value",
    },
    joinMediaSFURoom: joinRoomOnMediaSFU,
    localLink: "https://socketserver.example.com",
    };

    try {
    await checkMediasfuURL(options);
    console.log("MediaSFU URL processed successfully.");
    } catch (error) {
    console.error("Failed to process MediaSFU URL:", error);
    }