Add initialPosition and initialIndex parameters to load.
This commit is contained in:
parent
556598a663
commit
f38ff383f5
9 changed files with 71 additions and 23 deletions
|
@ -1,3 +1,7 @@
|
|||
## 1.2.0
|
||||
|
||||
- Add initialPosition and initialIndex to LoadRequest.
|
||||
|
||||
## 1.1.0
|
||||
|
||||
- Player is now disposed via JustAudioPlatform.disposePlayer().
|
||||
|
|
|
@ -297,11 +297,19 @@ class DisposePlayerResponse {
|
|||
/// audio source.
|
||||
class LoadRequest {
|
||||
final AudioSourceMessage audioSourceMessage;
|
||||
final Duration initialPosition;
|
||||
final int initialIndex;
|
||||
|
||||
LoadRequest({@required this.audioSourceMessage});
|
||||
LoadRequest({
|
||||
@required this.audioSourceMessage,
|
||||
this.initialPosition,
|
||||
this.initialIndex,
|
||||
});
|
||||
|
||||
Map<dynamic, dynamic> toMap() => {
|
||||
'audioSource': audioSourceMessage.toMap(),
|
||||
'initialPosition': initialPosition?.inMicroseconds,
|
||||
'initialIndex': initialIndex,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ description: A common platform interface for the just_audio plugin.
|
|||
homepage: https://github.com/ryanheise/just_audio/tree/master/just_audio_platform_interface
|
||||
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
|
||||
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue