Skip to content

Commit

Permalink
added container to the controls
Browse files Browse the repository at this point in the history
  • Loading branch information
BasmaElhoseny01 committed Aug 17, 2024
1 parent ebd5db3 commit dd9c923
Showing 1 changed file with 47 additions and 30 deletions.
77 changes: 47 additions & 30 deletions src/components/molecules/AudioWave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,39 @@


<!-- Controls -->
<!-- Play -->
<v-btn icon @click="playPause">
<v-icon>
{{ playing ? 'mdi-pause' : 'mdi-play' }}
</v-icon>
</v-btn>

<!-- Speed -->
<div class="speed-control">
<button id="speedButton" @click="changeSpeed">{{speedText}}</button>
</div>


<!-- Volume -->
<div class="volume-control">
<v-slider
v-model="volume"
min="0"
max="1"
step="0.01"
label="Volume"
@change="setVolume"
/>
</div>
<v-row align="center" no-gutters class="controls-row">
<!-- Play -->
<v-col cols="auto">
<v-btn icon @click="playPause">
<v-icon>{{ playing ? 'mdi-pause' : 'mdi-play' }}</v-icon>
</v-btn>
</v-col>

<!-- Speed -->
<v-col cols="auto">
<v-btn @click="changeSpeed">
{{ speedText }}
</v-btn>
</v-col>

<!-- Volume -->
<v-col cols="auto" class="volume-col">
<v-slider
v-model="volume"
min="0"
max="1"
step="0.01"
label="Volume"
@change="setVolume"
hide-details
class="volume-slider"
/>
</v-col>

<!-- Download -->

</v-row>

</div>
</template>

Expand Down Expand Up @@ -283,12 +292,6 @@ export default {
console.error(error)
})
},
// updateRegion(newStart, newEnd) {
updateRegion() {
const newStart=0
const newEnd=8
this.$emit('update:newRegion', { start: newStart, end: newEnd });
},
},
}
</script>
Expand All @@ -297,6 +300,20 @@ export default {
.custom-btn {
text-transform: none; /* Preserve the original text case */
}
.controls-row {
margin-top: 16px;
}
.volume-col {
flex: 1;
max-width: 300px; /* Adjust width as needed */
}
.volume-slider {
width: 100%;
}
/* .waveform-container { */
/* height: 100px; */
/* Additional styles can be added here */
Expand Down

0 comments on commit dd9c923

Please sign in to comment.