Add enable recording
This commit is contained in:
@@ -42,6 +42,7 @@ from typing import Dict, List, Optional
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
from typing_extensions import Literal
|
||||||
|
|
||||||
from pipecat.transports.daily.utils import (
|
from pipecat.transports.daily.utils import (
|
||||||
DailyRESTHelper,
|
DailyRESTHelper,
|
||||||
@@ -82,6 +83,7 @@ async def configure(
|
|||||||
sip_enable_video: Optional[bool] = False,
|
sip_enable_video: Optional[bool] = False,
|
||||||
sip_num_endpoints: Optional[int] = 1,
|
sip_num_endpoints: Optional[int] = 1,
|
||||||
sip_codecs: Optional[Dict[str, List[str]]] = None,
|
sip_codecs: Optional[Dict[str, List[str]]] = None,
|
||||||
|
enable_recording: Optional[Literal["cloud", "local", "raw-tracks"]] = None,
|
||||||
daily_room_properties: Optional[DailyRoomProperties] = None,
|
daily_room_properties: Optional[DailyRoomProperties] = None,
|
||||||
) -> DailyRoomConfig:
|
) -> DailyRoomConfig:
|
||||||
"""Configure Daily room URL and token with optional SIP capabilities.
|
"""Configure Daily room URL and token with optional SIP capabilities.
|
||||||
@@ -100,6 +102,7 @@ async def configure(
|
|||||||
sip_num_endpoints: Number of allowed SIP endpoints.
|
sip_num_endpoints: Number of allowed SIP endpoints.
|
||||||
sip_codecs: Codecs to support for audio and video. If None, uses Daily defaults.
|
sip_codecs: Codecs to support for audio and video. If None, uses Daily defaults.
|
||||||
Example: {"audio": ["OPUS"], "video": ["H264"]}
|
Example: {"audio": ["OPUS"], "video": ["H264"]}
|
||||||
|
enable_recording: Recording mode for the room. One of "cloud", "local", or "raw-tracks".
|
||||||
daily_room_properties: Custom room properties to use instead of default configuration.
|
daily_room_properties: Custom room properties to use instead of default configuration.
|
||||||
If provided, overrides all other property settings.
|
If provided, overrides all other property settings.
|
||||||
|
|
||||||
@@ -158,8 +161,7 @@ async def configure(
|
|||||||
|
|
||||||
# Create room properties
|
# Create room properties
|
||||||
room_properties = DailyRoomProperties(
|
room_properties = DailyRoomProperties(
|
||||||
exp=expiration_time,
|
exp=expiration_time, eject_at_room_exp=True, enable_recording=enable_recording
|
||||||
eject_at_room_exp=True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add SIP configuration if enabled
|
# Add SIP configuration if enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user