capacitor-plugin-playlist 0.6.1 → 0.6.2

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.
@@ -47,9 +47,11 @@ class PlaylistPlugin : Plugin(), OnStatusReportListener {
47
47
 
48
48
  @PluginMethod
49
49
  fun release(call: PluginCall) {
50
- destroyResources()
51
- call.resolve()
52
- Log.i(TAG,"released")
50
+ Handler(Looper.getMainLooper()).post {
51
+ destroyResources()
52
+ call.resolve()
53
+ Log.i(TAG, "released")
54
+ }
53
55
  }
54
56
 
55
57
  @PluginMethod
@@ -1,3 +1,4 @@
1
+
1
2
  package org.dwbn.plugins.playlist.playlist
2
3
 
3
4
  import android.content.Context
@@ -6,8 +7,10 @@ import android.net.Uri
6
7
  import android.os.PowerManager
7
8
  import androidx.annotation.FloatRange
8
9
  import androidx.annotation.IntRange
10
+ import androidx.annotation.OptIn
9
11
  import androidx.media3.common.AudioAttributes
10
12
  import androidx.media3.common.C
13
+ import androidx.media3.common.util.UnstableApi
11
14
  import androidx.media3.exoplayer.util.EventLogger
12
15
  import com.devbrackets.android.exomedia.AudioPlayer
13
16
  import com.devbrackets.android.exomedia.listener.OnErrorListener
@@ -16,6 +19,7 @@ import org.dwbn.plugins.playlist.data.AudioTrack
16
19
  import java.lang.ref.WeakReference
17
20
  import java.util.concurrent.locks.ReentrantLock
18
21
 
22
+ @OptIn(UnstableApi::class)
19
23
  class AudioApi(context: Context) : BaseMediaApi() {
20
24
  private val audioPlayer: AudioPlayer = AudioPlayer(context.applicationContext)
21
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-plugin-playlist",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Playlist ",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",