mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-17 14:59:35 +00:00
播放器重写的stream改名
This commit is contained in:
parent
05bc0cde74
commit
e44144b229
6 changed files with 14 additions and 13 deletions
|
|
@ -271,8 +271,7 @@ class AudiobookPlayer extends AudioPlayer {
|
|||
// - positionStream
|
||||
// - bufferedPositionStream
|
||||
|
||||
@override
|
||||
Stream<Duration> get positionStream {
|
||||
Stream<Duration> get positionStreamInBook {
|
||||
// return the positionInBook stream
|
||||
return super.positionStream.map((position) {
|
||||
if (_book == null) {
|
||||
|
|
@ -282,8 +281,7 @@ class AudiobookPlayer extends AudioPlayer {
|
|||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Stream<Duration> get bufferedPositionStream {
|
||||
Stream<Duration> get bufferedPositionStreamInBook {
|
||||
return super.bufferedPositionStream.map((position) {
|
||||
if (_book == null) {
|
||||
return Duration.zero;
|
||||
|
|
@ -293,7 +291,7 @@ class AudiobookPlayer extends AudioPlayer {
|
|||
}
|
||||
|
||||
/// a convenience getter for slow position stream
|
||||
Stream<Duration> get slowPositionStream {
|
||||
Stream<Duration> get slowPositionStreamInBook {
|
||||
final superPositionStream = createPositionStream(
|
||||
steps: 100,
|
||||
minPeriod: const Duration(milliseconds: 500),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue