Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Add a method to pause all players at once #372

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

himanshuGandhiSimform
Copy link
Collaborator

Fixed 325

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -140,15 +140,16 @@ class AudioPlayer(
}


fun pause(result: MethodChannel.Result) {
fun pause(result: MethodChannel.Result, isPauseAllPlayer: Boolean = false) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this boolean?

@@ -91,10 +91,12 @@ class AudioPlayer: NSObject, AVAudioPlayerDelegate {
}


func pausePlayer(result: @escaping FlutterResult) {
func pausePlayer(result: @escaping FlutterResult, isPauseAllPlayer: Bool = false) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

ios/Classes/SwiftAudioWaveformsPlugin.swift Outdated Show resolved Hide resolved
lib/src/controllers/player_controller.dart Outdated Show resolved Hide resolved
@himanshuGandhiSimform himanshuGandhiSimform force-pushed the feature/325/pause_all_players branch from 26deec9 to ef20485 Compare December 9, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pauseAllPlayers() or in PlayerController add option on play - pause other controllers
2 participants