Skip to content

Commit

Permalink
chore: remove configure definition
Browse files Browse the repository at this point in the history
  • Loading branch information
priyankpat committed Jul 7, 2020
1 parent 20b80f6 commit dbe6f26
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
13 changes: 6 additions & 7 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ declare module "@capacitor/core" {
}

export interface NativeAudioPlugin {
configure(options: ConfigureOptions): Promise<void>;
preloadSimple(options: PreloadSimpleOptions): Promise<void>;
preloadComplex(options: PreloadComplexOptions): Promise<void>;
play(options: { assetId: string; }): Promise<void>;
loop(options: { assetId: string; }): Promise<void>;
stop(options: { assetId: string; }): Promise<void>;
unload(options: { assetId: string; }): Promise<void>;
setVolume(options: { assetId: string; volume: number; }): Promise<void>;
play(options: { assetId: string }): Promise<void>;
loop(options: { assetId: string }): Promise<void>;
stop(options: { assetId: string }): Promise<void>;
unload(options: { assetId: string }): Promise<void>;
setVolume(options: { assetId: string; volume: number }): Promise<void>;
}

export interface ConfigureOptions {
Expand All @@ -30,4 +29,4 @@ export interface PreloadComplexOptions {
volume?: number;
audioChannelNum?: number;
fade?: boolean;
}
}
29 changes: 15 additions & 14 deletions src/web.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { WebPlugin } from '@capacitor/core';
import { NativeAudioPlugin, ConfigureOptions, PreloadSimpleOptions, PreloadComplexOptions } from './definitions';
import { WebPlugin } from "@capacitor/core";
import {
NativeAudioPlugin,
ConfigureOptions,
PreloadSimpleOptions,
PreloadComplexOptions,
} from "./definitions";

export class NativeAudioWeb extends WebPlugin implements NativeAudioPlugin {
constructor() {
super({
name: 'NativeAudio',
platforms: ['web']
name: "NativeAudio",
platforms: ["web"],
});
}
configure(options: ConfigureOptions): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
}
preloadSimple(options: PreloadSimpleOptions): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
Expand All @@ -20,23 +21,23 @@ export class NativeAudioWeb extends WebPlugin implements NativeAudioPlugin {
console.log(options);
throw new Error("Method not implemented.");
}
play(options: { assetId: string; }): Promise<void> {
play(options: { assetId: string }): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
}
loop(options: { assetId: string; }): Promise<void> {
loop(options: { assetId: string }): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
}
stop(options: { assetId: string; }): Promise<void> {
stop(options: { assetId: string }): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
}
unload(options: { assetId: string; }): Promise<void> {
unload(options: { assetId: string }): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
}
setVolume(options: { assetId: string; }): Promise<void> {
setVolume(options: { assetId: string }): Promise<void> {
console.log(options);
throw new Error("Method not implemented.");
}
Expand All @@ -46,5 +47,5 @@ const NativeAudio = new NativeAudioWeb();

export { NativeAudio };

import { registerWebPlugin } from '@capacitor/core';
import { registerWebPlugin } from "@capacitor/core";
registerWebPlugin(NativeAudio);

0 comments on commit dbe6f26

Please sign in to comment.