获取hls下载地址方法增加stream type用来指定主码流子码流

This commit is contained in:
zqc
2026-03-03 09:37:07 +08:00
parent 63b149279f
commit 2f649f5e2d
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ def get_hls_url(index_code: str) -> Optional[str]:
"""获取HLS播放地址""" """获取HLS播放地址"""
try: try:
import test_cam import test_cam
result = test_cam.get_camera_hls_url(index_code) result = test_cam.get_camera_hls_url(index_code, 0)
if result.get("code") == "0" and result.get("data", {}).get("url"): if result.get("code") == "0" and result.get("data", {}).get("url"):
return result["data"]["url"] return result["data"]["url"]
else: else:

View File

@@ -39,7 +39,7 @@ def get_camera_preview_url(camera_index_code):
} }
} }
def get_camera_hls_url(camera_index_code): def get_camera_hls_url(camera_index_code, stream_type = 0):
"""测试用的方法,直接返回固定结果""" """测试用的方法,直接返回固定结果"""
return { return {
"code": "0", "code": "0",