mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-17 23:09:36 +00:00
播放逻辑修改
This commit is contained in:
parent
420438c0df
commit
50a27fdf67
33 changed files with 788 additions and 761 deletions
|
|
@ -3,7 +3,7 @@ import 'dart:async';
|
|||
import 'package:http/http.dart' as http;
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:shelfsdk/audiobookshelf_api.dart';
|
||||
import 'package:vaani/features/player/core/audiobook_player.dart';
|
||||
import 'package:vaani/shared/audio_player.dart';
|
||||
import 'package:vaani/shared/extensions/obfuscation.dart';
|
||||
|
||||
final _logger = Logger('PlaybackReporter');
|
||||
|
|
@ -14,7 +14,7 @@ final _logger = Logger('PlaybackReporter');
|
|||
/// and also report when the player is paused/stopped/finished/playing
|
||||
class PlaybackReporter {
|
||||
/// The player to watch
|
||||
final AbsAudioHandler player;
|
||||
final AbsAudioPlayer player;
|
||||
|
||||
/// the api to report to
|
||||
final AudiobookshelfApi authenticatedApi;
|
||||
|
|
@ -75,7 +75,7 @@ class PlaybackReporter {
|
|||
this.markCompleteWhenTimeLeft = const Duration(seconds: 5),
|
||||
}) : _reportingInterval = reportingInterval {
|
||||
// initial conditions
|
||||
if (player.player.playing) {
|
||||
if (player.playing) {
|
||||
_stopwatch.start();
|
||||
_setReportTimerIfNotAlready();
|
||||
_logger.fine('starting stopwatch');
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import 'dart:async';
|
|||
import 'package:http/http.dart' as http;
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:shelfsdk/audiobookshelf_api.dart';
|
||||
import 'package:vaani/features/player/core/audiobook_player.dart';
|
||||
import 'package:vaani/shared/audio_player.dart';
|
||||
import 'package:vaani/shared/extensions/obfuscation.dart';
|
||||
|
||||
final _logger = Logger('PlaybackReporter');
|
||||
|
|
@ -14,7 +14,7 @@ final _logger = Logger('PlaybackReporter');
|
|||
/// and also report when the player is paused/stopped/finished/playing
|
||||
class PlaybackReporter {
|
||||
/// The player to watch
|
||||
final AbsAudioHandler player;
|
||||
final AbsAudioPlayer player;
|
||||
|
||||
/// the api to report to
|
||||
final AudiobookshelfApi authenticatedApi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue