Permalink
Browse files

Wait until enough audio/video has been loaded for smooth playback.

  • Loading branch information...
eelco committed Jul 28, 2016
1 parent 046b50e commit b9e8d142095169754cf8aa1b8b5f34266c029832
Showing with 2 additions and 2 deletions.
  1. +2 −2 framer/Extras/Preloader.coffee
@@ -81,8 +81,8 @@ class Preloader extends BaseClass
if player and player.readyState? and player not in @_media
if player.readyState < 3
@_media.push(player)
# Wait until there is enough data for playback to start
Events.wrap(player).addEventListener "canplay", =>
# Wait until there is enough data for playback to start playing smoothly
Events.wrap(player).addEventListener "canplaythrough", =>
@_mediaLoaded.push(player)
@_handleProgress()

0 comments on commit b9e8d14

Please sign in to comment.