Phaser API Documentation

  Version: 

Member of: Phaser.Loader.File

<static> createObjectURL(image, blob, defaultType)

Description:

Static method for creating object URL using URL API and setting it as image 'src' attribute. If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.

Parameters:

name type description
image HTMLImageElement

Image object which 'src' attribute should be set to object URL.

blob Blob

A Blob object to create an object URL for.

defaultType string

Default mime type used if blob type is not available.

Since: 3.7.0
Source: src/loader/File.js (Line 492)