Methods
module:auth_token(options) → {string}
Generate an authorization token
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
the authorization token
- Type
- string
option_consume(options, option_name, default_valueopt)
Deletes `option_name` from `options` and return the value if present.
If `options` doesn't contain `option_name` the default value is returned.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | a collection | |
option_name |
String | the name (key) of the desired value | |
default_value |
<optional> |
the value to return is option_name is missing |
video(public_id, optionsopt) → {string}
Creates an HTML video tag for the provided public_id
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public_id |
String | the resource public ID | |||||||||||||||||
options |
Object |
<optional> |
options for the resource and HTML tag
Properties
|
- Source:
Returns:
HTML video tag
- Type
- string
Example
Example of generating a video tag:
$.cloudinary.video("mymovie.mp4");
$.cloudinary.video("mymovie.mp4", {source_types: 'webm'});
$.cloudinary.video("mymovie.ogv", {poster: "myspecialplaceholder.jpg"});
$.cloudinary.video("mymovie.webm", {source_types: ['webm', 'mp4'], poster: {effect: 'sepia'}});