Skip to content

Commit

Permalink
audio_service_platform_interface 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Jun 26, 2021
1 parent ec95a57 commit 2a73ee1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
3 changes: 3 additions & 0 deletions audio_service_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

* Initial release.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'method_channel_audio_service.dart';

/// The interface each platform implementation must implement.
abstract class AudioServicePlatform extends PlatformInterface {
/// Constructs an AudioServicePlatform.
AudioServicePlatform() : super(token: _token);
Expand Down Expand Up @@ -176,7 +177,7 @@ abstract class AudioHandlerCallbacks {
/// Handle the notification being swiped away (Android).
Future<void> onNotificationDeleted(OnNotificationDeletedRequest request);

// TODO: implement
/// Handle the notification being clicked (Android).
Future<void> onNotificationClicked(OnNotificationClickedRequest request);

/// Get the children of a parent media item.
Expand Down Expand Up @@ -222,7 +223,11 @@ enum AudioProcessingStateMessage {
error,
}

/// The actons associated with playing audio.
/// The actions associated with playing audio. The index of each enum value from
/// [stop] up to [setShuffleMode] is guaranteed to match the bit index of each
/// `ACTION_*` constant in Android's `PlaybackStateCompat` class. Enum values
/// after this are iOS/macOS specific and their indices may shift if new Android
/// media actions are added in the future.
enum MediaActionMessage {
stop,
pause,
Expand All @@ -243,9 +248,15 @@ enum MediaActionMessage {
prepareFromSearch,
prepareFromUri,
setRepeatMode,
unused_1,
unused_2,

/// This Android media action is deprecated. [setShuffleMode] should be used
/// instead.
_setShuffleModeEnabled,
setCaptioningEnabled,
setShuffleMode,

// -- iOS/macOS-specific actions --

seekBackward,
seekForward,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'audio_service_platform_interface.dart';

class MethodChannelAudioService extends AudioServicePlatform {
Expand Down
3 changes: 2 additions & 1 deletion audio_service_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ description: A common platform interface for the audio_service plugin. Different
homepage: https://github.com/ryanheise/audio_service/tree/master/audio_service_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.0.0
version: 0.0.1

dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.0
meta: ^1.3.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 2a73ee1

Please sign in to comment.