standard
This commit is contained in:
@@ -198,9 +198,13 @@ function onAppOpen (newArgv) {
|
|||||||
// Development: 2 args, eg: electron .
|
// Development: 2 args, eg: electron .
|
||||||
// Test: 4 args, eg: electron -r .../mocks.js .
|
// Test: 4 args, eg: electron -r .../mocks.js .
|
||||||
function sliceArgv (argv) {
|
function sliceArgv (argv) {
|
||||||
return argv.slice(config.IS_PRODUCTION ? 1
|
return argv.slice(
|
||||||
: config.IS_TEST ? 4
|
config.IS_PRODUCTION
|
||||||
: 2)
|
? 1
|
||||||
|
: config.IS_TEST
|
||||||
|
? 4
|
||||||
|
: 2
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function processArgv (argv) {
|
function processArgv (argv) {
|
||||||
|
|||||||
@@ -284,8 +284,10 @@ module.exports = class PlaybackController {
|
|||||||
state.playing.infoHash = infoHash
|
state.playing.infoHash = infoHash
|
||||||
state.playing.fileIndex = index
|
state.playing.fileIndex = index
|
||||||
state.playing.fileName = fileSummary.name
|
state.playing.fileName = fileSummary.name
|
||||||
state.playing.type = TorrentPlayer.isVideo(fileSummary) ? 'video'
|
state.playing.type = TorrentPlayer.isVideo(fileSummary)
|
||||||
: TorrentPlayer.isAudio(fileSummary) ? 'audio'
|
? 'video'
|
||||||
|
: TorrentPlayer.isAudio(fileSummary)
|
||||||
|
? 'audio'
|
||||||
: 'other'
|
: 'other'
|
||||||
|
|
||||||
// pick up where we left off
|
// pick up where we left off
|
||||||
|
|||||||
@@ -659,10 +659,14 @@ function renderPlayerControls (state) {
|
|||||||
// Render volume slider
|
// Render volume slider
|
||||||
const volume = state.playing.volume
|
const volume = state.playing.volume
|
||||||
const volumeIcon = 'volume_' + (
|
const volumeIcon = 'volume_' + (
|
||||||
volume === 0 ? 'off'
|
volume === 0
|
||||||
: volume < 0.3 ? 'mute'
|
? 'off'
|
||||||
: volume < 0.6 ? 'down'
|
: volume < 0.3
|
||||||
: 'up')
|
? 'mute'
|
||||||
|
: volume < 0.6
|
||||||
|
? 'down'
|
||||||
|
: 'up'
|
||||||
|
)
|
||||||
const volumeStyle = {
|
const volumeStyle = {
|
||||||
background: '-webkit-gradient(linear, left top, right top, ' +
|
background: '-webkit-gradient(linear, left top, right top, ' +
|
||||||
'color-stop(' + (volume * 100) + '%, #eee), ' +
|
'color-stop(' + (volume * 100) + '%, #eee), ' +
|
||||||
|
|||||||
Reference in New Issue
Block a user