@capgo/capacitor-jw-player 0.0.1
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/CapgoCapacitorJwPlayer.podspec +18 -0
- package/Package.swift +30 -0
- package/README.md +493 -0
- package/android/build.gradle +83 -0
- package/android/src/main/AndroidManifest.xml +37 -0
- package/android/src/main/java/ee/forgr/capacitor_jw_player/JwPlayerPlugin.java +529 -0
- package/android/src/main/java/ee/forgr/capacitor_jw_player/PlayerActivity.java +469 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/drawable/close_button_background.xml +5 -0
- package/android/src/main/res/layout/activity_player.xml +28 -0
- package/android/src/main/res/values/colors.xml +16 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/styles.xml +32 -0
- package/dist/docs.json +459 -0
- package/dist/esm/definitions.d.ts +156 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +57 -0
- package/dist/esm/web.js +65 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +79 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +82 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/JwPlayerPlugin/JwPlayer.swift +24 -0
- package/ios/Sources/JwPlayerPlugin/JwPlayerPlugin.swift +749 -0
- package/ios/Sources/JwPlayerPlugin/LinkedList.swift +219 -0
- package/ios/Sources/JwPlayerPlugin/VideosToPlay.swift +56 -0
- package/ios/Tests/JwPlayerPluginTests/JwPlayerPluginTests.swift +15 -0
- package/package.json +80 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { JwPlayerPlugin } from './definitions';
|
|
3
|
+
export declare class JwPlayerWeb extends WebPlugin implements JwPlayerPlugin {
|
|
4
|
+
initialize(options: {
|
|
5
|
+
licenseKey: string;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
play(_options: {
|
|
8
|
+
mediaUrl: string;
|
|
9
|
+
mediaType: 'video' | 'playlist';
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
pause(): Promise<void>;
|
|
12
|
+
stop(): Promise<void>;
|
|
13
|
+
seekTo(_options: {
|
|
14
|
+
time: number;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
setVolume(_options: {
|
|
17
|
+
volume: number;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
getPosition(): Promise<{
|
|
20
|
+
position: number;
|
|
21
|
+
}>;
|
|
22
|
+
getState(): Promise<{
|
|
23
|
+
state: number;
|
|
24
|
+
}>;
|
|
25
|
+
setSpeed(_options: {
|
|
26
|
+
speed: number;
|
|
27
|
+
}): Promise<void>;
|
|
28
|
+
setPlaylistIndex(_options: {
|
|
29
|
+
index: number;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
loadPlaylist(_options: {
|
|
32
|
+
playlistUrl: string;
|
|
33
|
+
}): Promise<void>;
|
|
34
|
+
loadPlaylistWithItems(_options: {
|
|
35
|
+
playlist: any[];
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
getAudioTracks(): Promise<{
|
|
38
|
+
tracks: any[];
|
|
39
|
+
}>;
|
|
40
|
+
getCurrentAudioTrack(): Promise<{
|
|
41
|
+
index: number;
|
|
42
|
+
}>;
|
|
43
|
+
setCurrentAudioTrack(_options: {
|
|
44
|
+
index: number;
|
|
45
|
+
}): Promise<void>;
|
|
46
|
+
getCaptions(): Promise<{
|
|
47
|
+
captions: any[];
|
|
48
|
+
}>;
|
|
49
|
+
getCurrentCaptions(): Promise<{
|
|
50
|
+
index: number;
|
|
51
|
+
}>;
|
|
52
|
+
setCurrentCaptions(_options: {
|
|
53
|
+
index: number;
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
currentPlaylist(): Promise<any>;
|
|
56
|
+
resume(): Promise<void>;
|
|
57
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class JwPlayerWeb extends WebPlugin {
|
|
3
|
+
async initialize(options) {
|
|
4
|
+
console.log('INITIALIZE', options);
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
async play(_options) {
|
|
8
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
9
|
+
}
|
|
10
|
+
async pause() {
|
|
11
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
12
|
+
}
|
|
13
|
+
async stop() {
|
|
14
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
15
|
+
}
|
|
16
|
+
async seekTo(_options) {
|
|
17
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
18
|
+
}
|
|
19
|
+
async setVolume(_options) {
|
|
20
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
21
|
+
}
|
|
22
|
+
async getPosition() {
|
|
23
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
24
|
+
}
|
|
25
|
+
async getState() {
|
|
26
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
27
|
+
}
|
|
28
|
+
async setSpeed(_options) {
|
|
29
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
30
|
+
}
|
|
31
|
+
async setPlaylistIndex(_options) {
|
|
32
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
33
|
+
}
|
|
34
|
+
async loadPlaylist(_options) {
|
|
35
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
36
|
+
}
|
|
37
|
+
async loadPlaylistWithItems(_options) {
|
|
38
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
39
|
+
}
|
|
40
|
+
async getAudioTracks() {
|
|
41
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
42
|
+
}
|
|
43
|
+
async getCurrentAudioTrack() {
|
|
44
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
45
|
+
}
|
|
46
|
+
async setCurrentAudioTrack(_options) {
|
|
47
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
48
|
+
}
|
|
49
|
+
async getCaptions() {
|
|
50
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
51
|
+
}
|
|
52
|
+
async getCurrentCaptions() {
|
|
53
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
54
|
+
}
|
|
55
|
+
async setCurrentCaptions(_options) {
|
|
56
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
57
|
+
}
|
|
58
|
+
async currentPlaylist() {
|
|
59
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
60
|
+
}
|
|
61
|
+
async resume() {
|
|
62
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC,KAAK,CAAC,UAAU,CAAC,OAA+B;QAC9C,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,OAAO;IACT,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAgE;QACzE,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAA0B;QACrC,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC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C,QAA2B;QAClD,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,MAAM;QACV,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { JwPlayerPlugin } from './definitions';\n\nexport class JwPlayerWeb extends WebPlugin implements JwPlayerPlugin {\n async initialize(options: { licenseKey: string }): Promise<void> {\n console.log('INITIALIZE', options);\n return;\n }\n\n async play(_options: { mediaUrl: string; mediaType: 'video' | 'playlist'; }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async pause(): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async stop(): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async seekTo(_options: { time: number }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async setVolume(_options: { volume: number }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async getPosition(): Promise<{ position: number }> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async getState(): Promise<{ state: number }> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async setSpeed(_options: { speed: number }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async setPlaylistIndex(_options: { index: number }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async loadPlaylist(_options: { playlistUrl: string }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async loadPlaylistWithItems(_options: { playlist: any[] }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async getAudioTracks(): Promise<{ tracks: any[] }> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async getCurrentAudioTrack(): Promise<{ index: number }> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async setCurrentAudioTrack(_options: { index: number }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async getCaptions(): Promise<{ captions: any[] }> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async getCurrentCaptions(): Promise<{ index: number }> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async setCurrentCaptions(_options: { index: number }): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async currentPlaylist(): Promise<any> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n\n async resume(): Promise<void> {\n throw this.unimplemented('JW Player is not available in web.');\n }\n}\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
const JwPlayer = core.registerPlugin('JwPlayer', {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.JwPlayerWeb()),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
class JwPlayerWeb extends core.WebPlugin {
|
|
10
|
+
async initialize(options) {
|
|
11
|
+
console.log('INITIALIZE', options);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
async play(_options) {
|
|
15
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
16
|
+
}
|
|
17
|
+
async pause() {
|
|
18
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
19
|
+
}
|
|
20
|
+
async stop() {
|
|
21
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
22
|
+
}
|
|
23
|
+
async seekTo(_options) {
|
|
24
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
25
|
+
}
|
|
26
|
+
async setVolume(_options) {
|
|
27
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
28
|
+
}
|
|
29
|
+
async getPosition() {
|
|
30
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
31
|
+
}
|
|
32
|
+
async getState() {
|
|
33
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
34
|
+
}
|
|
35
|
+
async setSpeed(_options) {
|
|
36
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
37
|
+
}
|
|
38
|
+
async setPlaylistIndex(_options) {
|
|
39
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
40
|
+
}
|
|
41
|
+
async loadPlaylist(_options) {
|
|
42
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
43
|
+
}
|
|
44
|
+
async loadPlaylistWithItems(_options) {
|
|
45
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
46
|
+
}
|
|
47
|
+
async getAudioTracks() {
|
|
48
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
49
|
+
}
|
|
50
|
+
async getCurrentAudioTrack() {
|
|
51
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
52
|
+
}
|
|
53
|
+
async setCurrentAudioTrack(_options) {
|
|
54
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
55
|
+
}
|
|
56
|
+
async getCaptions() {
|
|
57
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
58
|
+
}
|
|
59
|
+
async getCurrentCaptions() {
|
|
60
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
61
|
+
}
|
|
62
|
+
async setCurrentCaptions(_options) {
|
|
63
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
64
|
+
}
|
|
65
|
+
async currentPlaylist() {
|
|
66
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
67
|
+
}
|
|
68
|
+
async resume() {
|
|
69
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
74
|
+
__proto__: null,
|
|
75
|
+
JwPlayerWeb: JwPlayerWeb
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
exports.JwPlayer = JwPlayer;
|
|
79
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst JwPlayer = registerPlugin('JwPlayer', {\n web: () => import('./web').then((m) => new m.JwPlayerWeb()),\n});\nexport * from './definitions';\nexport { JwPlayer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class JwPlayerWeb extends WebPlugin {\n async initialize(options) {\n console.log('INITIALIZE', options);\n return;\n }\n async play(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async pause() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async stop() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async seekTo(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setVolume(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getPosition() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getState() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setSpeed(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setPlaylistIndex(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async loadPlaylist(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async loadPlaylistWithItems(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getAudioTracks() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCurrentAudioTrack() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setCurrentAudioTrack(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCaptions() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCurrentCaptions() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setCurrentCaptions(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async currentPlaylist() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async resume() {\n throw this.unimplemented('JW Player is not available in web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core.registerPlugin('JwPlayer', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.JwPlayerWeb()),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
class JwPlayerWeb extends core.WebPlugin {
|
|
9
|
+
async initialize(options) {
|
|
10
|
+
console.log('INITIALIZE', options);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
async play(_options) {
|
|
14
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
15
|
+
}
|
|
16
|
+
async pause() {
|
|
17
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
18
|
+
}
|
|
19
|
+
async stop() {
|
|
20
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
21
|
+
}
|
|
22
|
+
async seekTo(_options) {
|
|
23
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
24
|
+
}
|
|
25
|
+
async setVolume(_options) {
|
|
26
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
27
|
+
}
|
|
28
|
+
async getPosition() {
|
|
29
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
30
|
+
}
|
|
31
|
+
async getState() {
|
|
32
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
33
|
+
}
|
|
34
|
+
async setSpeed(_options) {
|
|
35
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
36
|
+
}
|
|
37
|
+
async setPlaylistIndex(_options) {
|
|
38
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
39
|
+
}
|
|
40
|
+
async loadPlaylist(_options) {
|
|
41
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
42
|
+
}
|
|
43
|
+
async loadPlaylistWithItems(_options) {
|
|
44
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
45
|
+
}
|
|
46
|
+
async getAudioTracks() {
|
|
47
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
48
|
+
}
|
|
49
|
+
async getCurrentAudioTrack() {
|
|
50
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
51
|
+
}
|
|
52
|
+
async setCurrentAudioTrack(_options) {
|
|
53
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
54
|
+
}
|
|
55
|
+
async getCaptions() {
|
|
56
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
57
|
+
}
|
|
58
|
+
async getCurrentCaptions() {
|
|
59
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
60
|
+
}
|
|
61
|
+
async setCurrentCaptions(_options) {
|
|
62
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
63
|
+
}
|
|
64
|
+
async currentPlaylist() {
|
|
65
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
66
|
+
}
|
|
67
|
+
async resume() {
|
|
68
|
+
throw this.unimplemented('JW Player is not available in web.');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
73
|
+
__proto__: null,
|
|
74
|
+
JwPlayerWeb: JwPlayerWeb
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
exports.JwPlayer = JwPlayer;
|
|
78
|
+
|
|
79
|
+
return exports;
|
|
80
|
+
|
|
81
|
+
})({}, capacitorExports);
|
|
82
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst JwPlayer = registerPlugin('JwPlayer', {\n web: () => import('./web').then((m) => new m.JwPlayerWeb()),\n});\nexport * from './definitions';\nexport { JwPlayer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class JwPlayerWeb extends WebPlugin {\n async initialize(options) {\n console.log('INITIALIZE', options);\n return;\n }\n async play(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async pause() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async stop() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async seekTo(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setVolume(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getPosition() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getState() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setSpeed(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setPlaylistIndex(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async loadPlaylist(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async loadPlaylistWithItems(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getAudioTracks() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCurrentAudioTrack() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setCurrentAudioTrack(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCaptions() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCurrentCaptions() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setCurrentCaptions(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async currentPlaylist() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async resume() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;IAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;;ICFM,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC;IAC1C,QAAQ;IACR;IACA,IAAI,MAAM,IAAI,CAAC,QAAQ,EAAE;IACzB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCA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I,MAAM,oBAAoB,CAAC,QAAQ,EAAE;IACzC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;IACtE;IACA,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;IACtE;IACA,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;IACtE;IACA,IAAI,MAAM,kBAAkB,CAAC,QAAQ,EAAE;IACvC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;IACtE;IACA,IAAI,MAAM,eAAe,GAAG;IAC5B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;IACtE;IACA,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;IACtE;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc public class JwPlayer: NSObject {
|
|
5
|
+
@objc public func initialize(_ call: CAPPluginCall) -> String {
|
|
6
|
+
return "initialized"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@objc public func play(_ call: CAPPluginCall) -> String {
|
|
10
|
+
return "playing"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@objc public func pause(_ call: CAPPluginCall) -> String {
|
|
14
|
+
return "paused"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@objc public func stop(_ call: CAPPluginCall) -> String {
|
|
18
|
+
return "stopped"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@objc public func seekTo(_ call: CAPPluginCall) -> String {
|
|
22
|
+
return "seeked"
|
|
23
|
+
}
|
|
24
|
+
}
|