Merge v0.9.0 (#730)

v0.9.0
This commit is contained in:
DC
2016-07-21 15:52:54 -07:00
committed by GitHub
5 changed files with 20 additions and 3 deletions

View File

@@ -54,8 +54,8 @@ module.exports = class PlaybackController {
// force rerendering if window is hidden,
// in order to bypass `raf` and play/pause media immediately
if (!state.window.isVisible) {
var mediaTag = document.querySelector('video,audio')
var mediaTag = document.querySelector('video,audio')
if (!state.window.isVisible && mediaTag) {
if (state.playing.isPaused) mediaTag.play()
else mediaTag.pause()
}

View File

@@ -524,6 +524,7 @@ function renderPlayerControls (state) {
// Handles a click or drag to scrub (jump to another position in the video)
function handleScrub (e) {
if (!e.clientX) return
dispatch('mediaMouseMoved')
var windowWidth = document.querySelector('body').clientWidth
var fraction = e.clientX / windowWidth