pymeethour


Namepymeethour JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/v-empower/MeetHour-Python-SDK
SummaryMeet Hour is video conferencing solution with End to End Encrypted and many other features such as lobby mode, Donor box & Click&Pledge Connect for fundraising, Video call recording, Youtube Live Stream etc
upload_time2024-09-11 10:27:23
maintainerNone
docs_urlNone
authorMeet Hour
requires_python<4.0,>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MeetHour-Python-SDK

![MeetHour Logo](https://raw.githubusercontent.com/v-empower/MeetHour-Python-SDK/master/logo.png)

[Meet Hour - 100% free video conference solution](https://meethour.io)
Meet Hour is 100% free video conference solution with End to End Encrypted and many other features such as lobby mode, Donor box & Click&Pledge Connect for fundraising, Video call recording, Youtube Live Stream etc.

# Features:

    ✅  Free Unlimited Time Group Video Conference
    ✅  Upto 100 Participants Group Meeting
    ✅  Free Video Conference Recording
    ✅  YouTube Live Stream
    ✅  Raise funds via Click&Pledge Connect & DonorBox
    ✅  Virtual Background
    ✅  Live Pad
    ✅  Screensharing on Desktop & Mobile and many other features.

# Try out one free session -

    1. Website - https://meethour.io
    2. Android - https://bit.ly/2U239ll
    3. iOS - https://apple.co/3k8Rpbn

![ScreenShot](https://raw.githubusercontent.com/v-empower/MeetHour-Python-SDK/master/screenshot.png)

# MeetHour API Documentation

API Documentation Link - https://docs.v-empower.com/docs/MeetHour-API/

## Meet Hour Python Example

```
https://github.com/v-empower/MeetHour-Web-MobileSDKs/tree/master/Web/Python
```

## Installation

Using pip:

`pip install -U pymeethour`

Using [poetry](https://python-poetry.org/):

`poetry add pymeethour`

### API Usage

Provide your credentials in the constructor of Login object and hit the login api to get your access token. Which will further be used for making rest of the api calls.

```
from flask import Flask, render_template_string
from pymeethour.type import LoginType, ScheduleMeetingType, ViewMeetings, GenerateJwtType
from pymeethour.services import apiServices as apiServices

app = Flask(__name__)
app.secret_key = "qwerty"

CLIENT_ID=''
CLIENT_SECRET=''
GRANT_TYPE=''
EMAIL=''
PASSWORD=''
API_KEY=''
API_RELEASE='v2.4.6'
CONFERENCE_URL='meethour.io'

apiservice = apiServices.MHApiService()

@app.route('/', methods=['GET'])
def usage():
    loginBody = LoginType.LoginType(CLIENT_ID, CLIENT_SECRET, GRANT_TYPE, EMAIL, PASSWORD)
    login_response = apiservice.login(loginBody)

    scheduleMeetingBody= ScheduleMeetingType.ScheduleMeeting("Meeting Test", "123456", "10:00", "PM", "23-06-2030", "Asia/Kolkata")
    schedule_meeting_response = apiservice.schedule_meeting(login_response.get('access_token'), scheduleMeetingBody)

    viewMeetingBody = ViewMeetings.ViewMeeting(schedule_meeting_response.get('data').get('meeting_id'))
    view_meetings_response = apiservice.view_meetings(login_response.get('access_token'), viewMeetingBody)

    GenerateJWTBody = GenerateJwtType.GenerateJwt(view_meetings_response.get('meeting').get('meeting_id'))
    generate_response = apiservice.generate_jwt(login_response.get('access_token'), GenerateJWTBody)

    return render_template_string('<script type="text/javascript" src="https://api.meethour.io/libs/{{API_RELEASE}}/external_api.min.js?apiKey={{API_KEY}}"></script><div class="relative" id="conference-parent"></div><script type="text/javascript">try { const conferencePanel = document.createElement("div"); conferencePanel.setAttribute("id", "conference");conferencePanel.setAttribute("style", "height: 100%;");const meetingPanel = document.querySelector("#conference-parent");meetingPanel.appendChild(conferencePanel);var domain = "{{CONFERENCE_URL}}";var options = {roomName: "{{meeting_id}}", parentNode: document.querySelector("#conference"),jwt: "{{jwt_token}}",apiKey: "{{API_KEY}}",pcode: "{{pCode}}",interfaceConfigOverwrite: {applyMeetingSettings: true, disablePrejoinHeader: true,disablePrejoinFooter: true,SHOW_MEET_HOUR_WATERMARK: false,ENABLE_DESKTOP_DEEPLINK: false,HIDE_DEEP_LINKING_LOGO: true,MOBILE_APP_PROMO: false,ENABLE_MOBILE_BROWSER: true,},}; var api = new MeetHourExternalAPI(domain, options); } catch (error) { console.log(error); }</script>',
        meeting_id = view_meetings_response.get('meeting').get('meeting_id'),
        jwt_token=generate_response.get('jwt'),
        pCode=view_meetings_response.get('meeting').get('pcode'),
        API_KEY=API_KEY,
        API_RELEASE=API_RELEASE,
        CONFERENCE_URL=CONFERENCE_URL,
    )
if __name__ == '__main__':
        app.run()

```

### Webhooks Usage ([Documentation](https://docs.v-empower.com/docs/MeetHour-API/l1w139chzqcpp-meethour-webhooks))

```
from pymeethour.webhook import webhooks
import pymeethour.services.apiServices as apiServices

from cryptography.hazmat.primitives import hashes, hmac as CryptoHMAC
from cryptography.hazmat.backends import default_backend

SECRET_KEY = '<Signing secret>' # Available on https://portal.meethour.io/customer/webhooksettings

webhook_handler = webhooks.WebhookHandler(SECRET_KEY)

@app.route('/webhooks', methods=['GET', 'POST'])
def webhooks_start():

        data = request.get_data(as_text=True)

        # For Meet Hour
        response = webhook_handler.handle_request(data, request.headers)

        # Log the incoming data using WebhookHandler's log_data method
        webhook_handler.log_data(request)

        session['meethour_webhook'] = response

        # Print server response (optional)
        print(f"Server response: {response}")
        return json.dumps(response), 200

```

### API End Points Supported

Important points:
=> Instead of '{version}', you to pass our latest version whenever you call the given functions. Currently we are using v1.2 Same version applies to the below calls.
=> In the token section, you need to pass the received access token which is received when login api is hit, for making further api calls.
=> You can make API calls by passing required properties in the constructor. But, to meet special requirements you can set rest of the properties directly, according to your need. For more details go to https://docs.v-empower.com/docs/MeetHour-API then click on APIS section to get all the information related to each api call.

1. To Get Access Token Endpoint : => https://docs.v-empower.com/docs/MeetHour-API/a44a7d7669f91-user-login-get-access-token

   ```
        from meethour.type import LoginType
        apiservice = apiServices.MHApiService()

        loginBody = LoginType.LoginType('CLIENT_ID', 'CLIENT_SECRET', 'GRANT_TYPE', 'EMAIL', 'PASSWORD') # pass values
        login_response = apiservice.login(loginBody)
        print(login_response)

   ```

   => You have to pass respective values in the argument section. Hence, to get desired response.

2. To schedule a meeting: => https://docs.v-empower.com/docs/MeetHour-API/2de4b757a6312-meeting-schedule-meeting

   ```
        from meethour.type import ScheduleMeetingType
        apiservice = apiServices.MHApiService()

        scheduleMeetingBody= ScheduleMeetingType.("Meeting Test", "123456", "10:00", "PM", "23-06-2030", "Asia/Kolkata")
        schedule_meeting_response = apiservice.schedule_meeting(token, scheduleMeetingBody)
        print(schedule_meeting_response)

   ```

3. To Generate JWT Token Endpoint => https://docs.v-empower.com/docs/MeetHour-API/b7e3d0ab3906f-generate-jwt

   ```
        from meethour.type import GenerateJwtType
        apiservice = apiServices.MHApiService()

        generateJwtBody= GenerateJwtType.GenerateJwt("meeting_id","contact_id") # pass values
        generate_jwt_response = apiservice.generate_jwt(token, generateJwtBody)
        print(generate_jwt_response)

   ```

4. To fetch User Details: => https://docs.v-empower.com/docs/MeetHour-API/ff9d0e37d9191-user-details

   ```
        from meethour.type import user_details
        apiservice = apiServices.MHApiService()

        userDetailsBody= user_details.user_details(0,0,0,0)
        user_details_response = apiservice.user_details(token, userDetailsBody)
        print(user_details_response)

   ```

5. To fetch access Token using Refresh Token: => https://docs.v-empower.com/docs/MeetHour-API/d851be1af9804-get-access-token-using-refresh-token

```
    from meethour.type import RefreshToken
    apiservice = apiServices.MHApiService()

    refreshTokenBody= RefreshToken.RefreshToken('refresh_token','CLIENT_ID','CLIENT_SECRET','access_token') #pass values
    refresh_token_response = apiservice.refresh_token(token, refreshTokenBody)
    print(refresh_token_response)

```

6. To add a contact in Meet Hour database: => https://docs.v-empower.com/docs/MeetHour-API/bd1e416413e8c-add-contact

```
        from meethour.type import AddContactType
        apiservice = apiServices.MHApiService()

        addContactBody = AddContactType.AddContactType("EMAIL","Fristname","lastname","phone","country_code ","Image","1")     #pass values
        add_contact_response = apiservice.add_contact(token, addContactBody)
        print(add_contact_response)
```

7. To get Timezones of various countries: => https://docs.v-empower.com/docs/MeetHour-API/c688c29bce9b9-timezone-list

   ```
        from meethour.type import time_zone
        apiservice = apiServices.MHApiService()

        timeZoneBody= time_zone.time_zone(0,0,0)
        timeZone_response = apiservice.time_zone(token, timeZoneBody)
        print(timeZone_response)

   ```

8. To get list of all the contacts in your Meet Hour account: => https://api.meethour.io/api/{version}/customer/contacts

   ```
        from meethour.type import ContactsType
        apiservice = apiServices.MHApiService()

        contactsBody = ContactsType.ContactsType(0,0,0)
        contacts_response = apiservice.contacts(token, contactsBody)
        print(contacts_response)

   ```

9. To make changes in the existing contact details: => https://docs.v-empower.com/docs/MeetHour-API/28cae9187d215-edit-contact

   ```
        from meethour.type import EditContactType
        apiservice = apiServices.MHApiService()

        editContactsBody= EditContactType.EditContactType("id","countrycode","EMAIL", "Firstname","lastname","Image","1","phone") # pass values

        edit_contacts_response = apiservice.edit_contact(token, editContactsBody)
        print(edit_contacts_response)

   ```

10. To get Upcoming Meetings: => https://docs.v-empower.com/docs/MeetHour-API/31df88388416d-upcoming-meetings

    ```
        from meethour.type import UpcomingMeetings
        apiservice = apiServices.MHApiService()

        upcomingMeetingsBody= UpcomingMeetings.UpcomingMeetings()
        upcoming_meetings_response = apiservice.upcoming_meetings(token, upcomingMeetingsBody)
        print(upcoming_meetings_response)

    ```

11. To archive a meeting: => https://docs.v-empower.com/docs/MeetHour-API/1dd64523cc6bf-archive-meeting

    ```
        from meethour.type import ArchiveMeeting
        apiservice = apiServices.MHApiService()

        archiveMeetingBody = ArchiveMeeting.ArchiveMeetings("id")   # pass value
        ArchiveMeeting_response = apiservice.archive_meetings(token, archiveMeetingBody)
        print(ArchiveMeeting_response)

    ```

12. To get the details of a missed meeting: => https://docs.v-empower.com/docs/MeetHour-API/92998e2dda102-missed-meetings

    ```
        from meethour.type import MissedMeeting
        apiservice = apiServices.MHApiService()

        missedMeetingsBody = MissedMeeting.MissedMeetings()
        missed_meetings_response = apiservice.missed_meetings(token, missedMeetingsBody)
        print(missed_meetings_response)

    ```

13. To get completed meetings: => https://docs.v-empower.com/docs/MeetHour-API/aa9ef6a678250-completed-meetings

    ```
        from meethour.type import CompletedMeetingsType
        apiservice = apiServices.MHApiService()

        completedMeetingsBody = CompletedMeetingsType.CompletedMeetings()
        completed_meetings_response = apiservice.completed_meetings(token, completedMeetingsBody)
        print(completed_meetings_response)
    ```

14. To edit an existing meeting: => https://docs.v-empower.com/docs/MeetHour-API/5dedde36380b4-meeting-edit-meeting

    ```
        from meethour.type import EditMeetingType
        apiservice = apiServices.MHApiService()

        editMeetingBody = EditMeetingType.EditMeeting('meeting_id') #pass value
        edit_meeting_response = apiservice.edit_meeting(token, editMeetingBody)
        print(edit_meeting_response)
    ```

15. To view a meeting: => https://docs.v-empower.com/docs/MeetHour-API/7e9a0a1e0da7f-meeting-view-meeting

    ```
        from meethour.type import ViewMeetings
        apiservice = apiServices.MHApiService()

        viewMeetingBody = ViewMeetings.ViewMeeting('meeting_id') #pass value
        view_meetings_response = apiservice.view_meetings(token, viewMeetingBody)
        print(view_meetings_response)

    ```

16. To get all the recordings list: => https://docs.v-empower.com/docs/MeetHour-API/ce7c4fd8cae7e-recording-list

    ```
        from meethour.type import RecordingsList
        apiservice = apiServices.MHApiService()

        recordingsListBody = RecordingsList.RecordingsList('Local') # storage location
        recordings_list_response = apiservice.recordings_list(token, recordingsListBody)
        print(recordings_list_response)

    ```

### Join Meeting via Javascript SDK

```
        <script src="https://api.meethour.io/libs/v2.4.6/external_api.min.js?apiKey=f6282h82729080282928298"></script>
```

### `api = new MeetHourExternalAPI(domain, options)`

Config & User Interface Settings Parameters - Parameters - https://docs.v-empower.com/docs/MeetHour-API/281f2d9a6c539-generate-jwt

The next step for embedding Meet Hour is to create the Meet Hour API object.
Its constructor gets a number of options:

- **domain**: domain used to build the conference URL, 'meethour.io' for
  example.
- **options**: object with properties - the optional arguments:
  - **roomName**: (required) name of the room to join.
  - **apiKey**: (required). You will get API key from your Developer Page - https://portal.meethour.io/customer/developers. Make sure you are on our Developer or higher plan. - https://meethour.io/#pricing
  - **jwt**: (required - If you to start meeting or join or moderator) - https://docs.v-empower.com/docs/MeetHour-API/b3A6MzcwODk5MTQ-generate-jwt
  - **pcode**: (optional) Pass encrypted Meeting Password dynamically. Get this from API.
  - **width**: (optional) width for the iframe which will be created. If a number is specified it's treated as pixel units. If a string is specified the format is number followed by 'px', 'em', 'pt' or '%'.
  - **height**: (optional) height for the iframe which will be created. If a number is specified it's treated as pixel units. If a string is specified the format is number followed by 'px', 'em', 'pt' or '%'.
  - **parentNode**: (optional) HTML DOM Element where the iframe will be added as a child.
  - **noSSL**: (optional, defaults to true) Boolean indicating if the server should be contacted using HTTP or HTTPS.
  - **onload**: (optional) handler for the iframe onload event.
  - **invitees**: (optional) Array of objects containing information about new participants that will be invited in the call.
  - **devices**: (optional) A map containing information about the initial devices that will be used in the call.
  - **userInfo**: (optional) JS object containing information about the participant opening the meeting, such as `email`.

```Javascript Standard Example
<script src='https://api.meethour.io/libs/v2.4.5/external_api.min.js?apiKey=<APIKEY>'></script>
<div id="conference" style="height: 100%;"></div>
 <script>
        var domain = "meethour.io";
        var options = {
            roomName: "TestRoom", //Change to your Meeting ID
            parentNode: document.querySelector("#conference"),
            jwt: "",
            apiKey: "",
            pcode: "5b40602cfea7708895781a8cad71be5b",
            configOverwrite: {
                prejoinPageEnabled: true, // make this false to skip the prejoin page
                disableInviteFunctions: true,
            },
            interfaceConfigOverwrite: {
                applyMeetingSettings: true, // This is managed from this page - https://portal.meethour.io/customer/ui_settings
                disablePrejoinHeader: true,
                disablePrejoinFooter: true,
                SHOW_MEET_HOUR_WATERMARK: false,
                ENABLE_DESKTOP_DEEPLINK: false,
                HIDE_DEEP_LINKING_LOGO: true,
                MOBILE_APP_PROMO: false,
                ENABLE_MOBILE_BROWSER: true
            },

        };
        // Initialization of MeetHour External API
        var api = new MeetHourExternalAPI(domain, options);

 </script>
```

Example:

```javascript
const domain = "meethour.io";
const options = {
  roomName: "MeetHourExternalAPI",
  width: 700,
  height: 700,
  parentNode: document.querySelector("#meet"),
};
const api = new MeetHourExternalAPI(domain, options);
```

You can set the initial media devices for the call:

```javascript
const domain = 'meethour.io';
const options = {
    ...
    devices: {
        audioInput: '<deviceLabel>',
        audioOutput: '<deviceLabel>',
        videoInput: '<deviceLabel>'
    },
    ...
};
const api = new MeetHourExternalAPI(domain, options);
```

You can overwrite options set in [config.js] and [interface_config.js].
For example, to enable the filmstrip-only interface mode, you can use:

```javascript
const options = {
    ...
    interfaceConfigOverwrite: { filmStripOnly: true },
    ...
};
const api = new MeetHourExternalAPI(domain, options);
```

You can also pass a jwt token to Meet Hour:

```javascript
const options = {
   ...
   jwt: '<jwt_token>',
   noSsl: false,
   ...
};
const api = new MeetHourExternalAPI(domain, options);
```

You can set the userInfo(email, display name) for the call:

```javascript
var domain = "meethour.io";
var options = {
    ...
    userInfo: {
        email: 'email@meethourexamplemail.com',
        displayName: 'John Doe'
    }
}
var api = new MeetHourExternalAPI(domain, options);
```

### Controlling the embedded Meet Hour Conference

Device management `MeetHourExternalAPI` methods:

- **getAvailableDevices** - Retrieve a list of available devices.

```javascript
api.getAvailableDevices().then(devices => {
    devices = {
        audioInput: [{
            deviceId: 'ID'
            groupId: 'grpID'
            kind: 'audioinput'
            label: 'label'
        },....],
        audioOutput: [{
            deviceId: 'ID'
            groupId: 'grpID'
            kind: 'audioOutput'
            label: 'label'
        },....],
        videoInput: [{
            deviceId: 'ID'
            groupId: 'grpID'
            kind: 'videoInput'
            label: 'label'
        },....]
    }
    ...
});
```

- **getCurrentDevices** - Retrieve a list with the devices that are currently selected.

```javascript
api.getCurrentDevices().then(devices => {
    devices = {
        audioInput: {
            deviceId: 'ID'
            groupId: 'grpID'
            kind: 'videoInput'
            label: 'label'
        },
        audioOutput: {
            deviceId: 'ID'
            groupId: 'grpID'
            kind: 'videoInput'
            label: 'label'
        },
        videoInput: {
            deviceId: 'ID'
            groupId: 'grpID'
            kind: 'videoInput'
            label: 'label'
        }
    }
    ...
});
```

- **isDeviceChangeAvailable** - Resolves with true if the device change is available and with false if not.

```javascript
// The accepted deviceType values are - 'output', 'input' or undefined.
api.isDeviceChangeAvailable(deviceType).then(isDeviceChangeAvailable => {
    ...
});
```

- **isDeviceListAvailable** - Resolves with true if the device list is available and with false if not.

```javascript
api.isDeviceListAvailable().then(isDeviceListAvailable => {
    ...
});
```

- **isMultipleAudioInputSupported** - Resolves with true if multiple audio input is supported and with false if not.

```javascript
api.isMultipleAudioInputSupported().then(isMultipleAudioInputSupported => {
    ...
});
```

- **setAudioInputDevice** - Sets the audio input device to the one with the label or id that is passed.

```javascript
api.setAudioInputDevice(deviceLabel, deviceId);
```

- **setAudioOutputDevice** - Sets the audio output device to the one with the label or id that is passed.

```javascript
api.setAudioOutputDevice(deviceLabel, deviceId);
```

- **setVideoInputDevice** - Sets the video input device to the one with the label or id that is passed.

```javascript
api.setVideoInputDevice(deviceLabel, deviceId);
```

You can control the embedded Meet Hour conference using the `MeetHourExternalAPI` object by using `executeCommand`:

```javascript
api.executeCommand(command, ...arguments);
```

The `command` parameter is String object with the name of the command. The following commands are currently supported:

- **displayName** - Sets the display name of the local participant. This command requires one argument - the new display name to be set.

```javascript
api.executeCommand("displayName", "New Nickname");
```

- **password** - Sets the password for the room. This command requires one argument - the password name to be set.

```javascript
api.executeCommand("password", "The Password");
```

- **sendTones** - Play touch tones.

```javascript
api.executeCommand("sendTones", {
  tones: string, // The dial pad touch tones to play. For example, '12345#'.
  duration: number, // Optional. The number of milliseconds each tone should play. The default is 200.
  pause: number, // Optional. The number of milliseconds between each tone. The default is 200.
});
```

- **subject** - Sets the subject of the conference. This command requires one argument - the new subject to be set.

```javascript
api.executeCommand("subject", "New Conference Subject");
```

- **toggleAudio** - Mutes / unmutes the audio for the local participant. No arguments are required.

```javascript
api.executeCommand("toggleAudio");
```

- **toggleVideo** - Mutes / unmutes the video for the local participant. No arguments are required.

```javascript
api.executeCommand("toggleVideo");
```

- **toggleFilmStrip** - Hides / shows the filmstrip. No arguments are required.

```javascript
api.executeCommand("toggleFilmStrip");
```

- **toggleChat** - Hides / shows the chat. No arguments are required.

```javascript
api.executeCommand("toggleChat");
```

- **toggleShareScreen** - Starts / stops screen sharing. No arguments are required.

```javascript
api.executeCommand("toggleShareScreen");
```

- **toggleTileView** - Enter / exit tile view layout mode. No arguments are required.

```javascript
api.executeCommand("toggleTileView");
```

- **hangup** - Hangups the call. No arguments are required.

```javascript
api.executeCommand("hangup");
```

- **email** - Changes the local email address. This command requires one argument - the new email address to be set.

```javascript
api.executeCommand("email", "example@example.com");
```

- **avatarUrl** - Changes the local avatar URL. This command requires one argument - the new avatar URL to be set.

```javascript
api.executeCommand(
  "avatarUrl",
  "https://avatars0.githubusercontent.com/u/3671647",
);
```

- **sendEndpointTextMessage** - Sends a text message to another participant through the datachannels.

```javascript
api.executeCommand("receiverParticipantId", "text");
```

- **setVideoQuality** - Sets the send and receive video resolution. This command requires one argument - the resolution height to be set.

```javascript
api.executeCommand("setVideoQuality", 720);
```

You can also execute multiple commands using the `executeCommands` method:

```javascript
api.executeCommands(commands);
```

The `commands` parameter is an object with the names of the commands as keys and the arguments for the commands as values:

```javascript
api.executeCommands({
  displayName: ["nickname"],
  toggleAudio: [],
});
```

You can add event listeners to the embedded Meet Hour using the `addEventListener` method.
**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods (`addListener` or `on`).**

```javascript
api.addEventListener(event, listener);
```

The `event` parameter is a String object with the name of the event.
The `listener` parameter is a Function object with one argument that will be notified when the event occurs with data related to the event.

The following events are currently supported:

- **cameraError** - event notifications about meethour-Meet having failed to access the camera. The listener will receive an object with the following structure:

```javascript
{
    type: string, // A constant representing the overall type of the error.
    message: string // Additional information about the error.
}
```

- **avatarChanged** - event notifications about avatar
  changes. The listener will receive an object with the following structure:

```javascript
{
    id: string, // the id of the participant that changed his avatar.
    avatarURL: string // the new avatar URL.
}
```

- **audioAvailabilityChanged** - event notifications about audio availability status changes. The listener will receive an object with the following structure:

```javascript
{
  available: boolean; // new available status - boolean
}
```

- **audioMuteStatusChanged** - event notifications about audio mute status changes. The listener will receive an object with the following structure:

```javascript
{
  muted: boolean; // new muted status - boolean
}
```

- **endpointTextMessageReceived** - event notifications about a text message received through datachannels.
  The listener will receive an object with the following structure:

```javascript
{
    senderInfo: {
        jid: string, // the jid of the sender
        id: string // the participant id of the sender
    },
    eventData: {
        name: string // the name of the datachannel event: `endpoint-text-message`
        text: string // the received text from the sender
    }
}
```

- **micError** - event notifications about meethour-Meet having failed to access the mic. The listener will receive an object with the following structure:

```javascript
{
    type: string, // A constant representing the overall type of the error.
    message: string // Additional information about the error.
}
```

- **screenSharingStatusChanged** - receives event notifications about turning on/off the local user screen sharing. The listener will receive object with the following structure:

```javascript
{
    on: boolean, //whether screen sharing is on
    details: {

        // From where the screen sharing is capturing, if known. Values which are
        // passed include 'window', 'screen', 'proxy', 'device'. The value undefined
        // will be passed if the source type is unknown or screen share is off.
        sourceType: string|undefined
    }
}
```

- **dominantSpeakerChanged** - receives event notifications about change in the dominant speaker. The listener will receive object with the following structure:

```javascript
{
  id: string; //participantId of the new dominant speaker
}
```

- **tileViewChanged** - event notifications about tile view layout mode being entered or exited. The listener will receive object with the following structure:

```javascript
{
    enabled: boolean, // whether tile view is not displayed or not
}
```

- **incomingMessage** - Event notifications about incoming
  messages. The listener will receive an object with the following structure:

```javascript
{
    from: string, // The id of the user that sent the message
    nick: string, // the nickname of the user that sent the message
    message: string // the text of the message
}
```

- **outgoingMessage** - Event notifications about outgoing
  messages. The listener will receive an object with the following structure:

```javascript
{
  message: string; // the text of the message
}
```

- **displayNameChange** - event notifications about display name
  changes. The listener will receive an object with the following structure:

```javascript
{
    id: string, // the id of the participant that changed his display name
    displayname: string // the new display name
}
```

- **deviceListChanged** - event notifications about device list changes. The listener will receive an object with the following structure:

```javascript
{
  devices: Object; // the new list of available devices.
}
```

NOTE: The devices object has the same format as the getAvailableDevices result format.

- **emailChange** - event notifications about email
  changes. The listener will receive an object with the following structure:

```javascript
{
    id: string, // the id of the participant that changed his email
    email: string // the new email
}
```

- **feedbackSubmitted** - event notifications about conference feedback submission

```javascript
{
  error: string; // The error which occurred during submission, if any.
}
```

- **filmstripDisplayChanged** - event notifications about the visibility of the filmstrip being updated.

```javascript
{
  visible: boolean; // Whether or not the filmstrip is displayed or hidden.
}
```

- **participantJoined** - event notifications about new participants who join the room. The listener will receive an object with the following structure:

```javascript
{
    id: string, // the id of the participant
    displayName: string // the display name of the participant
}
```

- **participantKickedOut** - event notifications about a participants being removed from the room. The listener will receive an object with the following structure:

```javascript
{
    kicked: {
        id: string, // the id of the participant removed from the room
        local: boolean // whether or not the participant is the local particiapnt
    },
    kicker: {
        id: string // the id of the participant who kicked out the other participant
    }
}
```

- **participantLeft** - event notifications about participants that leave the room. The listener will receive an object with the following structure:

```javascript
{
  id: string; // the id of the participant
}
```

- **participantRoleChanged** - event notification fired when the role of the local user has changed (none, moderator, participant). The listener will receive an object with the following structure:

```javascript
{
  id: string; // the id of the participant
  role: string; // the new role of the participant
}
```

- **passwordRequired** - event notifications fired when failing to join a room because it has a password.

- **videoConferenceJoined** - event notifications fired when the local user has joined the video conference. The listener will receive an object with the following structure:

```javascript
{
    roomName: string, // the room name of the conference
    id: string, // the id of the local participant
    displayName: string, // the display name of the local participant
    avatarURL: string // the avatar URL of the local participant
}
```

- **videoConferenceLeft** - event notifications fired when the local user has left the video conference. The listener will receive an object with the following structure:

```javascript
{
  roomName: string; // the room name of the conference
}
```

- **videoAvailabilityChanged** - event notifications about video availability status changes. The listener will receive an object with the following structure:

```javascript
{
  available: boolean; // new available status - boolean
}
```

- **videoMuteStatusChanged** - event notifications about video mute status changes. The listener will receive an object with the following structure:

```javascript
{
  muted: boolean; // new muted status - boolean
}
```

- **readyToClose** - event notification fired when Meet Hour is ready to be closed (hangup operations are completed).

- **subjectChange** - event notifications about subject of conference changes.
  The listener will receive an object with the following structure:

```javascript
{
  subject: string; // the new subject
}
```

- **suspendDetected** - event notifications about detecting suspend event in host computer.

You can also add multiple event listeners by using `addEventListeners`.
This method requires one argument of type Object. The object argument must
have the names of the events as keys and the listeners of the events as values.
**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods.**

```javascript
function incomingMessageListener(object) {
  // ...
}

function outgoingMessageListener(object) {
  // ...
}

api.addEventListeners({
  incomingMessage: incomingMessageListener,
  outgoingMessage: outgoingMessageListener,
});
```

If you want to remove a listener you can use `removeEventListener` method with argument the name of the event.
**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods( `removeListener`).**

```javascript
api.removeEventListener("incomingMessage");
```

If you want to remove more than one event you can use `removeEventListeners` method with an Array with the names of the events as an argument.
**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods.**

```javascript
api.removeEventListeners(["incomingMessage", "outgoingMessageListener"]);
```

You can get the number of participants in the conference with the following API function:

```javascript
const numberOfParticipants = api.getNumberOfParticipants();
```

You can get the avatar URL of a participant in the conference with the following API function:

```javascript
const avatarURL = api.getAvatarURL(participantId);
```

You can get the display name of a participant in the conference with the following API function:

```javascript
const displayName = api.getDisplayName(participantId);
```

You can get the email of a participant in the conference with the following API function:

```javascript
const email = api.getEmail(participantId);
```

You can get the iframe HTML element where Meet Hour is loaded with the following API function:

```javascript
const iframe = api.getIFrame();
```

You can check whether the audio is muted with the following API function:

```javascript
api.isAudioMuted().then(muted => {
    ...
});
```

You can check whether the video is muted with the following API function:

```javascript
api.isVideoMuted().then(muted => {
    ...
});
```

You can check whether the audio is available with the following API function:

```javascript
api.isAudioAvailable().then(available => {
    ...
});
```

You can check whether the video is available with the following API function:

```javascript
api.isVideoAvailable().then(available => {
    ...
});
```

You can invite new participants to the call with the following API function:

```javascript
api.invite([ {...}, {...}, {...} ]).then(() => {
    // success
}).catch(() => {
    // failure
});
```

## Continous integration

### GitHub Actions

Tests are run whenever there is a commit, see `.github/workflows/test.py` for details.

### Code coverage

Enable code coverage reporting to [Codecov](https://codecov.io/) by creating a secret with name `CODECOV_TOKEN` in your repository settings (Settings -> Secrets -> New sectret) and value set to the token created by Codecov.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/v-empower/MeetHour-Python-SDK",
    "name": "pymeethour",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Meet Hour",
    "author_email": "hello@meethour.io",
    "download_url": "https://files.pythonhosted.org/packages/01/ce/f90fea0e3fd3f95aeca9ead0750109b42c4d598c0b7abac3e3aba304bd38/pymeethour-1.0.2.tar.gz",
    "platform": null,
    "description": "# MeetHour-Python-SDK\n\n![MeetHour Logo](https://raw.githubusercontent.com/v-empower/MeetHour-Python-SDK/master/logo.png)\n\n[Meet Hour - 100% free video conference solution](https://meethour.io)\nMeet Hour is 100% free video conference solution with End to End Encrypted and many other features such as lobby mode, Donor box & Click&Pledge Connect for fundraising, Video call recording, Youtube Live Stream etc.\n\n# Features:\n\n    \u2705  Free Unlimited Time Group Video Conference\n    \u2705  Upto 100 Participants Group Meeting\n    \u2705  Free Video Conference Recording\n    \u2705  YouTube Live Stream\n    \u2705  Raise funds via Click&Pledge Connect & DonorBox\n    \u2705  Virtual Background\n    \u2705  Live Pad\n    \u2705  Screensharing on Desktop & Mobile and many other features.\n\n# Try out one free session -\n\n    1. Website - https://meethour.io\n    2. Android - https://bit.ly/2U239ll\n    3. iOS - https://apple.co/3k8Rpbn\n\n![ScreenShot](https://raw.githubusercontent.com/v-empower/MeetHour-Python-SDK/master/screenshot.png)\n\n# MeetHour API Documentation\n\nAPI Documentation Link - https://docs.v-empower.com/docs/MeetHour-API/\n\n## Meet Hour Python Example\n\n```\nhttps://github.com/v-empower/MeetHour-Web-MobileSDKs/tree/master/Web/Python\n```\n\n## Installation\n\nUsing pip:\n\n`pip install -U pymeethour`\n\nUsing [poetry](https://python-poetry.org/):\n\n`poetry add pymeethour`\n\n### API Usage\n\nProvide your credentials in the constructor of Login object and hit the login api to get your access token. Which will further be used for making rest of the api calls.\n\n```\nfrom flask import Flask, render_template_string\nfrom pymeethour.type import LoginType, ScheduleMeetingType, ViewMeetings, GenerateJwtType\nfrom pymeethour.services import apiServices as apiServices\n\napp = Flask(__name__)\napp.secret_key = \"qwerty\"\n\nCLIENT_ID=''\nCLIENT_SECRET=''\nGRANT_TYPE=''\nEMAIL=''\nPASSWORD=''\nAPI_KEY=''\nAPI_RELEASE='v2.4.6'\nCONFERENCE_URL='meethour.io'\n\napiservice = apiServices.MHApiService()\n\n@app.route('/', methods=['GET'])\ndef usage():\n    loginBody = LoginType.LoginType(CLIENT_ID, CLIENT_SECRET, GRANT_TYPE, EMAIL, PASSWORD)\n    login_response = apiservice.login(loginBody)\n\n    scheduleMeetingBody= ScheduleMeetingType.ScheduleMeeting(\"Meeting Test\", \"123456\", \"10:00\", \"PM\", \"23-06-2030\", \"Asia/Kolkata\")\n    schedule_meeting_response = apiservice.schedule_meeting(login_response.get('access_token'), scheduleMeetingBody)\n\n    viewMeetingBody = ViewMeetings.ViewMeeting(schedule_meeting_response.get('data').get('meeting_id'))\n    view_meetings_response = apiservice.view_meetings(login_response.get('access_token'), viewMeetingBody)\n\n    GenerateJWTBody = GenerateJwtType.GenerateJwt(view_meetings_response.get('meeting').get('meeting_id'))\n    generate_response = apiservice.generate_jwt(login_response.get('access_token'), GenerateJWTBody)\n\n    return render_template_string('<script type=\"text/javascript\" src=\"https://api.meethour.io/libs/{{API_RELEASE}}/external_api.min.js?apiKey={{API_KEY}}\"></script><div class=\"relative\" id=\"conference-parent\"></div><script type=\"text/javascript\">try { const conferencePanel = document.createElement(\"div\"); conferencePanel.setAttribute(\"id\", \"conference\");conferencePanel.setAttribute(\"style\", \"height: 100%;\");const meetingPanel = document.querySelector(\"#conference-parent\");meetingPanel.appendChild(conferencePanel);var domain = \"{{CONFERENCE_URL}}\";var options = {roomName: \"{{meeting_id}}\", parentNode: document.querySelector(\"#conference\"),jwt: \"{{jwt_token}}\",apiKey: \"{{API_KEY}}\",pcode: \"{{pCode}}\",interfaceConfigOverwrite: {applyMeetingSettings: true, disablePrejoinHeader: true,disablePrejoinFooter: true,SHOW_MEET_HOUR_WATERMARK: false,ENABLE_DESKTOP_DEEPLINK: false,HIDE_DEEP_LINKING_LOGO: true,MOBILE_APP_PROMO: false,ENABLE_MOBILE_BROWSER: true,},}; var api = new MeetHourExternalAPI(domain, options); } catch (error) { console.log(error); }</script>',\n        meeting_id = view_meetings_response.get('meeting').get('meeting_id'),\n        jwt_token=generate_response.get('jwt'),\n        pCode=view_meetings_response.get('meeting').get('pcode'),\n        API_KEY=API_KEY,\n        API_RELEASE=API_RELEASE,\n        CONFERENCE_URL=CONFERENCE_URL,\n    )\nif __name__ == '__main__':\n        app.run()\n\n```\n\n### Webhooks Usage ([Documentation](https://docs.v-empower.com/docs/MeetHour-API/l1w139chzqcpp-meethour-webhooks))\n\n```\nfrom pymeethour.webhook import webhooks\nimport pymeethour.services.apiServices as apiServices\n\nfrom cryptography.hazmat.primitives import hashes, hmac as CryptoHMAC\nfrom cryptography.hazmat.backends import default_backend\n\nSECRET_KEY = '<Signing secret>' # Available on https://portal.meethour.io/customer/webhooksettings\n\nwebhook_handler = webhooks.WebhookHandler(SECRET_KEY)\n\n@app.route('/webhooks', methods=['GET', 'POST'])\ndef webhooks_start():\n\n        data = request.get_data(as_text=True)\n\n        # For Meet Hour\n        response = webhook_handler.handle_request(data, request.headers)\n\n        # Log the incoming data using WebhookHandler's log_data method\n        webhook_handler.log_data(request)\n\n        session['meethour_webhook'] = response\n\n        # Print server response (optional)\n        print(f\"Server response: {response}\")\n        return json.dumps(response), 200\n\n```\n\n### API End Points Supported\n\nImportant points:\n=> Instead of '{version}', you to pass our latest version whenever you call the given functions. Currently we are using v1.2 Same version applies to the below calls.\n=> In the token section, you need to pass the received access token which is received when login api is hit, for making further api calls.\n=> You can make API calls by passing required properties in the constructor. But, to meet special requirements you can set rest of the properties directly, according to your need. For more details go to https://docs.v-empower.com/docs/MeetHour-API then click on APIS section to get all the information related to each api call.\n\n1. To Get Access Token Endpoint : => https://docs.v-empower.com/docs/MeetHour-API/a44a7d7669f91-user-login-get-access-token\n\n   ```\n        from meethour.type import LoginType\n        apiservice = apiServices.MHApiService()\n\n        loginBody = LoginType.LoginType('CLIENT_ID', 'CLIENT_SECRET', 'GRANT_TYPE', 'EMAIL', 'PASSWORD') # pass values\n        login_response = apiservice.login(loginBody)\n        print(login_response)\n\n   ```\n\n   => You have to pass respective values in the argument section. Hence, to get desired response.\n\n2. To schedule a meeting: => https://docs.v-empower.com/docs/MeetHour-API/2de4b757a6312-meeting-schedule-meeting\n\n   ```\n        from meethour.type import ScheduleMeetingType\n        apiservice = apiServices.MHApiService()\n\n        scheduleMeetingBody= ScheduleMeetingType.(\"Meeting Test\", \"123456\", \"10:00\", \"PM\", \"23-06-2030\", \"Asia/Kolkata\")\n        schedule_meeting_response = apiservice.schedule_meeting(token, scheduleMeetingBody)\n        print(schedule_meeting_response)\n\n   ```\n\n3. To Generate JWT Token Endpoint => https://docs.v-empower.com/docs/MeetHour-API/b7e3d0ab3906f-generate-jwt\n\n   ```\n        from meethour.type import GenerateJwtType\n        apiservice = apiServices.MHApiService()\n\n        generateJwtBody= GenerateJwtType.GenerateJwt(\"meeting_id\",\"contact_id\") # pass values\n        generate_jwt_response = apiservice.generate_jwt(token, generateJwtBody)\n        print(generate_jwt_response)\n\n   ```\n\n4. To fetch User Details: => https://docs.v-empower.com/docs/MeetHour-API/ff9d0e37d9191-user-details\n\n   ```\n        from meethour.type import user_details\n        apiservice = apiServices.MHApiService()\n\n        userDetailsBody= user_details.user_details(0,0,0,0)\n        user_details_response = apiservice.user_details(token, userDetailsBody)\n        print(user_details_response)\n\n   ```\n\n5. To fetch access Token using Refresh Token: => https://docs.v-empower.com/docs/MeetHour-API/d851be1af9804-get-access-token-using-refresh-token\n\n```\n    from meethour.type import RefreshToken\n    apiservice = apiServices.MHApiService()\n\n    refreshTokenBody= RefreshToken.RefreshToken('refresh_token','CLIENT_ID','CLIENT_SECRET','access_token') #pass values\n    refresh_token_response = apiservice.refresh_token(token, refreshTokenBody)\n    print(refresh_token_response)\n\n```\n\n6. To add a contact in Meet Hour database: => https://docs.v-empower.com/docs/MeetHour-API/bd1e416413e8c-add-contact\n\n```\n        from meethour.type import AddContactType\n        apiservice = apiServices.MHApiService()\n\n        addContactBody = AddContactType.AddContactType(\"EMAIL\",\"Fristname\",\"lastname\",\"phone\",\"country_code \",\"Image\",\"1\")     #pass values\n        add_contact_response = apiservice.add_contact(token, addContactBody)\n        print(add_contact_response)\n```\n\n7. To get Timezones of various countries: => https://docs.v-empower.com/docs/MeetHour-API/c688c29bce9b9-timezone-list\n\n   ```\n        from meethour.type import time_zone\n        apiservice = apiServices.MHApiService()\n\n        timeZoneBody= time_zone.time_zone(0,0,0)\n        timeZone_response = apiservice.time_zone(token, timeZoneBody)\n        print(timeZone_response)\n\n   ```\n\n8. To get list of all the contacts in your Meet Hour account: => https://api.meethour.io/api/{version}/customer/contacts\n\n   ```\n        from meethour.type import ContactsType\n        apiservice = apiServices.MHApiService()\n\n        contactsBody = ContactsType.ContactsType(0,0,0)\n        contacts_response = apiservice.contacts(token, contactsBody)\n        print(contacts_response)\n\n   ```\n\n9. To make changes in the existing contact details: => https://docs.v-empower.com/docs/MeetHour-API/28cae9187d215-edit-contact\n\n   ```\n        from meethour.type import EditContactType\n        apiservice = apiServices.MHApiService()\n\n        editContactsBody= EditContactType.EditContactType(\"id\",\"countrycode\",\"EMAIL\", \"Firstname\",\"lastname\",\"Image\",\"1\",\"phone\") # pass values\n\n        edit_contacts_response = apiservice.edit_contact(token, editContactsBody)\n        print(edit_contacts_response)\n\n   ```\n\n10. To get Upcoming Meetings: => https://docs.v-empower.com/docs/MeetHour-API/31df88388416d-upcoming-meetings\n\n    ```\n        from meethour.type import UpcomingMeetings\n        apiservice = apiServices.MHApiService()\n\n        upcomingMeetingsBody= UpcomingMeetings.UpcomingMeetings()\n        upcoming_meetings_response = apiservice.upcoming_meetings(token, upcomingMeetingsBody)\n        print(upcoming_meetings_response)\n\n    ```\n\n11. To archive a meeting: => https://docs.v-empower.com/docs/MeetHour-API/1dd64523cc6bf-archive-meeting\n\n    ```\n        from meethour.type import ArchiveMeeting\n        apiservice = apiServices.MHApiService()\n\n        archiveMeetingBody = ArchiveMeeting.ArchiveMeetings(\"id\")   # pass value\n        ArchiveMeeting_response = apiservice.archive_meetings(token, archiveMeetingBody)\n        print(ArchiveMeeting_response)\n\n    ```\n\n12. To get the details of a missed meeting: => https://docs.v-empower.com/docs/MeetHour-API/92998e2dda102-missed-meetings\n\n    ```\n        from meethour.type import MissedMeeting\n        apiservice = apiServices.MHApiService()\n\n        missedMeetingsBody = MissedMeeting.MissedMeetings()\n        missed_meetings_response = apiservice.missed_meetings(token, missedMeetingsBody)\n        print(missed_meetings_response)\n\n    ```\n\n13. To get completed meetings: => https://docs.v-empower.com/docs/MeetHour-API/aa9ef6a678250-completed-meetings\n\n    ```\n        from meethour.type import CompletedMeetingsType\n        apiservice = apiServices.MHApiService()\n\n        completedMeetingsBody = CompletedMeetingsType.CompletedMeetings()\n        completed_meetings_response = apiservice.completed_meetings(token, completedMeetingsBody)\n        print(completed_meetings_response)\n    ```\n\n14. To edit an existing meeting: => https://docs.v-empower.com/docs/MeetHour-API/5dedde36380b4-meeting-edit-meeting\n\n    ```\n        from meethour.type import EditMeetingType\n        apiservice = apiServices.MHApiService()\n\n        editMeetingBody = EditMeetingType.EditMeeting('meeting_id') #pass value\n        edit_meeting_response = apiservice.edit_meeting(token, editMeetingBody)\n        print(edit_meeting_response)\n    ```\n\n15. To view a meeting: => https://docs.v-empower.com/docs/MeetHour-API/7e9a0a1e0da7f-meeting-view-meeting\n\n    ```\n        from meethour.type import ViewMeetings\n        apiservice = apiServices.MHApiService()\n\n        viewMeetingBody = ViewMeetings.ViewMeeting('meeting_id') #pass value\n        view_meetings_response = apiservice.view_meetings(token, viewMeetingBody)\n        print(view_meetings_response)\n\n    ```\n\n16. To get all the recordings list: => https://docs.v-empower.com/docs/MeetHour-API/ce7c4fd8cae7e-recording-list\n\n    ```\n        from meethour.type import RecordingsList\n        apiservice = apiServices.MHApiService()\n\n        recordingsListBody = RecordingsList.RecordingsList('Local') # storage location\n        recordings_list_response = apiservice.recordings_list(token, recordingsListBody)\n        print(recordings_list_response)\n\n    ```\n\n### Join Meeting via Javascript SDK\n\n```\n        <script src=\"https://api.meethour.io/libs/v2.4.6/external_api.min.js?apiKey=f6282h82729080282928298\"></script>\n```\n\n### `api = new MeetHourExternalAPI(domain, options)`\n\nConfig & User Interface Settings Parameters - Parameters - https://docs.v-empower.com/docs/MeetHour-API/281f2d9a6c539-generate-jwt\n\nThe next step for embedding Meet Hour is to create the Meet Hour API object.\nIts constructor gets a number of options:\n\n- **domain**: domain used to build the conference URL, 'meethour.io' for\n  example.\n- **options**: object with properties - the optional arguments:\n  - **roomName**: (required) name of the room to join.\n  - **apiKey**: (required). You will get API key from your Developer Page - https://portal.meethour.io/customer/developers. Make sure you are on our Developer or higher plan. - https://meethour.io/#pricing\n  - **jwt**: (required - If you to start meeting or join or moderator) - https://docs.v-empower.com/docs/MeetHour-API/b3A6MzcwODk5MTQ-generate-jwt\n  - **pcode**: (optional) Pass encrypted Meeting Password dynamically. Get this from API.\n  - **width**: (optional) width for the iframe which will be created. If a number is specified it's treated as pixel units. If a string is specified the format is number followed by 'px', 'em', 'pt' or '%'.\n  - **height**: (optional) height for the iframe which will be created. If a number is specified it's treated as pixel units. If a string is specified the format is number followed by 'px', 'em', 'pt' or '%'.\n  - **parentNode**: (optional) HTML DOM Element where the iframe will be added as a child.\n  - **noSSL**: (optional, defaults to true) Boolean indicating if the server should be contacted using HTTP or HTTPS.\n  - **onload**: (optional) handler for the iframe onload event.\n  - **invitees**: (optional) Array of objects containing information about new participants that will be invited in the call.\n  - **devices**: (optional) A map containing information about the initial devices that will be used in the call.\n  - **userInfo**: (optional) JS object containing information about the participant opening the meeting, such as `email`.\n\n```Javascript Standard Example\n<script src='https://api.meethour.io/libs/v2.4.5/external_api.min.js?apiKey=<APIKEY>'></script>\n<div id=\"conference\" style=\"height: 100%;\"></div>\n <script>\n        var domain = \"meethour.io\";\n        var options = {\n            roomName: \"TestRoom\", //Change to your Meeting ID\n            parentNode: document.querySelector(\"#conference\"),\n            jwt: \"\",\n            apiKey: \"\",\n            pcode: \"5b40602cfea7708895781a8cad71be5b\",\n            configOverwrite: {\n                prejoinPageEnabled: true, // make this false to skip the prejoin page\n                disableInviteFunctions: true,\n            },\n            interfaceConfigOverwrite: {\n                applyMeetingSettings: true, // This is managed from this page - https://portal.meethour.io/customer/ui_settings\n                disablePrejoinHeader: true,\n                disablePrejoinFooter: true,\n                SHOW_MEET_HOUR_WATERMARK: false,\n                ENABLE_DESKTOP_DEEPLINK: false,\n                HIDE_DEEP_LINKING_LOGO: true,\n                MOBILE_APP_PROMO: false,\n                ENABLE_MOBILE_BROWSER: true\n            },\n\n        };\n        // Initialization of MeetHour External API\n        var api = new MeetHourExternalAPI(domain, options);\n\n </script>\n```\n\nExample:\n\n```javascript\nconst domain = \"meethour.io\";\nconst options = {\n  roomName: \"MeetHourExternalAPI\",\n  width: 700,\n  height: 700,\n  parentNode: document.querySelector(\"#meet\"),\n};\nconst api = new MeetHourExternalAPI(domain, options);\n```\n\nYou can set the initial media devices for the call:\n\n```javascript\nconst domain = 'meethour.io';\nconst options = {\n    ...\n    devices: {\n        audioInput: '<deviceLabel>',\n        audioOutput: '<deviceLabel>',\n        videoInput: '<deviceLabel>'\n    },\n    ...\n};\nconst api = new MeetHourExternalAPI(domain, options);\n```\n\nYou can overwrite options set in [config.js] and [interface_config.js].\nFor example, to enable the filmstrip-only interface mode, you can use:\n\n```javascript\nconst options = {\n    ...\n    interfaceConfigOverwrite: { filmStripOnly: true },\n    ...\n};\nconst api = new MeetHourExternalAPI(domain, options);\n```\n\nYou can also pass a jwt token to Meet Hour:\n\n```javascript\nconst options = {\n   ...\n   jwt: '<jwt_token>',\n   noSsl: false,\n   ...\n};\nconst api = new MeetHourExternalAPI(domain, options);\n```\n\nYou can set the userInfo(email, display name) for the call:\n\n```javascript\nvar domain = \"meethour.io\";\nvar options = {\n    ...\n    userInfo: {\n        email: 'email@meethourexamplemail.com',\n        displayName: 'John Doe'\n    }\n}\nvar api = new MeetHourExternalAPI(domain, options);\n```\n\n### Controlling the embedded Meet Hour Conference\n\nDevice management `MeetHourExternalAPI` methods:\n\n- **getAvailableDevices** - Retrieve a list of available devices.\n\n```javascript\napi.getAvailableDevices().then(devices => {\n    devices = {\n        audioInput: [{\n            deviceId: 'ID'\n            groupId: 'grpID'\n            kind: 'audioinput'\n            label: 'label'\n        },....],\n        audioOutput: [{\n            deviceId: 'ID'\n            groupId: 'grpID'\n            kind: 'audioOutput'\n            label: 'label'\n        },....],\n        videoInput: [{\n            deviceId: 'ID'\n            groupId: 'grpID'\n            kind: 'videoInput'\n            label: 'label'\n        },....]\n    }\n    ...\n});\n```\n\n- **getCurrentDevices** - Retrieve a list with the devices that are currently selected.\n\n```javascript\napi.getCurrentDevices().then(devices => {\n    devices = {\n        audioInput: {\n            deviceId: 'ID'\n            groupId: 'grpID'\n            kind: 'videoInput'\n            label: 'label'\n        },\n        audioOutput: {\n            deviceId: 'ID'\n            groupId: 'grpID'\n            kind: 'videoInput'\n            label: 'label'\n        },\n        videoInput: {\n            deviceId: 'ID'\n            groupId: 'grpID'\n            kind: 'videoInput'\n            label: 'label'\n        }\n    }\n    ...\n});\n```\n\n- **isDeviceChangeAvailable** - Resolves with true if the device change is available and with false if not.\n\n```javascript\n// The accepted deviceType values are - 'output', 'input' or undefined.\napi.isDeviceChangeAvailable(deviceType).then(isDeviceChangeAvailable => {\n    ...\n});\n```\n\n- **isDeviceListAvailable** - Resolves with true if the device list is available and with false if not.\n\n```javascript\napi.isDeviceListAvailable().then(isDeviceListAvailable => {\n    ...\n});\n```\n\n- **isMultipleAudioInputSupported** - Resolves with true if multiple audio input is supported and with false if not.\n\n```javascript\napi.isMultipleAudioInputSupported().then(isMultipleAudioInputSupported => {\n    ...\n});\n```\n\n- **setAudioInputDevice** - Sets the audio input device to the one with the label or id that is passed.\n\n```javascript\napi.setAudioInputDevice(deviceLabel, deviceId);\n```\n\n- **setAudioOutputDevice** - Sets the audio output device to the one with the label or id that is passed.\n\n```javascript\napi.setAudioOutputDevice(deviceLabel, deviceId);\n```\n\n- **setVideoInputDevice** - Sets the video input device to the one with the label or id that is passed.\n\n```javascript\napi.setVideoInputDevice(deviceLabel, deviceId);\n```\n\nYou can control the embedded Meet Hour conference using the `MeetHourExternalAPI` object by using `executeCommand`:\n\n```javascript\napi.executeCommand(command, ...arguments);\n```\n\nThe `command` parameter is String object with the name of the command. The following commands are currently supported:\n\n- **displayName** - Sets the display name of the local participant. This command requires one argument - the new display name to be set.\n\n```javascript\napi.executeCommand(\"displayName\", \"New Nickname\");\n```\n\n- **password** - Sets the password for the room. This command requires one argument - the password name to be set.\n\n```javascript\napi.executeCommand(\"password\", \"The Password\");\n```\n\n- **sendTones** - Play touch tones.\n\n```javascript\napi.executeCommand(\"sendTones\", {\n  tones: string, // The dial pad touch tones to play. For example, '12345#'.\n  duration: number, // Optional. The number of milliseconds each tone should play. The default is 200.\n  pause: number, // Optional. The number of milliseconds between each tone. The default is 200.\n});\n```\n\n- **subject** - Sets the subject of the conference. This command requires one argument - the new subject to be set.\n\n```javascript\napi.executeCommand(\"subject\", \"New Conference Subject\");\n```\n\n- **toggleAudio** - Mutes / unmutes the audio for the local participant. No arguments are required.\n\n```javascript\napi.executeCommand(\"toggleAudio\");\n```\n\n- **toggleVideo** - Mutes / unmutes the video for the local participant. No arguments are required.\n\n```javascript\napi.executeCommand(\"toggleVideo\");\n```\n\n- **toggleFilmStrip** - Hides / shows the filmstrip. No arguments are required.\n\n```javascript\napi.executeCommand(\"toggleFilmStrip\");\n```\n\n- **toggleChat** - Hides / shows the chat. No arguments are required.\n\n```javascript\napi.executeCommand(\"toggleChat\");\n```\n\n- **toggleShareScreen** - Starts / stops screen sharing. No arguments are required.\n\n```javascript\napi.executeCommand(\"toggleShareScreen\");\n```\n\n- **toggleTileView** - Enter / exit tile view layout mode. No arguments are required.\n\n```javascript\napi.executeCommand(\"toggleTileView\");\n```\n\n- **hangup** - Hangups the call. No arguments are required.\n\n```javascript\napi.executeCommand(\"hangup\");\n```\n\n- **email** - Changes the local email address. This command requires one argument - the new email address to be set.\n\n```javascript\napi.executeCommand(\"email\", \"example@example.com\");\n```\n\n- **avatarUrl** - Changes the local avatar URL. This command requires one argument - the new avatar URL to be set.\n\n```javascript\napi.executeCommand(\n  \"avatarUrl\",\n  \"https://avatars0.githubusercontent.com/u/3671647\",\n);\n```\n\n- **sendEndpointTextMessage** - Sends a text message to another participant through the datachannels.\n\n```javascript\napi.executeCommand(\"receiverParticipantId\", \"text\");\n```\n\n- **setVideoQuality** - Sets the send and receive video resolution. This command requires one argument - the resolution height to be set.\n\n```javascript\napi.executeCommand(\"setVideoQuality\", 720);\n```\n\nYou can also execute multiple commands using the `executeCommands` method:\n\n```javascript\napi.executeCommands(commands);\n```\n\nThe `commands` parameter is an object with the names of the commands as keys and the arguments for the commands as values:\n\n```javascript\napi.executeCommands({\n  displayName: [\"nickname\"],\n  toggleAudio: [],\n});\n```\n\nYou can add event listeners to the embedded Meet Hour using the `addEventListener` method.\n**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods (`addListener` or `on`).**\n\n```javascript\napi.addEventListener(event, listener);\n```\n\nThe `event` parameter is a String object with the name of the event.\nThe `listener` parameter is a Function object with one argument that will be notified when the event occurs with data related to the event.\n\nThe following events are currently supported:\n\n- **cameraError** - event notifications about meethour-Meet having failed to access the camera. The listener will receive an object with the following structure:\n\n```javascript\n{\n    type: string, // A constant representing the overall type of the error.\n    message: string // Additional information about the error.\n}\n```\n\n- **avatarChanged** - event notifications about avatar\n  changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n    id: string, // the id of the participant that changed his avatar.\n    avatarURL: string // the new avatar URL.\n}\n```\n\n- **audioAvailabilityChanged** - event notifications about audio availability status changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n  available: boolean; // new available status - boolean\n}\n```\n\n- **audioMuteStatusChanged** - event notifications about audio mute status changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n  muted: boolean; // new muted status - boolean\n}\n```\n\n- **endpointTextMessageReceived** - event notifications about a text message received through datachannels.\n  The listener will receive an object with the following structure:\n\n```javascript\n{\n    senderInfo: {\n        jid: string, // the jid of the sender\n        id: string // the participant id of the sender\n    },\n    eventData: {\n        name: string // the name of the datachannel event: `endpoint-text-message`\n        text: string // the received text from the sender\n    }\n}\n```\n\n- **micError** - event notifications about meethour-Meet having failed to access the mic. The listener will receive an object with the following structure:\n\n```javascript\n{\n    type: string, // A constant representing the overall type of the error.\n    message: string // Additional information about the error.\n}\n```\n\n- **screenSharingStatusChanged** - receives event notifications about turning on/off the local user screen sharing. The listener will receive object with the following structure:\n\n```javascript\n{\n    on: boolean, //whether screen sharing is on\n    details: {\n\n        // From where the screen sharing is capturing, if known. Values which are\n        // passed include 'window', 'screen', 'proxy', 'device'. The value undefined\n        // will be passed if the source type is unknown or screen share is off.\n        sourceType: string|undefined\n    }\n}\n```\n\n- **dominantSpeakerChanged** - receives event notifications about change in the dominant speaker. The listener will receive object with the following structure:\n\n```javascript\n{\n  id: string; //participantId of the new dominant speaker\n}\n```\n\n- **tileViewChanged** - event notifications about tile view layout mode being entered or exited. The listener will receive object with the following structure:\n\n```javascript\n{\n    enabled: boolean, // whether tile view is not displayed or not\n}\n```\n\n- **incomingMessage** - Event notifications about incoming\n  messages. The listener will receive an object with the following structure:\n\n```javascript\n{\n    from: string, // The id of the user that sent the message\n    nick: string, // the nickname of the user that sent the message\n    message: string // the text of the message\n}\n```\n\n- **outgoingMessage** - Event notifications about outgoing\n  messages. The listener will receive an object with the following structure:\n\n```javascript\n{\n  message: string; // the text of the message\n}\n```\n\n- **displayNameChange** - event notifications about display name\n  changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n    id: string, // the id of the participant that changed his display name\n    displayname: string // the new display name\n}\n```\n\n- **deviceListChanged** - event notifications about device list changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n  devices: Object; // the new list of available devices.\n}\n```\n\nNOTE: The devices object has the same format as the getAvailableDevices result format.\n\n- **emailChange** - event notifications about email\n  changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n    id: string, // the id of the participant that changed his email\n    email: string // the new email\n}\n```\n\n- **feedbackSubmitted** - event notifications about conference feedback submission\n\n```javascript\n{\n  error: string; // The error which occurred during submission, if any.\n}\n```\n\n- **filmstripDisplayChanged** - event notifications about the visibility of the filmstrip being updated.\n\n```javascript\n{\n  visible: boolean; // Whether or not the filmstrip is displayed or hidden.\n}\n```\n\n- **participantJoined** - event notifications about new participants who join the room. The listener will receive an object with the following structure:\n\n```javascript\n{\n    id: string, // the id of the participant\n    displayName: string // the display name of the participant\n}\n```\n\n- **participantKickedOut** - event notifications about a participants being removed from the room. The listener will receive an object with the following structure:\n\n```javascript\n{\n    kicked: {\n        id: string, // the id of the participant removed from the room\n        local: boolean // whether or not the participant is the local particiapnt\n    },\n    kicker: {\n        id: string // the id of the participant who kicked out the other participant\n    }\n}\n```\n\n- **participantLeft** - event notifications about participants that leave the room. The listener will receive an object with the following structure:\n\n```javascript\n{\n  id: string; // the id of the participant\n}\n```\n\n- **participantRoleChanged** - event notification fired when the role of the local user has changed (none, moderator, participant). The listener will receive an object with the following structure:\n\n```javascript\n{\n  id: string; // the id of the participant\n  role: string; // the new role of the participant\n}\n```\n\n- **passwordRequired** - event notifications fired when failing to join a room because it has a password.\n\n- **videoConferenceJoined** - event notifications fired when the local user has joined the video conference. The listener will receive an object with the following structure:\n\n```javascript\n{\n    roomName: string, // the room name of the conference\n    id: string, // the id of the local participant\n    displayName: string, // the display name of the local participant\n    avatarURL: string // the avatar URL of the local participant\n}\n```\n\n- **videoConferenceLeft** - event notifications fired when the local user has left the video conference. The listener will receive an object with the following structure:\n\n```javascript\n{\n  roomName: string; // the room name of the conference\n}\n```\n\n- **videoAvailabilityChanged** - event notifications about video availability status changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n  available: boolean; // new available status - boolean\n}\n```\n\n- **videoMuteStatusChanged** - event notifications about video mute status changes. The listener will receive an object with the following structure:\n\n```javascript\n{\n  muted: boolean; // new muted status - boolean\n}\n```\n\n- **readyToClose** - event notification fired when Meet Hour is ready to be closed (hangup operations are completed).\n\n- **subjectChange** - event notifications about subject of conference changes.\n  The listener will receive an object with the following structure:\n\n```javascript\n{\n  subject: string; // the new subject\n}\n```\n\n- **suspendDetected** - event notifications about detecting suspend event in host computer.\n\nYou can also add multiple event listeners by using `addEventListeners`.\nThis method requires one argument of type Object. The object argument must\nhave the names of the events as keys and the listeners of the events as values.\n**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods.**\n\n```javascript\nfunction incomingMessageListener(object) {\n  // ...\n}\n\nfunction outgoingMessageListener(object) {\n  // ...\n}\n\napi.addEventListeners({\n  incomingMessage: incomingMessageListener,\n  outgoingMessage: outgoingMessageListener,\n});\n```\n\nIf you want to remove a listener you can use `removeEventListener` method with argument the name of the event.\n**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods( `removeListener`).**\n\n```javascript\napi.removeEventListener(\"incomingMessage\");\n```\n\nIf you want to remove more than one event you can use `removeEventListeners` method with an Array with the names of the events as an argument.\n**NOTE: This method still exists but it is deprecated. MeetHourExternalAPI class extends [EventEmitter]. Use [EventEmitter] methods.**\n\n```javascript\napi.removeEventListeners([\"incomingMessage\", \"outgoingMessageListener\"]);\n```\n\nYou can get the number of participants in the conference with the following API function:\n\n```javascript\nconst numberOfParticipants = api.getNumberOfParticipants();\n```\n\nYou can get the avatar URL of a participant in the conference with the following API function:\n\n```javascript\nconst avatarURL = api.getAvatarURL(participantId);\n```\n\nYou can get the display name of a participant in the conference with the following API function:\n\n```javascript\nconst displayName = api.getDisplayName(participantId);\n```\n\nYou can get the email of a participant in the conference with the following API function:\n\n```javascript\nconst email = api.getEmail(participantId);\n```\n\nYou can get the iframe HTML element where Meet Hour is loaded with the following API function:\n\n```javascript\nconst iframe = api.getIFrame();\n```\n\nYou can check whether the audio is muted with the following API function:\n\n```javascript\napi.isAudioMuted().then(muted => {\n    ...\n});\n```\n\nYou can check whether the video is muted with the following API function:\n\n```javascript\napi.isVideoMuted().then(muted => {\n    ...\n});\n```\n\nYou can check whether the audio is available with the following API function:\n\n```javascript\napi.isAudioAvailable().then(available => {\n    ...\n});\n```\n\nYou can check whether the video is available with the following API function:\n\n```javascript\napi.isVideoAvailable().then(available => {\n    ...\n});\n```\n\nYou can invite new participants to the call with the following API function:\n\n```javascript\napi.invite([ {...}, {...}, {...} ]).then(() => {\n    // success\n}).catch(() => {\n    // failure\n});\n```\n\n## Continous integration\n\n### GitHub Actions\n\nTests are run whenever there is a commit, see `.github/workflows/test.py` for details.\n\n### Code coverage\n\nEnable code coverage reporting to [Codecov](https://codecov.io/) by creating a secret with name `CODECOV_TOKEN` in your repository settings (Settings -> Secrets -> New sectret) and value set to the token created by Codecov.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Meet Hour is video conferencing solution with End to End Encrypted and many other features such as lobby mode, Donor box & Click&Pledge Connect for fundraising, Video call recording, Youtube Live Stream etc",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/v-empower/MeetHour-Python-SDK"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8edf6b470352f0d0846dd67d5afabe4f4a199e321b3e71c72655877c754bc92",
                "md5": "fa92a7d11e34968b253de35789b931d0",
                "sha256": "9d3edbfa9e2720e38d26460dc6f0d3b437ac718271266fc3e3112d4f87a002b2"
            },
            "downloads": -1,
            "filename": "pymeethour-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa92a7d11e34968b253de35789b931d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 26638,
            "upload_time": "2024-09-11T10:27:20",
            "upload_time_iso_8601": "2024-09-11T10:27:20.953768Z",
            "url": "https://files.pythonhosted.org/packages/b8/ed/f6b470352f0d0846dd67d5afabe4f4a199e321b3e71c72655877c754bc92/pymeethour-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01cef90fea0e3fd3f95aeca9ead0750109b42c4d598c0b7abac3e3aba304bd38",
                "md5": "bd649f5e2dd1a917d14ba41582fb0e1d",
                "sha256": "3b77159870de784b31c64b1a9d5087004429115576b49aa90f9e3d6bbdcf2f8e"
            },
            "downloads": -1,
            "filename": "pymeethour-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bd649f5e2dd1a917d14ba41582fb0e1d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 28353,
            "upload_time": "2024-09-11T10:27:23",
            "upload_time_iso_8601": "2024-09-11T10:27:23.003008Z",
            "url": "https://files.pythonhosted.org/packages/01/ce/f90fea0e3fd3f95aeca9ead0750109b42c4d598c0b7abac3e3aba304bd38/pymeethour-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-11 10:27:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "v-empower",
    "github_project": "MeetHour-Python-SDK",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pymeethour"
}
        
Elapsed time: 0.34539s