Merge branch 'fix'
This commit is contained in:
@ -218,7 +218,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeAppLifecycleState(AppLifecycleState lifecycleState) {
|
void didChangeAppLifecycleState(AppLifecycleState lifecycleState) {
|
||||||
if (lifecycleState == AppLifecycleState.inactive && autoPiP) {
|
var routePath = Get.currentRoute;
|
||||||
|
if (lifecycleState == AppLifecycleState.inactive &&
|
||||||
|
autoPiP &&
|
||||||
|
routePath.startsWith('/video')) {
|
||||||
floating.enable(
|
floating.enable(
|
||||||
aspectRatio: Rational(
|
aspectRatio: Rational(
|
||||||
videoDetailController.data.dash!.video!.first.width!,
|
videoDetailController.data.dash!.video!.first.width!,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// ignore_for_file: avoid_print
|
// ignore_for_file: avoid_print
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:easy_debounce/easy_throttle.dart';
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
@ -380,8 +381,10 @@ class PlPlayerController {
|
|||||||
// 解除倍速限制
|
// 解除倍速限制
|
||||||
await pp.setProperty("af", "scaletempo2=max-speed=8");
|
await pp.setProperty("af", "scaletempo2=max-speed=8");
|
||||||
// 音量不一致
|
// 音量不一致
|
||||||
|
if (Platform.isAndroid) {
|
||||||
await pp.setProperty("volume-max", "100");
|
await pp.setProperty("volume-max", "100");
|
||||||
await pp.setProperty("ao", "audiotrack,opensles");
|
await pp.setProperty("ao", "audiotrack,opensles");
|
||||||
|
}
|
||||||
|
|
||||||
// 音轨
|
// 音轨
|
||||||
if (dataSource.audioSource != '' && dataSource.audioSource != null) {
|
if (dataSource.audioSource != '' && dataSource.audioSource != null) {
|
||||||
@ -443,11 +446,15 @@ class PlPlayerController {
|
|||||||
Duration seekTo = Duration.zero,
|
Duration seekTo = Duration.zero,
|
||||||
}) async {
|
}) async {
|
||||||
// 设置倍速
|
// 设置倍速
|
||||||
|
if (videoType.value == 'live') {
|
||||||
|
await setPlaybackSpeed(1.0);
|
||||||
|
} else {
|
||||||
if (_playbackSpeed.value != 1.0) {
|
if (_playbackSpeed.value != 1.0) {
|
||||||
await setPlaybackSpeed(_playbackSpeed.value);
|
await setPlaybackSpeed(_playbackSpeed.value);
|
||||||
} else {
|
} else {
|
||||||
await setPlaybackSpeed(1.0);
|
await setPlaybackSpeed(1.0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getVideoFit();
|
getVideoFit();
|
||||||
// if (_looping) {
|
// if (_looping) {
|
||||||
// await setLooping(_looping);
|
// await setLooping(_looping);
|
||||||
|
|||||||
Reference in New Issue
Block a user