Skip to content

Commit c427f28

Browse files
committed
Defining enums for audio transport configuration
1 parent 9278ffc commit c427f28

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

video/src/vonage_video/models/audio_connector.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pydantic import BaseModel, Field
44
from vonage_video.models.enums import AudioSampleRate
5+
from vonage_video.models.enums import AudioTransportEncoding, AudioTransportTransport
56

67
class AudioTransportConfiguration(BaseModel):
78
"""The audio transport configuration.

video/src/vonage_video/models/enums.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ class AudioSampleRate(int, Enum):
5555
KHZ_16 = 16000
5656

5757

58+
class AudioTransportEncoding(str, Enum):
59+
"""Audio encoding type when using JSON transport."""
60+
61+
BASE64 = 'base64'
62+
63+
64+
class AudioTransportTransport(str, Enum):
65+
"""Audio transport type for the WebSocket connection."""
66+
67+
BINARY = 'binary'
68+
JSON = 'json'
69+
70+
5871
class VideoResolution(str, Enum):
5972
"""The resolution of the archive or broadcast.
6073

video/tests/test_audio_connector.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
)
1313

1414
from vonage_video.models.audio_connector import AudioTransportConfiguration
15+
from vonage_video.models.enums import AudioTransportEncoding, AudioTransportTransport
1516

1617
from testutils import build_response, get_mock_jwt_auth
1718

0 commit comments

Comments
 (0)