sora-sdk 2024.4.0.dev10__tar.gz → 2024.4.0.dev11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sora_sdk-2024.4.0.dev10/src/sora_sdk.egg-info → sora_sdk-2024.4.0.dev11}/PKG-INFO +3 -2
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/README.md +2 -1
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/pyproject.toml +2 -1
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk/sora_sdk_ext.cpython-310-darwin.so +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11/src/sora_sdk.egg-info}/PKG-INFO +3 -2
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk.egg-info/SOURCES.txt +1 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_ca_cert.py +9 -11
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_macos.py +11 -6
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_messaging.py +11 -7
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_openh264.py +7 -4
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_re_offer_re_answer_sdp.py +9 -5
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_sendonly_recvonly.py +9 -5
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_signaling_message.py +3 -2
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_simulcast.py +3 -2
- sora_sdk-2024.4.0.dev11/tests/test_sora_disconnect.py +115 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/tests/test_vad.py +9 -2
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/LICENSE +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/MANIFEST.in +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/NOTICE.md +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/buildbase.py +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/pypath.py +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/run.py +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/setup.cfg +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/setup.py +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk/__init__.py +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk/py.typed +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk/sora_sdk_ext.pyi +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk.egg-info/dependency_links.txt +0 -0
- {sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sora_sdk
|
|
3
|
-
Version: 2024.4.0.
|
|
3
|
+
Version: 2024.4.0.dev11
|
|
4
4
|
Summary: WebRTC SFU Sora Python SDK
|
|
5
5
|
Home-page: https://github.com/shiguredo/sora-python-sdk
|
|
6
6
|
Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
|
|
@@ -277,7 +277,7 @@ pip install sora_sdk
|
|
|
277
277
|
PyPI 経由ではインストールできません。
|
|
278
278
|
パッケージバイナリを配布しておりますので、そちらをご利用ください。
|
|
279
279
|
|
|
280
|
-
https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpack-6.0.0.0
|
|
280
|
+
<https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpack-6.0.0.0>
|
|
281
281
|
|
|
282
282
|
## システム条件
|
|
283
283
|
|
|
@@ -288,6 +288,7 @@ https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpac
|
|
|
288
288
|
|
|
289
289
|
- Windows 11 x86_64
|
|
290
290
|
- Windows Server 2022 x86_64
|
|
291
|
+
- macOS Sequoia 15 arm64
|
|
291
292
|
- macOS Ventura 14 arm64
|
|
292
293
|
- macOS Sonoma 13 arm64
|
|
293
294
|
- Ubuntu 24.04 LTS x86_64
|
|
@@ -80,7 +80,7 @@ pip install sora_sdk
|
|
|
80
80
|
PyPI 経由ではインストールできません。
|
|
81
81
|
パッケージバイナリを配布しておりますので、そちらをご利用ください。
|
|
82
82
|
|
|
83
|
-
https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpack-6.0.0.0
|
|
83
|
+
<https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpack-6.0.0.0>
|
|
84
84
|
|
|
85
85
|
## システム条件
|
|
86
86
|
|
|
@@ -91,6 +91,7 @@ https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpac
|
|
|
91
91
|
|
|
92
92
|
- Windows 11 x86_64
|
|
93
93
|
- Windows Server 2022 x86_64
|
|
94
|
+
- macOS Sequoia 15 arm64
|
|
94
95
|
- macOS Ventura 14 arm64
|
|
95
96
|
- macOS Sonoma 13 arm64
|
|
96
97
|
- Ubuntu 24.04 LTS x86_64
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sora_sdk"
|
|
3
3
|
authors = [{ name = "Shiguredo Inc.", email = "contact+pypi@shiguredo.jp" }]
|
|
4
|
-
version = "2024.4.0.
|
|
4
|
+
version = "2024.4.0.dev11"
|
|
5
5
|
description = "WebRTC SFU Sora Python SDK"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = { file = "LICENSE" }
|
|
@@ -67,6 +67,7 @@ dev-dependencies = [
|
|
|
67
67
|
"python-dotenv>=1.0",
|
|
68
68
|
"numpy>=2.1",
|
|
69
69
|
"mypy>=1.11",
|
|
70
|
+
"httpx>=0.27",
|
|
70
71
|
]
|
|
71
72
|
|
|
72
73
|
[tool.ruff]
|
{sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk/sora_sdk_ext.cpython-310-darwin.so
RENAMED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sora_sdk
|
|
3
|
-
Version: 2024.4.0.
|
|
3
|
+
Version: 2024.4.0.dev11
|
|
4
4
|
Summary: WebRTC SFU Sora Python SDK
|
|
5
5
|
Home-page: https://github.com/shiguredo/sora-python-sdk
|
|
6
6
|
Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
|
|
@@ -277,7 +277,7 @@ pip install sora_sdk
|
|
|
277
277
|
PyPI 経由ではインストールできません。
|
|
278
278
|
パッケージバイナリを配布しておりますので、そちらをご利用ください。
|
|
279
279
|
|
|
280
|
-
https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpack-6.0.0.0
|
|
280
|
+
<https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpack-6.0.0.0>
|
|
281
281
|
|
|
282
282
|
## システム条件
|
|
283
283
|
|
|
@@ -288,6 +288,7 @@ https://github.com/shiguredo/sora-python-sdk/releases/tag/2024.3.0-jetson-jetpac
|
|
|
288
288
|
|
|
289
289
|
- Windows 11 x86_64
|
|
290
290
|
- Windows Server 2022 x86_64
|
|
291
|
+
- macOS Sequoia 15 arm64
|
|
291
292
|
- macOS Ventura 14 arm64
|
|
292
293
|
- macOS Sonoma 13 arm64
|
|
293
294
|
- Ubuntu 24.04 LTS x86_64
|
|
@@ -3,7 +3,7 @@ import time
|
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
-
from client import
|
|
6
|
+
from client import SoraClient, SoraRole
|
|
7
7
|
|
|
8
8
|
"""
|
|
9
9
|
このテストは、Sora の CA 証明書が有効かどうかを確認するためのものです。
|
|
@@ -73,19 +73,16 @@ def test_ca_cert(setup):
|
|
|
73
73
|
|
|
74
74
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
with SoraClient(
|
|
77
77
|
signaling_urls,
|
|
78
|
+
SoraRole.SENDONLY,
|
|
78
79
|
channel_id,
|
|
79
80
|
audio=True,
|
|
80
81
|
video=True,
|
|
81
82
|
metadata=metadata,
|
|
82
83
|
ca_cert=letsencrypt_org_ca_cert,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
time.sleep(5)
|
|
87
|
-
|
|
88
|
-
sendonly.disconnect()
|
|
84
|
+
):
|
|
85
|
+
time.sleep(5)
|
|
89
86
|
|
|
90
87
|
|
|
91
88
|
@pytest.mark.xfail(reason="Invalid CA certificate")
|
|
@@ -96,12 +93,13 @@ def test_ca_cert_invalid(setup):
|
|
|
96
93
|
|
|
97
94
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
98
95
|
|
|
99
|
-
|
|
96
|
+
with SoraClient(
|
|
100
97
|
signaling_urls,
|
|
98
|
+
SoraRole.SENDONLY,
|
|
101
99
|
channel_id,
|
|
102
100
|
audio=True,
|
|
103
101
|
video=True,
|
|
104
102
|
metadata=metadata,
|
|
105
103
|
ca_cert=pki_goog_ca_cert,
|
|
106
|
-
)
|
|
107
|
-
|
|
104
|
+
):
|
|
105
|
+
pass
|
|
@@ -3,7 +3,7 @@ import time
|
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
-
from client import
|
|
6
|
+
from client import SoraClient, SoraRole
|
|
7
7
|
|
|
8
8
|
"""
|
|
9
9
|
GitHub Actions で Video Toolbox を送受信で利用しようとするとエラーになるので、
|
|
@@ -23,8 +23,9 @@ def test_macos_video_hwa_sendonly(setup, video_codec_type):
|
|
|
23
23
|
|
|
24
24
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
25
25
|
|
|
26
|
-
sendonly =
|
|
26
|
+
sendonly = SoraClient(
|
|
27
27
|
signaling_urls,
|
|
28
|
+
SoraRole.SENDONLY,
|
|
28
29
|
channel_id,
|
|
29
30
|
audio=False,
|
|
30
31
|
video=True,
|
|
@@ -65,8 +66,9 @@ def test_macos_h264_sendonly_recvonly(setup):
|
|
|
65
66
|
|
|
66
67
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
67
68
|
|
|
68
|
-
sendonly =
|
|
69
|
+
sendonly = SoraClient(
|
|
69
70
|
signaling_urls,
|
|
71
|
+
SoraRole.SENDONLY,
|
|
70
72
|
channel_id,
|
|
71
73
|
audio=False,
|
|
72
74
|
video=True,
|
|
@@ -76,8 +78,9 @@ def test_macos_h264_sendonly_recvonly(setup):
|
|
|
76
78
|
)
|
|
77
79
|
sendonly.connect()
|
|
78
80
|
|
|
79
|
-
recvonly =
|
|
81
|
+
recvonly = SoraClient(
|
|
80
82
|
signaling_urls,
|
|
83
|
+
SoraRole.RECVONLY,
|
|
81
84
|
channel_id,
|
|
82
85
|
metadata=metadata,
|
|
83
86
|
use_hwa=True,
|
|
@@ -123,8 +126,9 @@ def test_macos_h265_sendonly_recvonly(setup):
|
|
|
123
126
|
|
|
124
127
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
125
128
|
|
|
126
|
-
sendonly =
|
|
129
|
+
sendonly = SoraClient(
|
|
127
130
|
signaling_urls,
|
|
131
|
+
SoraRole.SENDONLY,
|
|
128
132
|
channel_id,
|
|
129
133
|
audio=False,
|
|
130
134
|
video=True,
|
|
@@ -134,8 +138,9 @@ def test_macos_h265_sendonly_recvonly(setup):
|
|
|
134
138
|
)
|
|
135
139
|
sendonly.connect()
|
|
136
140
|
|
|
137
|
-
recvonly =
|
|
141
|
+
recvonly = SoraClient(
|
|
138
142
|
signaling_urls,
|
|
143
|
+
SoraRole.RECVONLY,
|
|
139
144
|
channel_id,
|
|
140
145
|
metadata=metadata,
|
|
141
146
|
use_hwa=True,
|
|
@@ -2,7 +2,7 @@ import sys
|
|
|
2
2
|
import time
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
|
-
from client import
|
|
5
|
+
from client import SoraClient, SoraRole
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def test_messaging(setup):
|
|
@@ -14,17 +14,21 @@ def test_messaging(setup):
|
|
|
14
14
|
|
|
15
15
|
metadata = setup.get("metadata")
|
|
16
16
|
|
|
17
|
-
messaging_sendonly =
|
|
17
|
+
messaging_sendonly = SoraClient(
|
|
18
18
|
signaling_urls,
|
|
19
|
+
SoraRole.SENDONLY,
|
|
19
20
|
channel_id,
|
|
20
|
-
|
|
21
|
+
data_channel_signaling=True,
|
|
22
|
+
data_channels=[{"label": messaging_label, "direction": "sendonly"}],
|
|
21
23
|
metadata=metadata,
|
|
22
24
|
)
|
|
23
25
|
|
|
24
|
-
messaging_recvonly =
|
|
26
|
+
messaging_recvonly = SoraClient(
|
|
25
27
|
signaling_urls,
|
|
28
|
+
SoraRole.RECVONLY,
|
|
26
29
|
channel_id,
|
|
27
|
-
|
|
30
|
+
data_channel_signaling=True,
|
|
31
|
+
data_channels=[{"label": messaging_label, "direction": "recvonly"}],
|
|
28
32
|
metadata=metadata,
|
|
29
33
|
)
|
|
30
34
|
|
|
@@ -42,8 +46,8 @@ def test_messaging(setup):
|
|
|
42
46
|
message1 = "spam".encode("utf-8")
|
|
43
47
|
message2 = "はむ".encode("utf-8")
|
|
44
48
|
|
|
45
|
-
messaging_sendonly.send(message1)
|
|
46
|
-
messaging_sendonly.send(message2)
|
|
49
|
+
messaging_sendonly.send(messaging_label, message1)
|
|
50
|
+
messaging_sendonly.send(messaging_label, message2)
|
|
47
51
|
|
|
48
52
|
time.sleep(3)
|
|
49
53
|
|
|
@@ -3,7 +3,7 @@ import time
|
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
-
from client import
|
|
6
|
+
from client import SoraClient, SoraRole
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@pytest.mark.skipif(sys.platform not in ["darwin", "linux"], reason="macOSとLinuxでのみ実行する")
|
|
@@ -16,8 +16,9 @@ def test_openh264_sendonly_recvonly(setup):
|
|
|
16
16
|
|
|
17
17
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
18
18
|
|
|
19
|
-
sendonly =
|
|
19
|
+
sendonly = SoraClient(
|
|
20
20
|
signaling_urls,
|
|
21
|
+
SoraRole.SENDONLY,
|
|
21
22
|
channel_id,
|
|
22
23
|
metadata=metadata,
|
|
23
24
|
audio=False,
|
|
@@ -28,8 +29,9 @@ def test_openh264_sendonly_recvonly(setup):
|
|
|
28
29
|
)
|
|
29
30
|
sendonly.connect(fake_video=True)
|
|
30
31
|
|
|
31
|
-
recvonly =
|
|
32
|
+
recvonly = SoraClient(
|
|
32
33
|
signaling_urls,
|
|
34
|
+
SoraRole.RECVONLY,
|
|
33
35
|
channel_id,
|
|
34
36
|
metadata=metadata,
|
|
35
37
|
openh264_path=openh264_path,
|
|
@@ -82,8 +84,9 @@ def test_openh264_simulcast(setup, video_codec_type, expected_implementation):
|
|
|
82
84
|
|
|
83
85
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
84
86
|
|
|
85
|
-
sendonly =
|
|
87
|
+
sendonly = SoraClient(
|
|
86
88
|
signaling_urls,
|
|
89
|
+
SoraRole.SENDONLY,
|
|
87
90
|
channel_id,
|
|
88
91
|
simulcast=True,
|
|
89
92
|
audio=False,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import uuid
|
|
3
3
|
|
|
4
|
-
from client import
|
|
4
|
+
from client import SoraClient, SoraRole
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def test_re_offer_re_answer_sdp(setup):
|
|
@@ -11,15 +11,17 @@ def test_re_offer_re_answer_sdp(setup):
|
|
|
11
11
|
|
|
12
12
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
13
13
|
|
|
14
|
-
recvonly =
|
|
14
|
+
recvonly = SoraClient(
|
|
15
15
|
signaling_urls,
|
|
16
|
+
SoraRole.RECVONLY,
|
|
16
17
|
channel_id,
|
|
17
18
|
metadata=metadata,
|
|
18
19
|
)
|
|
19
20
|
recvonly.connect()
|
|
20
21
|
|
|
21
|
-
sendonly1 =
|
|
22
|
+
sendonly1 = SoraClient(
|
|
22
23
|
signaling_urls,
|
|
24
|
+
SoraRole.SENDONLY,
|
|
23
25
|
channel_id,
|
|
24
26
|
audio=True,
|
|
25
27
|
video=True,
|
|
@@ -28,8 +30,9 @@ def test_re_offer_re_answer_sdp(setup):
|
|
|
28
30
|
sendonly1.connect(fake_audio=True, fake_video=True)
|
|
29
31
|
sendonly1.disconnect()
|
|
30
32
|
|
|
31
|
-
sendonly2 =
|
|
33
|
+
sendonly2 = SoraClient(
|
|
32
34
|
signaling_urls,
|
|
35
|
+
SoraRole.SENDONLY,
|
|
33
36
|
channel_id,
|
|
34
37
|
audio=True,
|
|
35
38
|
video=True,
|
|
@@ -37,8 +40,9 @@ def test_re_offer_re_answer_sdp(setup):
|
|
|
37
40
|
)
|
|
38
41
|
sendonly2.connect(fake_audio=True, fake_video=True)
|
|
39
42
|
|
|
40
|
-
sendonly3 =
|
|
43
|
+
sendonly3 = SoraClient(
|
|
41
44
|
signaling_urls,
|
|
45
|
+
SoraRole.SENDONLY,
|
|
42
46
|
channel_id,
|
|
43
47
|
audio=True,
|
|
44
48
|
video=True,
|
|
@@ -3,7 +3,7 @@ import time
|
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
-
from client import
|
|
6
|
+
from client import SoraClient, SoraRole
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def test_sendonly_recvonly_audio(setup):
|
|
@@ -13,8 +13,9 @@ def test_sendonly_recvonly_audio(setup):
|
|
|
13
13
|
|
|
14
14
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
15
15
|
|
|
16
|
-
sendonly =
|
|
16
|
+
sendonly = SoraClient(
|
|
17
17
|
signaling_urls,
|
|
18
|
+
SoraRole.SENDONLY,
|
|
18
19
|
channel_id,
|
|
19
20
|
audio=True,
|
|
20
21
|
video=False,
|
|
@@ -22,8 +23,9 @@ def test_sendonly_recvonly_audio(setup):
|
|
|
22
23
|
)
|
|
23
24
|
sendonly.connect(fake_audio=True)
|
|
24
25
|
|
|
25
|
-
recvonly =
|
|
26
|
+
recvonly = SoraClient(
|
|
26
27
|
signaling_urls,
|
|
28
|
+
SoraRole.RECVONLY,
|
|
27
29
|
channel_id,
|
|
28
30
|
metadata=metadata,
|
|
29
31
|
)
|
|
@@ -79,8 +81,9 @@ def test_sendonly_recvonly_video(setup, video_codec_params):
|
|
|
79
81
|
|
|
80
82
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
81
83
|
|
|
82
|
-
sendonly =
|
|
84
|
+
sendonly = SoraClient(
|
|
83
85
|
signaling_urls,
|
|
86
|
+
SoraRole.SENDONLY,
|
|
84
87
|
channel_id,
|
|
85
88
|
audio=False,
|
|
86
89
|
video=True,
|
|
@@ -89,8 +92,9 @@ def test_sendonly_recvonly_video(setup, video_codec_params):
|
|
|
89
92
|
)
|
|
90
93
|
sendonly.connect(fake_video=True)
|
|
91
94
|
|
|
92
|
-
recvonly =
|
|
95
|
+
recvonly = SoraClient(
|
|
93
96
|
signaling_urls,
|
|
97
|
+
SoraRole.RECVONLY,
|
|
94
98
|
channel_id,
|
|
95
99
|
metadata=metadata,
|
|
96
100
|
)
|
|
@@ -2,7 +2,7 @@ import sys
|
|
|
2
2
|
import time
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
|
-
from client import
|
|
5
|
+
from client import SoraClient, SoraRole
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def test_signaling_message(setup):
|
|
@@ -12,8 +12,9 @@ def test_signaling_message(setup):
|
|
|
12
12
|
|
|
13
13
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
14
14
|
|
|
15
|
-
sendonly =
|
|
15
|
+
sendonly = SoraClient(
|
|
16
16
|
signaling_urls,
|
|
17
|
+
SoraRole.SENDONLY,
|
|
17
18
|
channel_id,
|
|
18
19
|
audio=True,
|
|
19
20
|
video=True,
|
|
@@ -3,7 +3,7 @@ import time
|
|
|
3
3
|
import uuid
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
-
from client import
|
|
6
|
+
from client import SoraClient, SoraRole
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@pytest.mark.parametrize(
|
|
@@ -21,8 +21,9 @@ def test_simulcast(setup, video_codec_type, expected_implementation):
|
|
|
21
21
|
|
|
22
22
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
23
23
|
|
|
24
|
-
sendonly =
|
|
24
|
+
sendonly = SoraClient(
|
|
25
25
|
signaling_urls,
|
|
26
|
+
SoraRole.SENDONLY,
|
|
26
27
|
channel_id,
|
|
27
28
|
simulcast=True,
|
|
28
29
|
audio=False,
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import time
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from api import disconnect_connection_api
|
|
7
|
+
from client import SoraClient, SoraRole
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@pytest.mark.skipif(sys.platform != "linux", reason="linux でのみ実行する")
|
|
11
|
+
def test_websocket_signaling_only_disconnect_api(setup):
|
|
12
|
+
signaling_urls = setup.get("signaling_urls")
|
|
13
|
+
channel_id_prefix = setup.get("channel_id_prefix")
|
|
14
|
+
metadata = setup.get("metadata")
|
|
15
|
+
api_url = setup.get("api_url")
|
|
16
|
+
|
|
17
|
+
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
18
|
+
|
|
19
|
+
with SoraClient(
|
|
20
|
+
signaling_urls,
|
|
21
|
+
SoraRole.RECVONLY,
|
|
22
|
+
channel_id,
|
|
23
|
+
audio=True,
|
|
24
|
+
video=True,
|
|
25
|
+
metadata=metadata,
|
|
26
|
+
data_channel_signaling=False,
|
|
27
|
+
ignore_disconnect_websocket=False,
|
|
28
|
+
) as conn:
|
|
29
|
+
time.sleep(3)
|
|
30
|
+
|
|
31
|
+
if conn.connection_id is None:
|
|
32
|
+
raise ValueError("connection_id is None")
|
|
33
|
+
response = disconnect_connection_api(api_url, channel_id, conn.connection_id)
|
|
34
|
+
assert response.status_code == 200
|
|
35
|
+
|
|
36
|
+
assert conn.ws_close is True
|
|
37
|
+
assert conn.ws_close_code == 1000
|
|
38
|
+
assert conn.ws_close_reason == "DISCONNECTED-API"
|
|
39
|
+
|
|
40
|
+
# TODO: LIFETIME-EXPIRED のテスト
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@pytest.mark.skipif(sys.platform != "linux", reason="linux でのみ実行する")
|
|
44
|
+
def test_websocket_datachannel_signaling_disconnect_api(setup):
|
|
45
|
+
signaling_urls = setup.get("signaling_urls")
|
|
46
|
+
channel_id_prefix = setup.get("channel_id_prefix")
|
|
47
|
+
metadata = setup.get("metadata")
|
|
48
|
+
api_url = setup.get("api_url")
|
|
49
|
+
|
|
50
|
+
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
51
|
+
|
|
52
|
+
with SoraClient(
|
|
53
|
+
signaling_urls,
|
|
54
|
+
SoraRole.RECVONLY,
|
|
55
|
+
channel_id,
|
|
56
|
+
audio=True,
|
|
57
|
+
video=True,
|
|
58
|
+
metadata=metadata,
|
|
59
|
+
data_channel_signaling=True,
|
|
60
|
+
ignore_disconnect_websocket=False,
|
|
61
|
+
) as conn:
|
|
62
|
+
time.sleep(3)
|
|
63
|
+
|
|
64
|
+
if conn.connection_id is None:
|
|
65
|
+
raise ValueError("connection_id is None")
|
|
66
|
+
response = disconnect_connection_api(api_url, channel_id, conn.connection_id)
|
|
67
|
+
assert response.status_code == 200
|
|
68
|
+
|
|
69
|
+
assert conn.ws_close is True
|
|
70
|
+
assert conn.ws_close_code == 1000
|
|
71
|
+
assert conn.ws_close_reason == "DISCONNECTED-API"
|
|
72
|
+
|
|
73
|
+
# TODO: LIFETIME-EXPIRED のテスト
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@pytest.mark.skipif(sys.platform != "linux", reason="linux でのみ実行する")
|
|
77
|
+
def test_datachannel_only_signaling_disconnect_api(setup):
|
|
78
|
+
signaling_urls = setup.get("signaling_urls")
|
|
79
|
+
channel_id_prefix = setup.get("channel_id_prefix")
|
|
80
|
+
metadata = setup.get("metadata")
|
|
81
|
+
api_url = setup.get("api_url")
|
|
82
|
+
|
|
83
|
+
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
84
|
+
|
|
85
|
+
with SoraClient(
|
|
86
|
+
signaling_urls,
|
|
87
|
+
SoraRole.RECVONLY,
|
|
88
|
+
channel_id,
|
|
89
|
+
audio=True,
|
|
90
|
+
video=True,
|
|
91
|
+
metadata=metadata,
|
|
92
|
+
data_channel_signaling=True,
|
|
93
|
+
ignore_disconnect_websocket=True,
|
|
94
|
+
) as conn:
|
|
95
|
+
time.sleep(3)
|
|
96
|
+
|
|
97
|
+
assert conn.switched is True
|
|
98
|
+
assert conn.ignore_disconnect_websocket is True
|
|
99
|
+
|
|
100
|
+
assert conn.ws_close_code == 1000
|
|
101
|
+
assert conn.ws_close_reason == "SELF-CLOSED"
|
|
102
|
+
|
|
103
|
+
if conn.connection_id is None:
|
|
104
|
+
raise ValueError("connection_id is None")
|
|
105
|
+
response = disconnect_connection_api(api_url, channel_id, conn.connection_id)
|
|
106
|
+
assert response.status_code == 200
|
|
107
|
+
|
|
108
|
+
time.sleep(3)
|
|
109
|
+
|
|
110
|
+
assert conn.close_message is not None
|
|
111
|
+
assert conn.close_message["type"] == "close"
|
|
112
|
+
assert conn.close_message["code"] == 1000
|
|
113
|
+
assert conn.close_message["reason"] == "DISCONNECTED-API"
|
|
114
|
+
|
|
115
|
+
# TODO: LIFETIME-EXPIRED のテスト
|
|
@@ -5,7 +5,7 @@ import uuid
|
|
|
5
5
|
from threading import Event
|
|
6
6
|
from typing import Any, Optional
|
|
7
7
|
|
|
8
|
-
from client import
|
|
8
|
+
from client import SoraClient, SoraRole
|
|
9
9
|
|
|
10
10
|
from sora_sdk import (
|
|
11
11
|
Sora,
|
|
@@ -113,7 +113,14 @@ def test_vad(setup):
|
|
|
113
113
|
|
|
114
114
|
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
115
115
|
|
|
116
|
-
sendonly =
|
|
116
|
+
sendonly = SoraClient(
|
|
117
|
+
signaling_urls,
|
|
118
|
+
SoraRole.SENDONLY,
|
|
119
|
+
channel_id,
|
|
120
|
+
audio=True,
|
|
121
|
+
video=False,
|
|
122
|
+
metadata=metadata,
|
|
123
|
+
)
|
|
117
124
|
sendonly.connect(fake_audio=True)
|
|
118
125
|
|
|
119
126
|
vad = VAD(signaling_urls, channel_id, metadata=metadata)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sora_sdk-2024.4.0.dev10 → sora_sdk-2024.4.0.dev11}/src/sora_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|