diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index e070783a..5545e91d 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -37,11 +37,11 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const base_url = "http://192.168.10.236:8766/app/"; ///费韬 -const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 +// const base_url = "http://192.168.10.236:8766/app/"; ///费韬 +// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index b28747fd..9846ed31 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -265,8 +265,8 @@ class _UnionDetailsPage extends State { "tenantCode": storeInfo.tenantCode, if (latitude != null && longitude != null) "position": "$latitude,$longitude", - // "baseURL": "https://pos.api.lotus-wallet.com/app/", - "baseURL": "http://192.168.10.236:8765/app/", + "baseURL": "https://pos.api.lotus-wallet.com/app/", + // "baseURL": "http://192.168.10.236:8765/app/", "uid": userId, "userInfo": { "nickname": nickname, diff --git a/lib/web/web_view/web_content.dart b/lib/web/web_view/web_content.dart index 5a5175b8..687a4209 100644 --- a/lib/web/web_view/web_content.dart +++ b/lib/web/web_view/web_content.dart @@ -1,6 +1,7 @@ import 'package:chewie/chewie.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/image_render.dart'; import 'package:chewie/src/chewie_progress_colors.dart' as chewie; @@ -106,39 +107,60 @@ class _WebContent extends State { Widget videoWidget(double width, double height, src, sandboxMode) { print("src : $src"); + chewieAudioController = ChewieController( + videoPlayerController: videoPlayerController = + VideoPlayerController.network( + src, + ), + aspectRatio: width / height, + //宽高比 + autoPlay: false, + //自动播放 + looping: false, + //循环播放 + allowFullScreen: true, + // systemOverlaysAfterFullScreen: [], + // systemOverlaysOnEnterFullScreen: [], + // deviceOrientationsAfterFullScreen: [], + // deviceOrientationsOnEnterFullScreen: [], + // 拖动条样式颜色 + materialProgressColors: chewie.ChewieProgressColors( + playedColor: Colors.white, + handleColor: Colors.white, + backgroundColor: Colors.grey, + bufferedColor: Colors.transparent, + ), + autoInitialize: true, + ); + + chewieAudioController.addListener(_fullScreenListener); + return MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: 0.9, + textScaleFactor: textScaleFactor, ), child: Container( width: MediaQuery.of(context).size.width - 17, height: (MediaQuery.of(context).size.width) / (width / height), child: chewies = Chewie( - controller: chewieAudioController = ChewieController( - videoPlayerController: videoPlayerController = - VideoPlayerController.network( - src, - ), - aspectRatio: width / height, - //宽高比 - autoPlay: false, - //自动播放 - looping: false, - //循环播放 - // 拖动条样式颜色 - materialProgressColors: chewie.ChewieProgressColors( - playedColor: Colors.white, - handleColor: Colors.white, - backgroundColor: Colors.grey, - bufferedColor: Colors.transparent, - ), - autoInitialize: true, - ), + controller: chewieAudioController, ), ), ); } + Future _fullScreenListener() async { + print("object: isPlaying: ${videoPlayerController.value.isPlaying}"); + print("object: isFullScreen: ${chewieAudioController.isFullScreen}"); + + if (!chewieAudioController.isFullScreen) { + textScaleFactor = 1; + setState(() {}); + } + } + + double textScaleFactor = 0.9; + Widget audioWidget(showControls, loop, autoplay, src, width) { return Container( width: width,