Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit 91d097e

Browse files
committed
Add new API features for Cordova Native Audio plugin.
1 parent 5809fe4 commit 91d097e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/plugins/nativeAudio.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ angular.module('ngCordova.plugins.nativeAudio', [])
3434
return q.promise;
3535
},
3636

37-
play: function (id) {
37+
play: function (id, completeCallback) {
3838
var q = $q.defer();
39-
window.plugins.NativeAudio.play(id,
39+
window.plugins.NativeAudio.play(id, completeCallback,
4040
function (result) {
4141
q.resolve(result)
4242
},
@@ -86,6 +86,20 @@ angular.module('ngCordova.plugins.nativeAudio', [])
8686
}
8787
);
8888

89+
return q.promise;
90+
},
91+
92+
setVolumeForComplexAsset: function (id, volume) {
93+
var q = $q.defer();
94+
window.plugins.NativeAudio.setVolumeForComplexAsset(id, volume,
95+
function (result) {
96+
q.resolve(result)
97+
},
98+
function (err) {
99+
q.reject(err);
100+
}
101+
);
102+
89103
return q.promise;
90104
}
91105
}

0 commit comments

Comments
 (0)