mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
opt: sponsor block
This commit is contained in:
@@ -4,6 +4,7 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:PiliPalaX/common/widgets/segment_progress_bar.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@@ -114,6 +115,8 @@ class PlPlayerController {
|
||||
Timer? _timerForGettingVolume;
|
||||
Timer? timerForTrackingMouse;
|
||||
|
||||
final RxList<Segment> segmentList = <Segment>[].obs;
|
||||
|
||||
// final Durations durations;
|
||||
|
||||
static List<Map<String, dynamic>> videoFitType = [
|
||||
@@ -403,6 +406,7 @@ class PlPlayerController {
|
||||
// 初始化资源
|
||||
Future<void> setDataSource(
|
||||
DataSource dataSource, {
|
||||
List<Segment>? segmentList,
|
||||
bool autoplay = true,
|
||||
// 默认不循环
|
||||
PlaylistMode looping = PlaylistMode.none,
|
||||
@@ -426,6 +430,7 @@ class PlPlayerController {
|
||||
}) async {
|
||||
try {
|
||||
this.dataSource = dataSource;
|
||||
this.segmentList.value = segmentList ?? <Segment>[];
|
||||
_autoPlay = autoplay;
|
||||
_looping = looping;
|
||||
// 初始化视频倍速
|
||||
|
||||
Reference in New Issue
Block a user