fix:增加视频旋转角度

This commit is contained in:
liyi 2025-04-28 10:59:48 +08:00
parent 1543de142f
commit 84431d17c4
5 changed files with 17 additions and 5 deletions

View File

@ -29,8 +29,8 @@
#player { #player {
object-fit: cover; object-fit: cover;
height: 56vh; width: 100vw;
transform: rotate(-90deg); height: 100vh;
} }
</style> </style>

View File

@ -41,6 +41,7 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
// //
startChartManage.stopCallRequestMessageTimer(); startChartManage.stopCallRequestMessageTimer();
// talkViewState.rotateAngle.value = talkExpectResp.rotate ?? 0; // talkViewState.rotateAngle.value = talkExpectResp.rotate ?? 0;
startChartManage.rotateAngle = talkExpectResp.rotate;
// //
// x秒内没有收到通话保持则执行的操作; // x秒内没有收到通话保持则执行的操作;
talkePingOverTimeTimerManager.start(); talkePingOverTimeTimerManager.start();

View File

@ -112,6 +112,8 @@ class StartChartManage {
RbcuConfirm? rbcuConfirm; RbcuConfirm? rbcuConfirm;
final int _maxPayloadSize = 8 * 1024; // final int _maxPayloadSize = 8 * 1024; //
int rotateAngle = 0; //
// //
TalkExpectReq _defaultTalkExpect = TalkConstant.H264Expect; TalkExpectReq _defaultTalkExpect = TalkConstant.H264Expect;

View File

@ -12,6 +12,7 @@ import 'package:star_lock/talk/call/callTalk.dart';
import 'package:star_lock/talk/starChart/constant/talk_status.dart'; import 'package:star_lock/talk/starChart/constant/talk_status.dart';
import 'package:star_lock/talk/starChart/handle/impl/debug_Info_model.dart'; import 'package:star_lock/talk/starChart/handle/impl/debug_Info_model.dart';
import 'package:star_lock/talk/starChart/handle/impl/udp_talk_data_handler.dart'; import 'package:star_lock/talk/starChart/handle/impl/udp_talk_data_handler.dart';
import 'package:star_lock/talk/starChart/star_chart_manage.dart';
import 'package:star_lock/talk/starChart/views/talkView/talk_view_logic.dart'; import 'package:star_lock/talk/starChart/views/talkView/talk_view_logic.dart';
import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart'; import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart';
@ -30,6 +31,7 @@ class _TalkViewPageState extends State<TalkViewPage>
final TalkViewLogic logic = Get.put(TalkViewLogic()); final TalkViewLogic logic = Get.put(TalkViewLogic());
final TalkViewState state = Get.find<TalkViewLogic>().state; final TalkViewState state = Get.find<TalkViewLogic>().state;
late Stream<int> _latencyStream; late Stream<int> _latencyStream;
final startChartManage = StartChartManage();
@override @override
void initState() { void initState() {
@ -132,7 +134,7 @@ class _TalkViewPageState extends State<TalkViewPage>
key: state.globalKey, key: state.globalKey,
child: SizedBox.expand( child: SizedBox.expand(
child: RotatedBox( child: RotatedBox(
quarterTurns: -1, quarterTurns: startChartManage.remotePort ~/ 90,
child: Obx( child: Obx(
() => state.currentImage.value != null () => state.currentImage.value != null
? RawImage( ? RawImage(

View File

@ -26,6 +26,7 @@ class _H264WebViewState extends State<H264WebView>
with TickerProviderStateMixin { with TickerProviderStateMixin {
final H264WebViewLogic logic = Get.put(H264WebViewLogic()); final H264WebViewLogic logic = Get.put(H264WebViewLogic());
final H264WebViewState state = Get.find<H264WebViewLogic>().state; final H264WebViewState state = Get.find<H264WebViewLogic>().state;
final startChartManage = StartChartManage();
@override @override
void initState() { void initState() {
@ -72,8 +73,13 @@ class _H264WebViewState extends State<H264WebView>
height: screenHeight, height: screenHeight,
fit: BoxFit.cover, fit: BoxFit.cover,
) )
: WebViewWidget( : SizedBox.expand(
controller: state.webViewController, child: RotatedBox(
quarterTurns: startChartManage.remotePort ~/ 90,
child: WebViewWidget(
controller: state.webViewController,
),
),
); );
}), }),
Obx( Obx(
@ -412,6 +418,7 @@ class _H264WebViewState extends State<H264WebView>
), ),
); );
} }
@override @override
void dispose() { void dispose() {
state.animationController.dispose(); state.animationController.dispose();