Skip to content

Commit

Permalink
Added timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
BasmaElhoseny01 committed Aug 16, 2024
1 parent b68b7e0 commit efe2ff7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
22 changes: 21 additions & 1 deletion src/components/molecules/AudioWave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { getStorage, ref, getDownloadURL } from 'firebase/storage'
import WaveSurfer from 'wavesurfer.js'
import RegionsPlugin from 'wavesurfer.js/dist/plugins/regions.esm.js'
import TimelinePlugin from 'wavesurfer.js/dist/plugins/timeline.esm.js'
// Components
Expand Down Expand Up @@ -67,6 +69,20 @@ export default {
// Regions
this.regionsPlugin = RegionsPlugin.create()
// Timeline
this.timelinePlugin = TimelinePlugin.create({
height: 12,
timeInterval: 1,
primaryLabelInterval: 10,
secondaryLabelInterval:10,
style: {
fontSize: '10px',
// color: '#6A3274',
}
})
// Initialize WaveSurfer
this.initWaveSurfer()
Expand All @@ -83,7 +99,11 @@ export default {
cursorColor: '#666',
barWidth: 2,
barRadius: 3,
plugins: [this.regionsPlugin],
minPxPerSec: 10,
dragToSeek: true,
plugins: [this.regionsPlugin,this.timelinePlugin],
// cursorWidth: 1,
// height: 500,
})
Expand Down
6 changes: 3 additions & 3 deletions src/components/organisms/SentimentTranscriptsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
</v-btn>

<!-- Start and End Times -->
<v-list-item-text class="segment-time">
<v-list-item-subtitle class="segment-time">
{{ region.start.toFixed(2) }} - {{ region.end.toFixed(2) }}
</v-list-item-text>
</v-list-item-subtitle>
</v-list-item-icon>

<!-- List Item Content -->
<v-list-item-content>
<v-list-item-title v-text="'item.title'"></v-list-item-title>
<!-- <v-list-item-title v-text="'item.title'"></v-list-item-title> -->

<v-list-item-subtitle
class="text--primary"
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/AudioSentimentController.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ export default class AudioSentimentController extends Controller {
return null;
}

console.log("doc.data()............", doc.data());

return new AudioSentiment({
id: doc.id,
...doc.data()
Expand Down

0 comments on commit efe2ff7

Please sign in to comment.