Undo spaces changes

This commit is contained in:
Rolando Guedes
2016-05-13 21:02:35 +01:00
parent cb8f7f53c2
commit c343c008ed

View File

@@ -11,7 +11,7 @@ var TorrentSummary = require('../lib/torrent-summary')
var {dispatch, dispatcher} = require('../lib/dispatcher') var {dispatch, dispatcher} = require('../lib/dispatcher')
// Handles volume change by wheel // Handles volume change by wheel
var handleVolumeWheel = function (e) { function handleVolumeWheel(e) {
dispatch('changeVolume', (-e.deltaY | e.deltaX) / 500) dispatch('changeVolume', (-e.deltaY | e.deltaX) / 500)
} }
@@ -131,7 +131,7 @@ function renderMedia (state) {
function onCanPlay (e) { function onCanPlay (e) {
var video = e.target var video = e.target
if (video.webkitVideoDecodedByteCount > 0 && if (video.webkitVideoDecodedByteCount > 0 &&
video.webkitAudioDecodedByteCount === 0) { video.webkitAudioDecodedByteCount === 0) {
dispatch('mediaError', 'Audio codec unsupported') dispatch('mediaError', 'Audio codec unsupported')
} else { } else {
video.play() video.play()
@@ -201,7 +201,7 @@ function renderAudioMetadata (state) {
function renderLoadingSpinner (state) { function renderLoadingSpinner (state) {
if (state.playing.isPaused) return if (state.playing.isPaused) return
var isProbablyStalled = state.playing.isStalled || var isProbablyStalled = state.playing.isStalled ||
(new Date().getTime() - state.playing.lastTimeUpdate > 2000) (new Date().getTime() - state.playing.lastTimeUpdate > 2000)
if (!isProbablyStalled) return if (!isProbablyStalled) return
var prog = getPlayingTorrentSummary(state).progress || {} var prog = getPlayingTorrentSummary(state).progress || {}
@@ -296,8 +296,8 @@ function renderPlayerControls (state) {
var positionPercent = 100 * state.playing.currentTime / state.playing.duration var positionPercent = 100 * state.playing.currentTime / state.playing.duration
var playbackCursorStyle = { left: 'calc(' + positionPercent + '% - 8px)' } var playbackCursorStyle = { left: 'calc(' + positionPercent + '% - 8px)' }
var captionsClass = state.playing.subtitles.tracks.length === 0 var captionsClass = state.playing.subtitles.tracks.length === 0
? 'disabled' ? 'disabled'
: state.playing.subtitles.enabled : state.playing.subtitles.enabled
? 'active' ? 'active'
: '' : ''
@@ -409,8 +409,8 @@ function renderPlayerControls (state) {
var volume = state.playing.volume var volume = state.playing.volume
var volumeIcon = 'volume_' + (volume === 0 ? 'off' : volume < 0.3 ? 'mute' : volume < 0.6 ? 'down' : 'up') var volumeIcon = 'volume_' + (volume === 0 ? 'off' : volume < 0.3 ? 'mute' : volume < 0.6 ? 'down' : 'up')
var volumeStyle = { background: '-webkit-gradient(linear, left top, right top, ' + var volumeStyle = { background: '-webkit-gradient(linear, left top, right top, ' +
'color-stop(' + (volume * 100) + '%, #eee), ' + 'color-stop(' + (volume * 100) + '%, #eee), ' +
'color-stop(' + (volume * 100) + '%, #727272))' 'color-stop(' + (volume * 100) + '%, #727272))'
} }
elements.push(hx` elements.push(hx`
@@ -542,7 +542,7 @@ function cssBackgroundImagePoster (state) {
function cssBackgroundImageDarkGradient () { function cssBackgroundImageDarkGradient () {
return 'radial-gradient(circle at center, ' + return 'radial-gradient(circle at center, ' +
'rgba(0,0,0,0.4) 0%, rgba(0,0,0,1) 100%)' 'rgba(0,0,0,0.4) 0%, rgba(0,0,0,1) 100%)'
} }
function getPlayingTorrentSummary (state) { function getPlayingTorrentSummary (state) {