Compare commits
No commits in common. "3131f611daebdb54b4d5daa43054e1e2595b2441" and "66690c3795ba62aebb2075edfbe573a0e7fd2342" have entirely different histories.
3131f611da
...
66690c3795
|
|
@ -186,13 +186,13 @@ class _FallDetailPageState extends State<FallDetailPage> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
BetterPlayerConfiguration betterPlayerConfiguration =
|
BetterPlayerConfiguration betterPlayerConfiguration =
|
||||||
const BetterPlayerConfiguration(
|
BetterPlayerConfiguration(
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 16 / 9,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
);
|
);
|
||||||
_betterPlayerController = BetterPlayerController(betterPlayerConfiguration);
|
_betterPlayerController = BetterPlayerController(betterPlayerConfiguration);
|
||||||
|
|
||||||
_fetchData(); // 連資料庫、取得影片連結
|
_fetchData(); // 連資料庫
|
||||||
}
|
}
|
||||||
|
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|
@ -211,7 +211,7 @@ class _FallDetailPageState extends State<FallDetailPage> {
|
||||||
await conn.connect();
|
await conn.connect();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var userNameResult = await conn.execute(// 使用傳遞過來的 hfId來找hfvideoId
|
var userNameResult = await conn.execute(// 使用傳遞過來的 email來找homeusername
|
||||||
'SELECT hfvideoId FROM HomeFallVideo WHERE hfallId = :fallId',
|
'SELECT hfvideoId FROM HomeFallVideo WHERE hfallId = :fallId',
|
||||||
{'fallId': widget.fallDetail['跌倒編號']},
|
{'fallId': widget.fallDetail['跌倒編號']},
|
||||||
);
|
);
|
||||||
|
|
@ -225,7 +225,6 @@ class _FallDetailPageState extends State<FallDetailPage> {
|
||||||
videoFormat: BetterPlayerVideoFormat.hls,
|
videoFormat: BetterPlayerVideoFormat.hls,
|
||||||
);
|
);
|
||||||
_betterPlayerController.setupDataSource(dataSource);
|
_betterPlayerController.setupDataSource(dataSource);
|
||||||
setState(() {}); // 重新繪製畫面
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
@ -254,10 +253,11 @@ class _FallDetailPageState extends State<FallDetailPage> {
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
Text('跌倒地點: ${widget.fallDetail['跌倒地點']}', style: TextStyle(fontSize: 18)),
|
Text('跌倒地點: ${widget.fallDetail['跌倒地點']}', style: TextStyle(fontSize: 18)),
|
||||||
// 在這裡可以添加更多詳細資料
|
// 在這裡可以添加更多詳細資料
|
||||||
if (fhvideoId != '') AspectRatio(
|
if (_betterPlayerController != null)
|
||||||
aspectRatio: 16 / 9,
|
AspectRatio(
|
||||||
child: BetterPlayer(controller: _betterPlayerController),
|
aspectRatio: 16 / 9,
|
||||||
),
|
child: BetterPlayer(controller: _betterPlayerController),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,14 @@ class _HomePageState extends State<HomePage> {
|
||||||
},
|
},
|
||||||
onNavigationRequest: (NavigationRequest request) {
|
onNavigationRequest: (NavigationRequest request) {
|
||||||
if (request.url.startsWith(
|
if (request.url.startsWith(
|
||||||
'https://streamer.comprehensive-guardian.systems/video_feed')) {
|
'http://203.64.84.154:8088/video_feed')) {
|
||||||
return NavigationDecision.prevent;
|
return NavigationDecision.prevent;
|
||||||
}
|
}
|
||||||
return NavigationDecision.navigate;
|
return NavigationDecision.navigate;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
..loadRequest(Uri.parse('https://streamer.comprehensive-guardian.systems/0')),
|
..loadRequest(Uri.parse('http://203.64.84.154:8088/0')),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
|
|
|
||||||
|
|
@ -79,14 +79,14 @@ class _MessagePageState extends State<MessagePage> {
|
||||||
print(error.description);
|
print(error.description);
|
||||||
},
|
},
|
||||||
onNavigationRequest: (NavigationRequest request) {
|
onNavigationRequest: (NavigationRequest request) {
|
||||||
if (request.url.startsWith('https://streamer.comprehensive-guardian.systems/video_feed')) {
|
if (request.url.startsWith('http://203.64.84.154:8088/video_feed')) {
|
||||||
return NavigationDecision.prevent;
|
return NavigationDecision.prevent;
|
||||||
}
|
}
|
||||||
return NavigationDecision.navigate;
|
return NavigationDecision.navigate;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
..loadRequest(Uri.parse('https://streamer.comprehensive-guardian.systems/0')),
|
..loadRequest(Uri.parse('http://203.64.84.154:8088/0')),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
|
|
@ -147,7 +147,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_cameraId = camera_id;
|
_cameraId = camera_id;
|
||||||
_webViewController.loadRequest(Uri.parse('https://streamer.comprehensive-guardian.systems/$camera_id'));
|
_webViewController.loadRequest(Uri.parse('http://203.64.84.154:8088/$camera_id'));
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -218,14 +218,14 @@ class _WebViewPageState extends State<WebViewPage> {
|
||||||
print(error.description);
|
print(error.description);
|
||||||
},
|
},
|
||||||
onNavigationRequest: (NavigationRequest request) {
|
onNavigationRequest: (NavigationRequest request) {
|
||||||
if (request.url.startsWith('https://streamer.comprehensive-guardian.systems/video_feed')) {
|
if (request.url.startsWith('http://203.64.84.154:8088/video_feed')) {
|
||||||
return NavigationDecision.prevent;
|
return NavigationDecision.prevent;
|
||||||
}
|
}
|
||||||
return NavigationDecision.navigate;
|
return NavigationDecision.navigate;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
..loadRequest(Uri.parse('https://streamer.comprehensive-guardian.systems/${widget._cameraId}')),
|
..loadRequest(Uri.parse('http://203.64.84.154:8088/${widget._cameraId}')),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user