-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new modules: bar icons options player template utils user
- Loading branch information
Showing
26 changed files
with
1,147 additions
and
947 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class Bar { | ||
constructor (template) { | ||
this.elements = {}; | ||
this.elements.volume = template.volume; | ||
this.elements.played = template.played; | ||
this.elements.loaded = template.loaded; | ||
} | ||
|
||
/** | ||
* Update progress | ||
* | ||
* @param {String} type - Point out which bar it is | ||
* @param {Number} percentage | ||
* @param {String} direction - Point out the direction of this bar, Should be height or width | ||
*/ | ||
set (type, percentage, direction) { | ||
percentage = Math.max(percentage, 0); | ||
percentage = Math.min(percentage, 1); | ||
this.elements[type].style[direction] = percentage * 100 + '%'; | ||
} | ||
|
||
get (type, direction) { | ||
return parseFloat(this.elements[type].style[direction]) / 100; | ||
} | ||
} | ||
|
||
export default Bar; |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import play from '../assets/play.svg'; | ||
import pause from '../assets/pause.svg'; | ||
import volumeUp from '../assets/volume-up.svg'; | ||
import volumeDown from '../assets/volume-down.svg'; | ||
import volumeOff from '../assets/volume-off.svg'; | ||
import circulation from '../assets/circulation.svg'; | ||
import random from '../assets/random.svg'; | ||
import order from '../assets/order.svg'; | ||
import single from '../assets/single.svg'; | ||
import menu from '../assets/menu.svg'; | ||
|
||
const Icons = { | ||
play: play, | ||
pause: pause, | ||
volumeUp: volumeUp, | ||
volumeDown: volumeDown, | ||
volumeOff: volumeOff, | ||
circulation: circulation, | ||
random: random, | ||
order: order, | ||
single: single, | ||
menu: menu, | ||
}; | ||
|
||
export default Icons; |
Oops, something went wrong.