Skip to content

Commit

Permalink
feat!: capacitor 6
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Apr 30, 2024
1 parent b202af7 commit 665ed19
Show file tree
Hide file tree
Showing 17 changed files with 1,268 additions and 4,893 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

78 changes: 39 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ npx cap sync
* [`getQuality()`](#getquality)
* [`getQualities()`](#getqualities)
* [`getPluginVersion()`](#getpluginversion)
* [`addListener('startPip', ...)`](#addlistenerstartpip)
* [`addListener('stopPip', ...)`](#addlistenerstoppip)
* [`addListener('expandPip', ...)`](#addlistenerexpandpip)
* [`addListener('closePip', ...)`](#addlistenerclosepip)
* [`addListener('onState', ...)`](#addlisteneronstate)
* [`addListener('onCues', ...)`](#addlisteneroncues)
* [`addListener('onDuration', ...)`](#addlisteneronduration)
* [`addListener('onError', ...)`](#addlisteneronerror)
* [`addListener('onRebuffering', ...)`](#addlisteneronrebuffering)
* [`addListener('onSeekCompleted', ...)`](#addlisteneronseekcompleted)
* [`addListener('onVideoSize', ...)`](#addlisteneronvideosize)
* [`addListener('onQuality', ...)`](#addlisteneronquality)
* [`addListener('onCastStatus', ...)`](#addlisteneroncaststatus)
* [`addListener('startPip', ...)`](#addlistenerstartpip-)
* [`addListener('stopPip', ...)`](#addlistenerstoppip-)
* [`addListener('expandPip', ...)`](#addlistenerexpandpip-)
* [`addListener('closePip', ...)`](#addlistenerclosepip-)
* [`addListener('onState', ...)`](#addlisteneronstate-)
* [`addListener('onCues', ...)`](#addlisteneroncues-)
* [`addListener('onDuration', ...)`](#addlisteneronduration-)
* [`addListener('onError', ...)`](#addlisteneronerror-)
* [`addListener('onRebuffering', ...)`](#addlisteneronrebuffering-)
* [`addListener('onSeekCompleted', ...)`](#addlisteneronseekcompleted-)
* [`addListener('onVideoSize', ...)`](#addlisteneronvideosize-)
* [`addListener('onQuality', ...)`](#addlisteneronquality-)
* [`addListener('onCastStatus', ...)`](#addlisteneroncaststatus-)
* [`removeAllListeners()`](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
Expand Down Expand Up @@ -346,7 +346,7 @@ Get the native Capacitor plugin version
### addListener('startPip', ...)

```typescript
addListener(eventName: "startPip", listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "startPip", listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Listen for start pip
Expand All @@ -356,7 +356,7 @@ Listen for start pip
| **`eventName`** | <code>'startPip'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -366,7 +366,7 @@ Listen for start pip
### addListener('stopPip', ...)

```typescript
addListener(eventName: "stopPip", listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "stopPip", listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Listen for stop pip
Expand All @@ -376,7 +376,7 @@ Listen for stop pip
| **`eventName`** | <code>'stopPip'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -386,7 +386,7 @@ Listen for stop pip
### addListener('expandPip', ...)

```typescript
addListener(eventName: "expandPip", listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "expandPip", listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Listen for expend pip
Expand All @@ -396,7 +396,7 @@ Listen for expend pip
| **`eventName`** | <code>'expandPip'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -406,7 +406,7 @@ Listen for expend pip
### addListener('closePip', ...)

```typescript
addListener(eventName: "closePip", listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "closePip", listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Listen for close pip
Expand All @@ -416,7 +416,7 @@ Listen for close pip
| **`eventName`** | <code>'closePip'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -426,7 +426,7 @@ Listen for close pip
### addListener('onState', ...)

```typescript
addListener(eventName: "onState", listenerFunc: (data: { state: CapacitorIvsPlayerState; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onState", listenerFunc: (data: { state: CapacitorIvsPlayerState; }) => void) => Promise<PluginListenerHandle>
```

Listen for state changes
Expand All @@ -436,7 +436,7 @@ Listen for state changes
| **`eventName`** | <code>'onState'</code> |
| **`listenerFunc`** | <code>(data: { state: <a href="#capacitorivsplayerstate">CapacitorIvsPlayerState</a>; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -446,7 +446,7 @@ Listen for state changes
### addListener('onCues', ...)

```typescript
addListener(eventName: "onCues", listenerFunc: (data: { cues: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onCues", listenerFunc: (data: { cues: string; }) => void) => Promise<PluginListenerHandle>
```

Listen for cue changes
Expand All @@ -456,7 +456,7 @@ Listen for cue changes
| **`eventName`** | <code>'onCues'</code> |
| **`listenerFunc`** | <code>(data: { cues: string; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -466,7 +466,7 @@ Listen for cue changes
### addListener('onDuration', ...)

```typescript
addListener(eventName: "onDuration", listenerFunc: (data: { duration: number; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onDuration", listenerFunc: (data: { duration: number; }) => void) => Promise<PluginListenerHandle>
```

Listen for duration changes
Expand All @@ -476,7 +476,7 @@ Listen for duration changes
| **`eventName`** | <code>'onDuration'</code> |
| **`listenerFunc`** | <code>(data: { duration: number; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -486,7 +486,7 @@ Listen for duration changes
### addListener('onError', ...)

```typescript
addListener(eventName: "onError", listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onError", listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle>
```

Listen for errors
Expand All @@ -496,7 +496,7 @@ Listen for errors
| **`eventName`** | <code>'onError'</code> |
| **`listenerFunc`** | <code>(data: { error: string; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -506,7 +506,7 @@ Listen for errors
### addListener('onRebuffering', ...)

```typescript
addListener(eventName: "onRebuffering", listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onRebuffering", listenerFunc: () => void) => Promise<PluginListenerHandle>
```

Listen for rebuffering
Expand All @@ -516,7 +516,7 @@ Listen for rebuffering
| **`eventName`** | <code>'onRebuffering'</code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -526,7 +526,7 @@ Listen for rebuffering
### addListener('onSeekCompleted', ...)

```typescript
addListener(eventName: "onSeekCompleted", listenerFunc: (data: { position: number; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onSeekCompleted", listenerFunc: (data: { position: number; }) => void) => Promise<PluginListenerHandle>
```

Listen for position changes
Expand All @@ -536,7 +536,7 @@ Listen for position changes
| **`eventName`** | <code>'onSeekCompleted'</code> |
| **`listenerFunc`** | <code>(data: { position: number; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -546,7 +546,7 @@ Listen for position changes
### addListener('onVideoSize', ...)

```typescript
addListener(eventName: "onVideoSize", listenerFunc: (data: { width: number; height: number; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onVideoSize", listenerFunc: (data: { width: number; height: number; }) => void) => Promise<PluginListenerHandle>
```

Listen for video size changes
Expand All @@ -556,7 +556,7 @@ Listen for video size changes
| **`eventName`** | <code>'onVideoSize'</code> |
| **`listenerFunc`** | <code>(data: { width: number; height: number; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -566,7 +566,7 @@ Listen for video size changes
### addListener('onQuality', ...)

```typescript
addListener(eventName: "onQuality", listenerFunc: (data: { quality: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onQuality", listenerFunc: (data: { quality: string; }) => void) => Promise<PluginListenerHandle>
```

Listen for quality changes
Expand All @@ -576,7 +576,7 @@ Listen for quality changes
| **`eventName`** | <code>'onQuality'</code> |
| **`listenerFunc`** | <code>(data: { quality: string; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand All @@ -586,7 +586,7 @@ Listen for quality changes
### addListener('onCastStatus', ...)

```typescript
addListener(eventName: "onCastStatus", listenerFunc: (data: { isActive: boolean; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: "onCastStatus", listenerFunc: (data: { isActive: boolean; }) => void) => Promise<PluginListenerHandle>
```

Listen for cast status changes
Expand All @@ -596,7 +596,7 @@ Listen for cast status changes
| **`eventName`** | <code>'onCastStatus'</code> |
| **`listenerFunc`** | <code>(data: { isActive: boolean; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

**Since:** 1.0.0

Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.android.tools.build:gradle:8.2.1'
}
}

apply plugin: 'com.android.library'

android {
namespace "ee.forgr.ivsplayer"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry
.getInstrumentation()
Context appContext = InstrumentationRegistry.getInstrumentation()
.getTargetContext();

assertEquals("com.getcapacitor.android", appContext.getPackageName());
Expand Down
Loading

0 comments on commit 665ed19

Please sign in to comment.