diff --git a/examples/demos/onsets/src/components/AudioDisplay.vue b/examples/demos/onsets/src/components/AudioDisplay.vue
index 03027fd..e15b983 100644
--- a/examples/demos/onsets/src/components/AudioDisplay.vue
+++ b/examples/demos/onsets/src/components/AudioDisplay.vue
@@ -17,6 +17,15 @@
+
+
+ {{soundData.name}} - {{soundData.user}}
+
+
+ {{soundData.name}}
+
+
+
@@ -32,10 +41,12 @@ import EventBus from '../core/event-bus';
import WaveSurfer from 'wavesurfer.js';
import MarkersPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.markers';
import RegionsPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.regions';
+import LicenseLogo from './LicenseLogo.vue';
import audioURL from '../assets/acoustic-drums.wav';
export default {
+ components: {LicenseLogo},
data () {
return {
isPlaying: false,
@@ -46,6 +57,8 @@ export default {
sliceRegions: [],
waitingOnsets: false,
waitingOnsetsMsg: "Finding onsets...",
+ soundData: null,
+ receivedSound: false,
height: 0
}
},
@@ -124,6 +137,14 @@ export default {
return true;
}
return false;
+ },
+ licenseType () {
+ if (this.soundData.license == '') return null;
+ if (this.soundData.license.includes('/zero/')) return 'zero';
+ if (this.soundData.license.includes('/by/')) return 'by';
+ if (this.soundData.license.includes('by-nc')) return 'by-nc';
+
+ return 'sampling';
}
},
created () {
@@ -140,6 +161,9 @@ export default {
this.waitingOnsets = true;
this.onsetPositions = [];
+ this.soundData = sound;
+ this.receivedSound = true;
+
if (this.wavesurfer) {
this.wavesurfer.destroy();
}
diff --git a/examples/demos/onsets/src/components/LicenseLogo.vue b/examples/demos/onsets/src/components/LicenseLogo.vue
new file mode 100644
index 0000000..5cbd592
--- /dev/null
+++ b/examples/demos/onsets/src/components/LicenseLogo.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file