Skip to content

Commit 659216d

Browse files
Merge pull request VoiceThread#6 from VoiceThread/audio-plugins
Audio plugins
2 parents 8abc61d + 345ef10 commit 659216d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3670
-102
lines changed

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/coverage
55
native-src
66
/.vscode
7-
*.json
7+
*.json
8+
apps/demo-angular/**/*.html

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@
3838
"xmlTools.splitAttributesOnFormat": true,
3939
"editor.defaultFormatter": "esbenp.prettier-vscode",
4040
"editor.formatOnSave": true,
41-
"prettier.requireConfig": true
41+
"prettier.requireConfig": true,
42+
"[java]": {
43+
"editor.defaultFormatter": "redhat.java"
44+
}
4245
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# NativeScript Plugins
2-
1+
- [@voicethread/nativescript-audio-player](packages/nativescript-audio-player/README.md)
2+
- [@voicethread/nativescript-audio-recorder](packages/nativescript-audio-recorder/README.md)
33
- [@voicethread/nativescript-custom-rotors](packages/nativescript-custom-rotors/README.md)
44
- [@voicethread/nativescript-downloader](packages/nativescript-downloader/README.md)
55
- [@voicethread/nativescript-filepicker](packages/nativescript-filepicker/README.md)

apps/demo-angular/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"@nativescript/core": "file:../../node_modules/@nativescript/core",
55
"@voicethread/nativescript-custom-rotors": "file:../../dist/packages/nativescript-custom-rotors",
66
"@voicethread/nativescript-filepicker": "file:../../dist/packages/nativescript-filepicker",
7-
"@voicethread/nativescript-downloader": "file:../../dist/packages/nativescript-downloader"
7+
"@voicethread/nativescript-downloader": "file:../../dist/packages/nativescript-downloader",
8+
"@voicethread/nativescript-audio-player": "file:../../dist/packages/nativescript-audio-player",
9+
"@voicethread/nativescript-audio-recorder": "file:../../dist/packages/nativescript-audio-recorder"
810
},
911
"devDependencies": {
1012
"@nativescript/android": "~8.4.0",

apps/demo-angular/src/app-routing.module.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ import { HomeComponent } from './home.component';
77
const routes: Routes = [
88
{ path: '', redirectTo: '/home', pathMatch: 'full' },
99
{ path: 'home', component: HomeComponent },
10-
{ path: 'nativescript-custom-rotors', loadChildren: () => import('./plugin-demos/nativescript-custom-rotors.module').then((m) => m.NativescriptCustomRotorsModule) },
11-
{ path: 'nativescript-downloader', loadChildren: () => import('./plugin-demos/nativescript-downloader.module').then((m) => m.NativescriptDownloaderModule) },
12-
{ path: 'nativescript-filepicker', loadChildren: () => import('./plugin-demos/nativescript-filepicker.module').then((m) => m.NativescriptFilepickerModule) },
10+
{ path: 'nativescript-audio-player', loadChildren: () => import('./plugin-demos/nativescript-audio-player.module').then(m => m.NativescriptAudioPlayerModule) },
11+
{ path: 'nativescript-audio-recorder', loadChildren: () => import('./plugin-demos/nativescript-audio-recorder.module').then(m => m.NativescriptAudioRecorderModule) },
12+
{ path: 'nativescript-custom-rotors', loadChildren: () => import('./plugin-demos/nativescript-custom-rotors.module').then(m => m.NativescriptCustomRotorsModule) },
13+
{ path: 'nativescript-downloader', loadChildren: () => import('./plugin-demos/nativescript-downloader.module').then(m => m.NativescriptDownloaderModule) },
14+
{ path: 'nativescript-filepicker', loadChildren: () => import('./plugin-demos/nativescript-filepicker.module').then(m => m.NativescriptFilepickerModule) },
1315
];
1416

1517
@NgModule({

apps/demo-angular/src/home.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import { Component } from '@angular/core';
66
})
77
export class HomeComponent {
88
demos = [
9+
{
10+
name: 'nativescript-audio-player',
11+
},
12+
{
13+
name: 'nativescript-audio-recorder',
14+
},
915
{
1016
name: 'nativescript-custom-rotors',
1117
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="nativescript-audio-player" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test nativescript-audio-player" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedNativescriptAudioPlayer } from '@demo/shared';
3+
// import { } from '@voicethread/nativescript-audio-player';
4+
5+
@Component({
6+
selector: 'demo-nativescript-audio-player',
7+
templateUrl: 'nativescript-audio-player.component.html',
8+
})
9+
export class NativescriptAudioPlayerComponent {
10+
demoShared: DemoSharedNativescriptAudioPlayer;
11+
12+
constructor(private _ngZone: NgZone) {}
13+
14+
ngOnInit() {
15+
this.demoShared = new DemoSharedNativescriptAudioPlayer();
16+
}
17+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { NativescriptAudioPlayerComponent } from './nativescript-audio-player.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptAudioPlayerComponent }])],
7+
declarations: [NativescriptAudioPlayerComponent],
8+
schemas: [NO_ERRORS_SCHEMA],
9+
})
10+
export class NativescriptAudioPlayerModule {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="nativescript-audio-recorder" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test nativescript-audio-recorder" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>

0 commit comments

Comments
 (0)