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

Unify/remove media position reset on Play #37

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

jfversluis
Copy link
Owner

I noticed that when you call Play, the position would be reset.

In my mind, resetting the position is something that belongs to the Stop. When I pause I want to be able to press play again to resume playing. Only when I press stop I expect playback to be reset whenever I start again.

Additionally, I think for iOS there was inconsistent behavior when Play was called it didn't pause the playback as it does on other platforms.

Copy link
Collaborator

@bijington bijington left a comment

Choose a reason for hiding this comment

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

Yeah great spot! I would only expect it to be reset on Stop

@bijington bijington merged commit df5e494 into main Nov 21, 2022
@bijington bijington deleted the remove-play-reset branch November 21, 2022 19:44
jfversluis added a commit that referenced this pull request Sep 4, 2023
* Fix (#37)

* Add Speed property (#26)

* Add Speed property to AudioPlayer

* Add Speed property to sample app and handle speed limitations on different Android devices

* Add handling for exceptions, speed out of range and Android API level < 23

* Add SpeedOutOfRangeException handling in sample application

* Add Speed property to NET6_0 definition

* Add CanSetSpeed handing in Sample App

* Fix bad merge whoops

* Fix speed clamping on iOS and Android

* Fix Windows Speed

* PR Feedback

* Update Sample

* Update AudioPlayer.net.cs

* Update MusicPlayerPageViewModel.cs

* Update src/Plugin.Maui.Audio/AudioPlayer.android.cs

* Update src/Plugin.Maui.Audio/AudioPlayer.net.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Shaun Lawrence <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>

* Update README with Speed related properties (#38)

* Update README.md

* Update README.md

* Windows and Android recording tested.  iOS not yet tested.

* Add NSMicrophoneUsageDescription to Info.plist

* loosen permission on mic for MacCatalyst

* implemented LastDuration for recorder

* try to get player to play again but CollectionView will not take 2nd click

* duration working for both recorder and player

* <ProvisioningType>automatic</ProvisioningType>

* removed all warnings by dealing with nullability

* build nuget package

* Fix funky formatting and remove unnecessary audio player bits

* Removed unnecessary recording bits

* A bit more tidy up

* Recorder page shows the time recording

* Smoother audio recording experience on macOS

* Recommended way to check for permissions

* Make Android non blocking on StartAsync

* XML comments and further tidy up

* Fix windows compilation errors

* Revert "Merge branch 'main' into pr/39"

This reverts commit 415a6bd, reversing
changes made to 2d00bbc.

* Remove auto added bits

* Apply suggestions from code review

Co-authored-by: Gerald Versluis <[email protected]>

* Some docs

---------

Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Shaun Lawrence <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
jfversluis added a commit that referenced this pull request Sep 4, 2023
* Initial dump of things

* Musings on how the recording could look

* Hacked together sample to try and prove it works

* Feature/add audio recording - tested on Windows, Mac, Android (#39)

* Fix (#37)

* Add Speed property (#26)

* Add Speed property to AudioPlayer

* Add Speed property to sample app and handle speed limitations on different Android devices

* Add handling for exceptions, speed out of range and Android API level < 23

* Add SpeedOutOfRangeException handling in sample application

* Add Speed property to NET6_0 definition

* Add CanSetSpeed handing in Sample App

* Fix bad merge whoops

* Fix speed clamping on iOS and Android

* Fix Windows Speed

* PR Feedback

* Update Sample

* Update AudioPlayer.net.cs

* Update MusicPlayerPageViewModel.cs

* Update src/Plugin.Maui.Audio/AudioPlayer.android.cs

* Update src/Plugin.Maui.Audio/AudioPlayer.net.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Shaun Lawrence <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>

* Update README with Speed related properties (#38)

* Update README.md

* Update README.md

* Windows and Android recording tested.  iOS not yet tested.

* Add NSMicrophoneUsageDescription to Info.plist

* loosen permission on mic for MacCatalyst

* implemented LastDuration for recorder

* try to get player to play again but CollectionView will not take 2nd click

* duration working for both recorder and player

* <ProvisioningType>automatic</ProvisioningType>

* removed all warnings by dealing with nullability

* build nuget package

* Fix funky formatting and remove unnecessary audio player bits

* Removed unnecessary recording bits

* A bit more tidy up

* Recorder page shows the time recording

* Smoother audio recording experience on macOS

* Recommended way to check for permissions

* Make Android non blocking on StartAsync

* XML comments and further tidy up

* Fix windows compilation errors

* Revert "Merge branch 'main' into pr/39"

This reverts commit 415a6bd, reversing
changes made to 2d00bbc.

* Remove auto added bits

* Apply suggestions from code review

Co-authored-by: Gerald Versluis <[email protected]>

* Some docs

---------

Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Shaun Lawrence <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>

* Merge Speed functionality

* Update CI

* Revert "Update CI"

This reverts commit de9e99a.

* Update CI

* Update AudioPlayer.android.cs

* Apply suggestions from code review

---------

Co-authored-by: charles david young <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Johan Svensson <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
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.

2 participants