Class Index | File Index

Classes


Class BlobURLContent


Defined in: URLContent.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Content read from the URL of a Blob instance.
Method Summary
Method Attributes Method Name and Description
<static>  
BlobURLContent.fromBlob(blob)
Returns an instance of BlobURLContent for the given blob.
<static>  
BlobURLContent.fromImage(image, imageType, observer)
Generates a BlobURLContent instance from an image.
 
getBlob(observer)
Returns the blob stored by this content, possibly asynchronously if observer parameter is given.
 
getStreamURL(observer)
Retrieves asynchronously an URL of this content usable for JavaScript functions with URL paramater.
Class Detail
BlobURLContent(blob)
Content read from the URL of a Blob instance. Note that this class may also handle a File instance which is a sub type of Blob.
Author: Louis Grignon, Emmanuel Puybaret.
Parameters:
{Blob} blob
Method Detail
<static> {BlobURLContent} BlobURLContent.fromBlob(blob)
Returns an instance of BlobURLContent for the given blob.
Parameters:
{Blob} blob
Returns:
{BlobURLContent}

<static> BlobURLContent.fromImage(image, imageType, observer)
Generates a BlobURLContent instance from an image.
Parameters:
{HTMLImageElement} image
the image to be used as content source
{string} imageType
resulting image blob mime type
{function(BlobURLContent)} observer
callback called when content is ready, with content instance as only parameter

{Blob} getBlob(observer)
Returns the blob stored by this content, possibly asynchronously if observer parameter is given.
Parameters:
{{blobReady: function|blobError: function}} observer Optional
optional observer which blobReady function will be called asynchronously once blob is available.
Returns:
{Blob} blob content

getStreamURL(observer)
Retrieves asynchronously an URL of this content usable for JavaScript functions with URL paramater.
Parameters:
{{urlReady: function|urlError: function}} observer
optional observer which urlReady function will be called asynchronously once URL is available.

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:22 GMT+0200 (CEST)