156
157 video_api = VideoAPI(
158 os.environ["AGORA_APP_ID"], # Replace this with your Agora App ID
159 os.environ["AGORA_APP_CERTIFICATE"], # Replace this with your Agora App Certificate160 "my-channel", # Replace this with your channel name
161 "user1" # Replace this with your user ID
162 )
10import agora
11
12class VideoAPI:
13 def __init__(self, app_id: str, app_certificate: str, channel_name: str, user_id: str): 14 self.app_id = app_id
15 self.app_certificate = app_certificate
16 self.channel_name = channel_name
156
157 video_api = VideoAPI(
158 os.environ["AGORA_APP_ID"], # Replace this with your Agora App ID
159 os.environ["AGORA_APP_CERTIFICATE"], # Replace this with your Agora App Certificate160 "my-channel", # Replace this with your channel name
161 "user1" # Replace this with your user ID
162 )
10import agora
11
12class VideoAPI:
13 def __init__(self, app_id: str, app_certificate: str, channel_name: str, user_id: str): 14 self.app_id = app_id
15 self.app_certificate = app_certificate
16 self.channel_name = channel_name
178 # Video chat API endpoints
179 app.add_route(video_chat_app, "/api/video-chat/<room_name>/<user_id>", methods=["GET", "POST", "DELETE", "PUT"])
180 app.add_route(video_chat_signal, "/api/video-chat/<room_name>/<user_id>/signal", methods=["POST", "DELETE", "PUT"])
181 app.add_route(video_chat_candidate, "/api/video-chat/<room_name>/<user_id>/candidate", methods=["POST"])182
183 # Create initial video chats
184 room_names = ["room1", "room2"]
Line length greater than configured max_line_length
detected, defaults to 79 character. This limit can be configured docs