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 {
object-fit: cover;
height: 56vh;
transform: rotate(-90deg);
width: 100vw;
height: 100vh;
}
</style>

View File

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

View File

@ -112,6 +112,8 @@ class StartChartManage {
RbcuConfirm? rbcuConfirm;
final int _maxPayloadSize = 8 * 1024; //
int rotateAngle = 0; //
//
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/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/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_state.dart';
@ -30,6 +31,7 @@ class _TalkViewPageState extends State<TalkViewPage>
final TalkViewLogic logic = Get.put(TalkViewLogic());
final TalkViewState state = Get.find<TalkViewLogic>().state;
late Stream<int> _latencyStream;
final startChartManage = StartChartManage();
@override
void initState() {
@ -132,7 +134,7 @@ class _TalkViewPageState extends State<TalkViewPage>
key: state.globalKey,
child: SizedBox.expand(
child: RotatedBox(
quarterTurns: -1,
quarterTurns: startChartManage.remotePort ~/ 90,
child: Obx(
() => state.currentImage.value != null
? RawImage(

View File

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