Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
laki_icu_app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张宏
laki_icu_app
Commits
f7ca117d
Commit
f7ca117d
authored
Jun 20, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webrtc对接完成,视频已显示。
parent
18142899
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+4
-0
constants.dart
lib/utils/constants.dart
+1
-1
home_index_cubit.dart
lib/views/home/index/cubit/home_index_cubit.dart
+8
-6
No files found.
android/app/src/main/AndroidManifest.xml
View file @
f7ca117d
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- 网络权限(WebRTC 必需) -->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<!-- USB 摄像头权限 -->
<uses-feature
android:name=
"android.hardware.usb.host"
android:required=
"true"
/>
<uses-permission
android:name=
"android.permission.CAMERA"
/>
...
...
lib/utils/constants.dart
View file @
f7ca117d
...
...
@@ -37,5 +37,5 @@ class Constants {
// ==================== Mock 数据开关 ====================
/// 接口未提供时使用本地 mock 数据。
/// 设为 false 并调整 models 的 fromJson 即可切回真实接口。
static
const
bool
useMockData
=
fals
e
;
static
const
bool
useMockData
=
tru
e
;
}
lib/views/home/index/cubit/home_index_cubit.dart
View file @
f7ca117d
...
...
@@ -70,14 +70,16 @@ class HomeIndexCubit extends Cubit<HomeIndexState> {
/// 初始化 WebRTC 视频连接
Future
<
void
>
_initWebrtc
()
async
{
if
(
Constants
.
useMockData
)
{
// Mock 模式:跳过真实连接,保持断开状态
return
;
}
//
if (Constants.useMockData) {
//
// Mock 模式:跳过真实连接,保持断开状态
//
return;
//
}
await
_webrtcService
.
connect
(
deviceNo:
_mockDeviceNo
,
password:
_mockDevicePassword
,
// deviceNo: _mockDeviceNo,
// password: _mockDevicePassword,
deviceNo:
'VE10085871QOXG'
,
password:
'143548'
,
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment