capacitor-plugin-playlist 0.6.2 → 0.7.0
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.
- package/CapacitorPluginPlaylist.podspec +1 -1
- package/README.md +9 -0
- package/android/build.gradle +11 -11
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +13 -9
- package/android/gradlew.bat +12 -10
- package/android/src/main/java/org/dwbn/plugins/playlist/PlaylistPlugin.kt +4 -5
- package/dist/docs.json +487 -66
- package/dist/esm/web.d.ts +2 -0
- package/dist/esm/web.js +43 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +43 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +43 -2
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin.xcodeproj/project.pbxproj +4 -4
- package/ios/Podfile +1 -1
- package/package.json +16 -16
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target
|
|
14
|
+
s.ios.deployment_target = '14.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.3'
|
|
17
17
|
end
|
package/README.md
CHANGED
|
@@ -120,6 +120,15 @@ await Playlist.setOptions({
|
|
|
120
120
|
});
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
In Adnroid Studio, you can simply right-click on `res` folder and choose `New > Image Asset`:
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
And you must select type: `Notification Icons` and choose your icon, click `Next` to save it.
|
|
128
|
+
|
|
129
|
+

|
|
130
|
+
|
|
131
|
+
|
|
123
132
|
## 4. Usage
|
|
124
133
|
|
|
125
134
|
Be sure to check out the examples folder, where you can find an Angular10/Ionic5 implementation of the Capacitor plugin.
|
package/android/build.gradle
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1
|
|
4
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
3
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
4
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
buildscript {
|
|
8
|
-
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.
|
|
8
|
+
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.25'
|
|
9
9
|
repositories {
|
|
10
10
|
google()
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:8.2
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
15
15
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -21,10 +21,10 @@ apply plugin: 'kotlin-android'
|
|
|
21
21
|
|
|
22
22
|
android {
|
|
23
23
|
namespace "org.dwbn.plugins.playlist"
|
|
24
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
24
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
25
25
|
defaultConfig {
|
|
26
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
27
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
26
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
27
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
28
28
|
versionCode 1
|
|
29
29
|
versionName "1.0"
|
|
30
30
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -39,8 +39,8 @@ android {
|
|
|
39
39
|
abortOnError false
|
|
40
40
|
}
|
|
41
41
|
compileOptions {
|
|
42
|
-
sourceCompatibility JavaVersion.
|
|
43
|
-
targetCompatibility JavaVersion.
|
|
42
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
43
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
44
44
|
}
|
|
45
45
|
kotlinOptions {
|
|
46
46
|
jvmTarget = '17'
|
|
@@ -67,8 +67,8 @@ dependencies {
|
|
|
67
67
|
implementation 'com.devbrackets.android:exomedia:5.1.0'
|
|
68
68
|
|
|
69
69
|
// Image Loading
|
|
70
|
-
implementation 'com.github.bumptech.glide:glide:4.
|
|
71
|
-
annotationProcessor 'com.github.bumptech.glide:compiler:4.
|
|
70
|
+
implementation 'com.github.bumptech.glide:glide:4.16.0'
|
|
71
|
+
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
|
72
72
|
|
|
73
73
|
// Playlist support
|
|
74
74
|
implementation 'com.devbrackets.android:playlistcore:2.2.0'
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/android/gradlew
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
#
|
|
18
20
|
|
|
19
21
|
##############################################################################
|
|
20
22
|
#
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
# Darwin, MinGW, and NonStop.
|
|
56
58
|
#
|
|
57
59
|
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/HEAD/
|
|
60
|
+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
61
|
# within the Gradle project.
|
|
60
62
|
#
|
|
61
63
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -83,7 +85,9 @@ done
|
|
|
83
85
|
# This is normally unused
|
|
84
86
|
# shellcheck disable=SC2034
|
|
85
87
|
APP_BASE_NAME=${0##*/}
|
|
86
|
-
|
|
88
|
+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
+
' "$PWD" ) || exit
|
|
87
91
|
|
|
88
92
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
89
93
|
MAX_FD=maximum
|
|
@@ -144,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
144
148
|
case $MAX_FD in #(
|
|
145
149
|
max*)
|
|
146
150
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
147
|
-
# shellcheck disable=SC3045
|
|
151
|
+
# shellcheck disable=SC2039,SC3045
|
|
148
152
|
MAX_FD=$( ulimit -H -n ) ||
|
|
149
153
|
warn "Could not query maximum file descriptor limit"
|
|
150
154
|
esac
|
|
@@ -152,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
152
156
|
'' | soft) :;; #(
|
|
153
157
|
*)
|
|
154
158
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
155
|
-
# shellcheck disable=SC3045
|
|
159
|
+
# shellcheck disable=SC2039,SC3045
|
|
156
160
|
ulimit -n "$MAX_FD" ||
|
|
157
161
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
158
162
|
esac
|
|
@@ -201,11 +205,11 @@ fi
|
|
|
201
205
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
202
206
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
203
207
|
|
|
204
|
-
# Collect all arguments for the java command
|
|
205
|
-
# *
|
|
206
|
-
#
|
|
207
|
-
#
|
|
208
|
-
#
|
|
208
|
+
# Collect all arguments for the java command:
|
|
209
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
210
|
+
# and any embedded shellness will be escaped.
|
|
211
|
+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
212
|
+
# treated as '${Hostname}' itself on the command line.
|
|
209
213
|
|
|
210
214
|
set -- \
|
|
211
215
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
package/android/gradlew.bat
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
@rem See the License for the specific language governing permissions and
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
@rem
|
|
16
18
|
|
|
17
19
|
@if "%DEBUG%"=="" @echo off
|
|
18
20
|
@rem ##########################################################################
|
|
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
|
|
43
45
|
%JAVA_EXE% -version >NUL 2>&1
|
|
44
46
|
if %ERRORLEVEL% equ 0 goto execute
|
|
45
47
|
|
|
46
|
-
echo.
|
|
47
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
48
|
-
echo.
|
|
49
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
50
|
-
echo location of your Java installation.
|
|
48
|
+
echo. 1>&2
|
|
49
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
50
|
+
echo. 1>&2
|
|
51
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
52
|
+
echo location of your Java installation. 1>&2
|
|
51
53
|
|
|
52
54
|
goto fail
|
|
53
55
|
|
|
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
57
59
|
|
|
58
60
|
if exist "%JAVA_EXE%" goto execute
|
|
59
61
|
|
|
60
|
-
echo.
|
|
61
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
62
|
-
echo.
|
|
63
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
64
|
-
echo location of your Java installation.
|
|
62
|
+
echo. 1>&2
|
|
63
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
64
|
+
echo. 1>&2
|
|
65
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
66
|
+
echo location of your Java installation. 1>&2
|
|
65
67
|
|
|
66
68
|
goto fail
|
|
67
69
|
|
|
@@ -66,10 +66,10 @@ class PlaylistPlugin : Plugin(), OnStatusReportListener {
|
|
|
66
66
|
|
|
67
67
|
@PluginMethod
|
|
68
68
|
fun setPlaylistItems(call: PluginCall) {
|
|
69
|
+
val items: JSArray = call.getArray("items")
|
|
70
|
+
val optionsArgs: JSONObject = call.getObject("options")
|
|
71
|
+
val options = PlaylistItemOptions(optionsArgs)
|
|
69
72
|
Handler(Looper.getMainLooper()).post {
|
|
70
|
-
val items: JSArray = call.getArray("items")
|
|
71
|
-
val optionsArgs: JSONObject = call.getObject("options")
|
|
72
|
-
val options = PlaylistItemOptions(optionsArgs)
|
|
73
73
|
|
|
74
74
|
val trackItems: ArrayList<AudioTrack> = getTrackItems(items)
|
|
75
75
|
audioPlayerImpl!!.playlistManager.setAllItems(trackItems, options)
|
|
@@ -84,9 +84,8 @@ class PlaylistPlugin : Plugin(), OnStatusReportListener {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
call.resolve()
|
|
87
|
-
|
|
88
|
-
Log.i(TAG, "setPlaylistItems" + items.length().toString())
|
|
89
87
|
}
|
|
88
|
+
Log.i(TAG, "setPlaylistItems: " + items.toString())
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
@PluginMethod
|