-
Notifications
You must be signed in to change notification settings - Fork 67
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 isPlaying method #51
feat: Add isPlaying method #51
Conversation
@@ -175,6 +175,17 @@ public class NativeAudio: CAPPlugin { | |||
audioAsset.setVolume(volume: volume as NSNumber) | |||
call.success() | |||
} | |||
|
|||
@objc func isPlaying(_ call: CAPPluginCall) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add definition in Plugin.m file for new method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did as you asked. Thanks for your comment.
any plan to release isPlaying ? |
ios/Plugin/AudioAsset.swift
Outdated
|
||
func isPlaying() -> Bool { | ||
if channels.count != 1 { | ||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here it should be return false
else it will through the error as it expect return type should be of Boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, appreciate it
No description provided.