fix: 修正 查無跌倒影片顯示黑屏
This commit is contained in:
parent
66690c3795
commit
123f0c4958
|
|
@ -186,7 +186,7 @@ class _FallDetailPageState extends State<FallDetailPage> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
BetterPlayerConfiguration betterPlayerConfiguration =
|
BetterPlayerConfiguration betterPlayerConfiguration =
|
||||||
BetterPlayerConfiguration(
|
const BetterPlayerConfiguration(
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 16 / 9,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
);
|
);
|
||||||
|
|
@ -225,6 +225,7 @@ class _FallDetailPageState extends State<FallDetailPage> {
|
||||||
videoFormat: BetterPlayerVideoFormat.hls,
|
videoFormat: BetterPlayerVideoFormat.hls,
|
||||||
);
|
);
|
||||||
_betterPlayerController.setupDataSource(dataSource);
|
_betterPlayerController.setupDataSource(dataSource);
|
||||||
|
setState(() {}); // 重新繪製畫面
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
@ -253,11 +254,10 @@ 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 (_betterPlayerController != null)
|
if (fhvideoId != '') AspectRatio(
|
||||||
AspectRatio(
|
aspectRatio: 16 / 9,
|
||||||
aspectRatio: 16 / 9,
|
child: BetterPlayer(controller: _betterPlayerController),
|
||||||
child: BetterPlayer(controller: _betterPlayerController),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user