capacitor-plugin-playlist 0.1.21 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +0,0 @@
1
- package org.dwbn.plugins.playlist;
2
-
3
- import org.json.*;
4
- import android.util.Log;
5
-
6
- import com.getcapacitor.JSObject;
7
-
8
- public class OnStatusCallback{
9
-
10
- private static final String TAG = "OnStatusCallback";
11
-
12
- private PlaylistPlugin plugin;
13
- OnStatusCallback(PlaylistPlugin plugin) {
14
- this.plugin = plugin;
15
- }
16
-
17
- public static JSONObject createErrorWithCode(RmxAudioErrorType code, String message) {
18
- JSONObject error = new JSONObject();
19
- try {
20
- error.put("code", code);
21
- error.put("message", message != null ? message : "");
22
- } catch (JSONException e) {
23
- Log.e(TAG, "Exception while raising onStatus: ", e);
24
- }
25
- return error;
26
- }
27
-
28
- public void onStatus(RmxAudioStatusMessage what, String trackId, JSONObject param) {
29
-
30
- JSObject data = new JSObject();
31
- JSObject detail = new JSObject();
32
-
33
- detail.put("msgType", what.getValue());
34
- detail.put("trackId", trackId);
35
- detail.put("value", param);
36
-
37
- data.put("action", "status");
38
- data.put("status", detail);
39
-
40
- Log.v(TAG, "statusChanged:" + data.toString());
41
-
42
- this.plugin.emit("status", data);
43
- }
44
-
45
- }