Isolated side effects for the player lifecycle based on redux-saga
Parses provided configuration and emits the READY
event.
import sagas from '@podlove/player-sagas'
import lifecycleSaga from '@podlove/player-sagas/lifecycle'
sagas.run(
lifecycleSaga
)
Parses the player runtime (browser, client, ...) and emits SET_RUNTIME
.
import sagas from '@podlove/player-sagas'
import runtimeSaga from '@podlove/player-sagas/runtime'
sagas.run(
runtimeSaga
)
Connects the media actions (start, stop, scrub, ...) to the html5 audio/video api.
import sagas from '@podlove/player-sagas'
import playerSaga from '@podlove/player-sagas/player'
sagas.run(
playerSaga({ selectMedia: selectors.media, selectPlaytime: selectors.playtime })
)
Shows/Hides components depending on the player state.
import sagas from '@podlove/player-sagas'
import componentsSaga from '@podlove/player-sagas/components'
sagas.run(
componentsSaga
)
Applies needed side effects when interacting with playtime/chapters.
import sagas from '@podlove/player-sagas'
import chaptersSaga from '@podlove/player-sagas/chapters'
sagas.run(
chaptersSaga({
selectDuration: selectors.duration,
selectPlaytime: selectors.playtime,
selectCurrentChapter: selectors.chapters.current,
selectChapterList: selectors.chapters.list
})
)
Creates quantiles for already listened sections.
import sagas from '@podlove/player-sagas'
import quantilesSaga from '@podlove/player-sagas/quantiles'
sagas.run(
quantilesSaga
)
Reads the Player Version and dispatches it to the store.
import sagas from '@podlove/player-sagas'
import versionSaga from '@podlove/player-sagas/version'
sagas.run(
versionSaga({ version })
)
Applies needed side effects when interacting with playtime/transcripts.
import sagas from '@podlove/player-sagas'
import transcriptsSaga from '@podlove/player-sagas/transcripts'
sagas.run(
transcriptsSaga({ selectChapters: selectors.chapters.list, selectSpeakers: selectors.contributors })
)