Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ <h6 class="brand-logo">
<span>MJam</span>
</h6>
<h6 class="song-title">{{ title }}</h6>

<div class="action-buttons">
<span class="minimize" @click="minimize"><i class="material-icons">remove</i></span>
<span class="restore" @click="maximize"><i class="material-icons">crop_landscape</i></span>
Expand Down Expand Up @@ -194,11 +193,13 @@ <h4>Artists</h4>

<div id="bottom-frame">
<div id="nowplaying" v-if="song.title != undefined" v-cloak>
<div class="seekbar-wrapper">
<div class="seekbar-wrapper" >
<div class="seekbar-cover">
<div class="seekbar">
<div class="progress" :style="{ 'width': completion + '%'}"></div>
<div class="handle" :style="{ 'margin-left': completion + '%'}"></div>
<div class="progress" :style="{ 'width': completion + '%'}" >
<input type="range" min="0" max="100" v-model="tym" @change="seek" style="opacity: 0;" >
</div>
<div class="handle" :style="{ 'margin-left': completion + '%'}" ></div>
</div>
</div>
</div>
Expand All @@ -224,7 +225,7 @@ <h6 class="now-playing-track-artist">{{ song.artists.join(", ") }}</h6>
</div>
</div>
</div>

</script>
<script src="./scripts/howler.min.js"></script>
<script src="./scripts/setup.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "MJam",
"name": "mjam",
"version": "0.1.3-beta",
"description": "An MP3 Player",
"main": "main.js",
Expand Down
6 changes: 6 additions & 0 deletions scripts/components/nowplaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const { savePlaylists, saveSettings } = require("../methods")

const nowplaying_frame = new Vue({
el: "#nowplaying",
data: {
tym: ""
},
computed: {
loved(){
return state.playlists.loved.indexOf(this.song.src) != -1
Expand Down Expand Up @@ -35,6 +38,9 @@ const nowplaying_frame = new Vue({
toggleRepeat(){
state.settings.repeat = !state.settings.repeat
},
seek(){
// state.seek(tym)
},
toggleLoved(){
let song_src = this.song.src
let index = state.playlists.loved.indexOf(song_src)
Expand Down
3 changes: 3 additions & 0 deletions scripts/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ const state = new Vue({
for(i in this.nowplaying.ids){
this.nowplaying.instance.pause(this.nowplaying.ids[i])
}
},
seek(){
this.nowplaying.instance.seek(duration)
}
}
})
Expand Down
1 change: 1 addition & 0 deletions stylesheets/nowplaying.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
display: inline-flex;
align-items: center;
}

.seekbar-wrapper .seekbar {
height: 3px;
width: 100%;
Expand Down