Meeting Class Methods - Python
join
- It is used to join a meeting.
- After meeting initialization by
init_meeting()
it returns a new instance of Meeting. However, by default, it will not automatically join the meeting. Hence, to join the meeting you should calljoin()
.
Events associated with join()
:
- Local Participant will receive a
on_meeting_joined
event when successfully joined. - Remote Participant will receive a
on_participant_joined
event with the newly joinedParticipant
object from the event callback.
async_join
- It is used to join a asynchronously meeting.
- After meeting initialization by
init_meeting()
it returns a new instance of Meeting. However, by default, it will not automatically join the meeting. Hence, to join the meeting you should callasync_join()
.
Events associated with async_join()
:
- Local Participant will receive a
on_meeting_joined
event when successfully joined. - Remote Participant will receive a
on_participant_joined
event with the newly joinedParticipant
object from the event callback.
leave
- It is used to leave the current meeting.
Events associated with leave()
:
- Local participant will receive a
on_meeting_left
event. - All remote participants will receive a
on_participant_left
event withparticipantId
.
Returns
void
end
- It is used to end the current running session.
- By calling
end()
, all joined participants including local_participant of that session will leave the meeting.
Events associated with end()
:
- All participants and local_participant, will be emitted
on_meeting_left
event.
Returns
void
enable_webcam
- It is used to enable self camera.
on_stream_enabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
disable_webcam
- It is used to disable self camera.
on_stream_disabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
enable_mic
- It is used to enable self microphone.
on_stream_enabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
disable_mic
- It is used to disable self microphone.
on_stream_disabled
event will be emitted withstream
object from the event callback, inside that participant object.
Returns
void
start_recording
-
It is used to start meeting recording.
-
All participants and local_participant, will receive
on_recording_started
andon_recording_state_changed
event. -
webhook_url
will be triggered when the recording is completed and stored in the server. Read more about webhooks here. -
dir_path
will be the path for your S3 bucket to which you want to store recordings. To allow us to store the recording in your Cloud (S3 bucket, GCP or Azure), you will need to fill out on Dashboard by providing the required values. VideoSDK Cloud Integration -
config: mode
is used to either record video-and-audio both or only audio. And by default it will be video-and-audio. -
config: quality
is only applicable to video-and-audio. -
transcription: enabled
indicates whether post transcription is enabled. -
transcription: summary: enabled
Indicates whether post transcription summary generation is enabled. Only applicable when post transcription is enabled. -
transcription: summary: prompt
provides guidelines or instructions for generating a custom summary based on the post transcription content. -
to learn more about transcription config PostTranscriptionConfig
Parameters
- webhookUrl: str
- dir_path: str
- config:
- layout:
- type: "GRID" | "SPOTLIGHT" | "SIDEBAR"
- priority: "SPEAKER" | "PIN"
- gridSize: Number
max 4
- theme: "DARK" | "LIGHT" | "DEFAULT"
- mode: "video-and-audio" | "audio"
- quality: "low" | "med" | "high"
- orientation: "landscape" | "portrait"
- layout:
- transcription:
- enabled: bool
- summary:
- enabled: bool
- prompt: str
Returns
void
Example
from videosdk import RecordingConfig, PostTranscriptionConfig, SummaryConfig
recording_config = RecordingConfig(
webhook_url = "https://example.com",
transcription = PostTranscriptionConfig(
enabled = True,
summary = SummaryConfig(
enabled = True,
prompt = "Write Good Summary On This Recording"
)
)
)
meeting.start_recording(recording_config)
stop_recording
- It is used to stop meeting recording.
- All participants and local_participant, will receive
on_recording_stopped
event.
Returns
void
start_transcription
-
It is used to start realtime transcription.
-
All participants and local_participant, will receive
TRANSCRIPTION_STARTING
event state andtranscription-text
event. -
config: webhookUrl
will be triggered when the state of realtime transcription is changed. Read more about webhooks here. -
config: summary: enabled
Indicates whether realtime transcription summary generation is enabled. Summary will be available after realtime transcription stopped. -
config: summary: prompt
provides guidelines or instructions for generating a custom summary based on the realtime transcription content. -
to learn more about realtime transcription config TranscriptionConfig
Parameters
- config:
- webhook_url: str
- summary:
- enabled: bool
- prompt: str
Returns
void
Example
from videosdk import TranscriptionConfig, SummaryConfig
config = TranscriptionConfig(
webhook_url="https://example.com",
summary=SummaryConfig{
enabled=True,
prompt="Write Good Summary"
}
)
meeting.start_transcription(config)
stop_transcription
- It is used to stop realtime transcription.
- All participants and local_participant, will receive
TRANSCRIPTION_STOPPING
event state.
Returns
void
Example
meeting.stop_transcription()
add_custom_audio_track
- It is used to add custom audio track in the meeting.
- It can be used to play audio from any source such as file, network etc...
Parameters
- track:
MediaStreamTrack
Returns
void
Example
from videosdk import CustomAudioTrack
custom_audio_track = CustomAudioTrack()
meeting.add_custom_audio_track(custom_audio_track)
add_custom_video_track
- It is used to add custom video track in the meeting.
- It can be used to play video from any source such as file, network etc...
Parameters
- track:
MediaStreamTrack
Returns
void
Example
from videosdk import CustomVideoTrack
custom_video_track = CustomVideoTrack()
meeting.add_custom_video_track(custom_video_track)
fetch_base64
- It is used to fetch a base64-encoded file from VideoSDK temporary storage.
- It can be used to retrieve files in a base64 format from a specified URL using an authorization token.
- Available since:
0.0.3
Parameters
- url:
str
- The URL of the file to be fetched.
- token:
str
- The authorization token required to access the file.
Returns
- base64_data:
str
- The base64-encoded representation of the fetched file.
upload_base64
- It is used to upload base64-encoded data to VideoSDK temporary storage.
- It can be used to store files in a base64 format in a specified meeting.
- Available since:
0.0.3
Parameters
- base64_data:
str
- The base64-encoded data to be uploaded.
- token:
str
- The authorization token required to upload the file.
- file_name:
str
- The name of the file to be uploaded.
Returns
- url:
str
- The URL of the uploaded file in the VideoSDK temporary storage.
add_event_listener
- It is used to add event listener in the meeting.
Parameters
- event_listener: MeetingEventHandler
Returns
void
Example
from videosdk import MeetingEventHandler
class MyMeetingEventHandler(MeetingEventHandler):
pass
meeting_event_handler = MyMeetingEventHandler()
meeting.add_event_listener(meeting_event_handler)
remove_event_listener
- It is used to remove event listener from the meeting.
Parameters
- event_listener: MeetingEventHandler
Returns
void
Example
from videosdk import MeetingEventHandler
class MyMeetingEventHandler(MeetingEventHandler):
pass
meeting_event_handler = MyMeetingEventHandler()
meeting.remove_event_listener(meeting_event_handler)
remove_all_listeners
- It is used to remove all event listener in the meeting.
Returns
void
Example
meeting.remove_all_listeners()
Got a Question? Ask us on discord