|
7 | 7 |
|
8 | 8 | from fishjam import ( |
9 | 9 | FishjamClient, |
| 10 | + Peer, |
10 | 11 | PeerOptions, |
| 12 | + Room, |
11 | 13 | RoomOptions, |
12 | 14 | ) |
13 | | -from fishjam._openapi_client.models import ( |
| 15 | +from fishjam.errors import ( |
| 16 | + BadRequestError, |
| 17 | + NotFoundError, |
| 18 | + ServiceUnavailableError, |
| 19 | + UnauthorizedError, |
| 20 | +) |
| 21 | +from fishjam.peer import ( |
14 | 22 | PeerMetadata, |
15 | 23 | PeerStatus, |
16 | 24 | PeerType, |
| 25 | + SubscribeOptions, |
| 26 | + SubscribeOptionsAudioFormat, |
| 27 | + SubscribeOptionsAudioSampleRate, |
| 28 | +) |
| 29 | +from fishjam.room import ( |
17 | 30 | RoomConfig, |
18 | 31 | RoomConfigRoomType, |
19 | 32 | RoomConfigVideoCodec, |
20 | 33 | ) |
21 | | -from fishjam.api._fishjam_client import Peer, Room |
22 | | -from fishjam.errors import ( |
23 | | - BadRequestError, |
24 | | - NotFoundError, |
25 | | - ServiceUnavailableError, |
26 | | - UnauthorizedError, |
27 | | -) |
28 | 34 |
|
29 | 35 | HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" |
30 | 36 | FISHJAM_URL = f"http://{HOST}:5002" |
@@ -196,7 +202,13 @@ def _assert_peer_created( |
196 | 202 | assert peer in room.peers |
197 | 203 |
|
198 | 204 | def test_with_specified_options(self, room_api: FishjamClient): |
199 | | - options = PeerOptions(enable_simulcast=True) |
| 205 | + options = PeerOptions( |
| 206 | + enable_simulcast=True, |
| 207 | + subscribe=SubscribeOptions( |
| 208 | + audio_format=SubscribeOptionsAudioFormat.PCM16, |
| 209 | + audio_sample_rate=SubscribeOptionsAudioSampleRate.VALUE_16000, |
| 210 | + ), |
| 211 | + ) |
200 | 212 |
|
201 | 213 | room = room_api.create_room() |
202 | 214 | peer, _token = room_api.create_peer(room.id, options=options) |
|
0 commit comments