Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/4.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Nov 10, 2018
2 parents fee6738 + e377de9 commit a31c928
Show file tree
Hide file tree
Showing 26 changed files with 24 additions and 318 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [4.2.2](https://github.com/podlove/podlove-web-player/compare/v4.2.1...v4.2.2) (2018-11-10)



<a name="4.2.1"></a>
## [4.2.1](https://github.com/podlove/podlove-web-player/compare/v4.2.0...v4.2.1) (2018-11-09)

Expand Down
28 changes: 0 additions & 28 deletions cypress/integration/tab-audio.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,32 +90,4 @@ describe('Audio Tab', () => {
selectors.tabs.audio.rate.current().should('have.value', '1.00')
})
})

describe('Channels', () => {
it('sets stereo on default', function () {
cy.window().then(setState(this.episode, this.audio, this.show, this.chapters))
cy.tab('audio')
selectors.tabs.audio.channels.mono().should('not.have.attr', 'active')
selectors.tabs.audio.channels.stereo().should('have.attr', 'active')
})

it('sets the channel to mono', function () {
cy.window().then(setState(this.episode, this.audio, this.show, this.chapters))
cy.tab('audio')
selectors.tabs.audio.channels.mono().click()
selectors.tabs.audio.channels.mono().should('have.attr', 'active')
selectors.tabs.audio.channels.stereo().should('not.have.attr', 'active')
})

it('sets the channel to stereo', function () {
cy.window().then(setState(this.episode, this.audio, this.show, this.chapters))
cy.tab('audio')
selectors.tabs.audio.channels.mono().click()
selectors.tabs.audio.channels.mono().should('have.attr', 'active')
selectors.tabs.audio.channels.stereo().should('not.have.attr', 'active')
selectors.tabs.audio.channels.stereo().click()
selectors.tabs.audio.channels.mono().should('not.have.attr', 'active')
selectors.tabs.audio.channels.stereo().should('have.attr', 'active')
})
})
})
4 changes: 0 additions & 4 deletions cypress/selectors/tabs/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ module.exports = cy => ({
rate: {
current: () => cy.get('#tab-audio--rate--value'),
input: () => cy.get('#tab-audio--rate--input input')
},
channels: {
mono: () => cy.get('#tab-audio--channels-mono'),
stereo: () => cy.get('#tab-audio--channels-stereo')
}
})
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@podlove/podlove-web-player",
"title": "Podlove Web Player",
"description": "a Podcast-optimized, HTML5-based video and audio player with Flash fallback. It can be used as a WordPress plugin or within a static HTML/JavaScript context.",
"version": "4.2.1",
"version": "4.2.2",
"homepage": "https://github.com/podlove/podlove-web-player",
"contributors": [],
"repository": "https://github.com/podlove/podlove-web-player.git",
Expand Down Expand Up @@ -57,7 +57,7 @@
"dist/"
],
"dependencies": {
"@podlove/html5-audio-driver": "1.3.3",
"@podlove/html5-audio-driver": "1.3.4",
"babel-polyfill": "6.26.0",
"color": "3.1.0",
"copy-to-clipboard": "3.0.8",
Expand Down
3 changes: 0 additions & 3 deletions src/components/tabs/audio/Audio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<div class="audio-tab" id="tab-audio">
<audio-volume-component class="seperator" v-if="components.audio.volumeControl"></audio-volume-component>
<audio-rate-component class="seperator" v-if="components.audio.rateControl"></audio-rate-component>
<audio-channels-component class="seperator" v-if="components.audio.channelControl"></audio-channels-component>
<footer-component></footer-component>
</div>
</template>
Expand All @@ -13,7 +12,6 @@
import AudioRateComponent from './AudioRate'
import AudioVolumeComponent from './AudioVolume'
import AudioChannelsComponent from './AudioChannels'
import FooterComponent from 'shared/Footer'
Expand All @@ -25,7 +23,6 @@
components: {
AudioRateComponent,
AudioVolumeComponent,
AudioChannelsComponent,
FooterComponent
}
}
Expand Down
66 changes: 0 additions & 66 deletions src/components/tabs/audio/AudioChannels.vue

This file was deleted.

1 change: 0 additions & 1 deletion src/effects/components/episode.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export default handleActions({
dispatch(actions.toggleComponentTab('info', true))
dispatch(actions.toggleComponentTab('audio', true))
dispatch(actions.toggleRateSlider(true))
dispatch(actions.toggleChannelsSelection(true))
dispatch(actions.toggleInfoPoster(true))

// Reset Errors
Expand Down
4 changes: 0 additions & 4 deletions src/effects/components/episode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ test(`componentsEffect: it shows correct ui components for INIT action`, t => {
type: 'TOGGLE_COMPONENT_RATE_SLIDER',
payload: true
})
t.deepEqual(store.dispatch.getCall(7).args[0], {
type: 'TOGGLE_COMPONENT_CHANNELS',
payload: true
})
})

test(`componentsEffect: it shows the chapters tab only when chapters are available on INIT_CHAPTERS`, t => {
Expand Down
7 changes: 2 additions & 5 deletions src/effects/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { secondsToMilliseconds, millisecondsToSeconds } from 'utils/time'

import actions from 'store/actions'

import { INIT, UI_PLAY, UI_PAUSE, UI_RESTART, UPDATE_PLAYTIME, SET_VOLUME, SET_RATE, MUTE, UNMUTE, LOAD, SET_FILTER_STEREO, SET_FILTER_MONO } from 'store/types'
import { INIT, UI_PLAY, UI_PAUSE, UI_RESTART, UPDATE_PLAYTIME, SET_VOLUME, SET_RATE, MUTE, UNMUTE, LOAD } from 'store/types'

let playerActions = {
setPlaytime: noop,
Expand Down Expand Up @@ -44,7 +44,6 @@ export default mediaPlayer => handleActions({
player.events.onError(compose(dispatch, actions.errorLoad))
player.events.onBuffering(compose(dispatch, actions.loading))
player.events.onEnd(compose(dispatch, actions.endEvent))
player.events.onFilterUpdate(compose(dispatch, actions.updateFilter))
},

[UI_PLAY]: (_, actions, { playtime }) => {
Expand All @@ -64,7 +63,5 @@ export default mediaPlayer => handleActions({
[SET_RATE]: (_, { payload }) => playerActions.setRate(payload),
[MUTE]: () => playerActions.mute(),
[UNMUTE]: () => playerActions.unmute(),
[LOAD]: () => playerActions.load(),
[SET_FILTER_STEREO]: () => playerActions.stereo(),
[SET_FILTER_MONO]: () => playerActions.mono()
[LOAD]: () => playerActions.load()
})
41 changes: 3 additions & 38 deletions src/effects/player.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import playerEffectsFactory from './player'
let store
let playerEffect
let mediaPlayer
let playStub, pauseStub, playtimeStub, volumeStub, rateStub, muteStub, unmuteStub, restartStub, loadStub, stereoStub, monoStub
let playStub, pauseStub, playtimeStub, volumeStub, rateStub, muteStub, unmuteStub, restartStub, loadStub

test.beforeEach(t => {
playStub = sinon.stub()
Expand All @@ -18,8 +18,6 @@ test.beforeEach(t => {
unmuteStub = sinon.stub()
restartStub = sinon.stub()
loadStub = sinon.stub()
stereoStub = sinon.stub()
monoStub = sinon.stub()

mediaPlayer = sinon.stub().returns({
actions: {
Expand All @@ -31,9 +29,7 @@ test.beforeEach(t => {
mute: muteStub,
unmute: unmuteStub,
restart: restartStub,
load: loadStub,
stereo: stereoStub,
mono: monoStub
load: loadStub
},
events: {
onPlaytimeUpdate: sinon.stub(),
Expand All @@ -45,8 +41,7 @@ test.beforeEach(t => {
onReady: sinon.stub(),
onError: sinon.stub(),
onBuffering: sinon.stub(),
onEnd: sinon.stub(),
onFilterUpdate: sinon.stub()
onEnd: sinon.stub()
}
})

Expand Down Expand Up @@ -242,33 +237,3 @@ test(`playerEffect: it calls unmute on LOAD`, t => {

t.truthy(loadStub.called)
})

test(`playerEffect: it calls stereo filter on SET_FILTER_STEREO`, t => {
playerEffect(store, {
type: 'INIT',
payload: {
audio: [{ url: 'foo' }]
}
})

playerEffect(store, {
type: 'SET_FILTER_STEREO'
})

t.truthy(stereoStub.called)
})

test(`playerEffect: it calls mono filter on SET_FILTER_MONO`, t => {
playerEffect(store, {
type: 'INIT',
payload: {
audio: [{ url: 'foo' }]
}
})

playerEffect(store, {
type: 'SET_FILTER_MONO'
})

t.truthy(monoStub.called)
})
19 changes: 1 addition & 18 deletions src/effects/storage/episode.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { hashCode } from 'hashcode'
import { handleActions } from 'utils/effects'

import actions from 'store/actions'
import { INIT, SET_PLAYTIME, UPDATE_PLAYTIME, TOGGLE_TAB, SET_QUANTILE, SET_VOLUME, SET_RATE, SET_FILTER_MONO, SET_FILTER_STEREO } from 'store/types'
import { INIT, SET_PLAYTIME, UPDATE_PLAYTIME, TOGGLE_TAB, SET_QUANTILE, SET_VOLUME, SET_RATE } from 'store/types'

let storage = {
get: noop,
Expand All @@ -27,7 +27,6 @@ export default storageFactory => handleActions({
const storedTabs = storage.get('tabs')
const storedVolume = storage.get('volume')
const storedRate = storage.get('rate')
const storedChannel = storage.get('channel')
const storedQuantiles = storage.get('quantiles')
const playtime = get(state, 'playtime', 0)

Expand All @@ -51,14 +50,6 @@ export default storageFactory => handleActions({
if (storedQuantiles) {
dispatch(actions.loadQuantiles(storedQuantiles))
}

if (storedChannel === 'mono') {
dispatch(actions.setMonoChannel())
}

if (storedChannel === 'stereo') {
dispatch(actions.setStereoChannel())
}
},

[SET_PLAYTIME]: setPlaytime,
Expand All @@ -82,13 +73,5 @@ export default storageFactory => handleActions({
[SET_RATE]: (store, action, state) => {
const rate = get(state, 'rate', 1)
storage.set('rate', rate)
},

[SET_FILTER_MONO]: () => {
storage.set('channels', 'mono')
},

[SET_FILTER_STEREO]: () => {
storage.set('channel', 'stereo')
}
})
64 changes: 0 additions & 64 deletions src/effects/storage/episode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,38 +133,6 @@ test(`storageEffects: it doesn't sets state on INIT if nothing is stored`, t =>
t.falsy(store.dispatch.called)
})

test(`storageEffects: it sets the channel stereo on INIT if stored`, t => {
getStub.withArgs('channel').returns('stereo')

storageEffects(store, {
type: 'INIT',
payload: {
foo: 'bar'
}
})

t.truthy(storage.called)
t.deepEqual(store.dispatch.getCall(6).args[0], {
type: 'SET_FILTER_STEREO'
})
})

test(`storageEffects: it sets the channel mono on INIT if stored`, t => {
getStub.withArgs('channel').returns('mono')

storageEffects(store, {
type: 'INIT',
payload: {
foo: 'bar'
}
})

t.truthy(storage.called)
t.deepEqual(store.dispatch.getCall(6).args[0], {
type: 'SET_FILTER_MONO'
})
})

test(`storageEffects: it persists the playtime on SET_PLAYTIME`, t => {
storageEffects(store, {
type: 'INIT',
Expand Down Expand Up @@ -256,35 +224,3 @@ test(`storageEffects: it persists the quantiles on SET_QUANTILE`, t => {
[0, 20]
])
})

test(`storageEffects: it persists the channel on SET_FILTER_MONO`, t => {
storageEffects(store, {
type: 'INIT',
payload: {
foo: 'bar'
}
})

storageEffects(store, {
type: 'SET_FILTER_MONO'
})

t.is(setStub.getCall(0).args[0], 'channels')
t.is(setStub.getCall(0).args[1], 'mono')
})

test(`storageEffects: it persists the channel on SET_FILTER_STEREO`, t => {
storageEffects(store, {
type: 'INIT',
payload: {
foo: 'bar'
}
})

storageEffects(store, {
type: 'SET_FILTER_STEREO'
})

t.is(setStub.getCall(0).args[0], 'channel')
t.is(setStub.getCall(0).args[1], 'stereo')
})
Loading

0 comments on commit a31c928

Please sign in to comment.