 	Framer.Preloader = null
 
 exports.addImage = (url) ->
-	Framer.Preloader?.addImage url
+	Framer.Preloader?.addImage(url)
 
 exports.addLogo = (layer) ->
-	Framer.Preloader?.brand.addChild layer
+	Framer.Preloader?.brand.addChild(layer)
 	Framer.Preloader?.brand.style["background-image"] = null


	_handleTimeout: =>
		return unless @isLoading
		console.error "Preloader timeout, ending"
		@end()

exports.enable = ->

			return @_mediaLoaded.length is @_media.length

	addImagesFromContext: (context) ->
		_.pluck(context.layers, "image").map(@addImage)

	addPlayersFromContext: (context) ->
		_.pluck(context.layers, "player").map(@addPlayer)

	addImage: (image) =>
		if image and image not in @_media
