This commit is contained in:
bggRGjQaUbCoE
2024-09-23 15:06:37 +08:00
parent 6fd76fec5e
commit 8785c30e03
4 changed files with 16 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel import io.flutter.plugin.common.MethodChannel
import com.ryanheise.audioservice.AudioServiceActivity import com.ryanheise.audioservice.AudioServiceActivity
import android.content.Intent import android.content.Intent
import android.content.res.Configuration
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.WindowManager.LayoutParams import android.view.WindowManager.LayoutParams
@@ -48,4 +49,9 @@ class MainActivity : AudioServiceActivity() {
companion object { companion object {
private const val CHANNEL = "onUserLeaveHint" private const val CHANNEL = "onUserLeaveHint"
} }
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration?) {
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
methodChannel.invokeMethod("onPipChanged", isInPictureInPictureMode)
}
} }

View File

@@ -1040,9 +1040,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
); );
Widget autoChoose(Widget childWhenDisabled) { Widget autoChoose(Widget childWhenDisabled) {
return childWhenDisabled;
if (Platform.isAndroid) { if (Platform.isAndroid) {
// temporarily remove it
return PiPSwitcher( return PiPSwitcher(
childWhenDisabled: childWhenDisabled, childWhenDisabled: childWhenDisabled,
childWhenEnabled: childWhenEnabled, childWhenEnabled: childWhenEnabled,

View File

@@ -570,10 +570,11 @@ packages:
floating: floating:
dependency: "direct main" dependency: "direct main"
description: description:
name: floating path: "."
sha256: ddcd7f28247746dbb62997c48c89d1824118676796df47fdc6f864f8d02849bc ref: version-3
url: "https://pub.dev" resolved-ref: "1aa5d241e4c50ddd1b8a3bc117a99280e64f5b9c"
source: hosted url: "https://github.com/bggRGjQaUbCoE/floating.git"
source: git
version: "3.0.0" version: "3.0.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"

View File

@@ -135,7 +135,11 @@ dependencies:
# 代理 # 代理
system_proxy: ^0.1.0 system_proxy: ^0.1.0
# pip # pip
floating: ^3.0.0 # floating: ^3.0.0
floating:
git:
url: https://github.com/bggRGjQaUbCoE/floating.git
ref: version-3
# html解析 # html解析
html: ^0.15.4 html: ^0.15.4
# html渲染 # html渲染