SimplePie_Enclosure::embed
Embed the enclosure using Javascript
`$options` is an array or comma-separated key:value string, with the following properties: - `alt` (string): Alternate content for when an end-user does not have the appropriate handler installed or when a file type is unsupported. Can be any text or HTML. Defaults to blank. - `altclass` (string): If a file type is unsupported, the end-user will see the alt text (above) linked directly to the content. That link will have this value as its class name. Defaults to blank. - `audio` (string): This is an image that should be used as a placeholder for audio files before they're loaded (QuickTime-only). Can be any relative or absolute URL. Defaults to blank. - `bgcolor` (string): The background color for the media, if not already transparent. Defaults to `#ffffff`. - `height` (integer): The height of the embedded media. Accepts any numeric pixel value (such as `360`) or `auto`. Defaults to `auto`, and it is recommended that you use this default. - `loop` (boolean): Do you want the media to loop when its done? Defaults to `false`. - `mediaplayer` (string): The location of the included `mediaplayer.swf` file. This allows for the playback of Flash Video (`.flv`) files, and is the default handler for non-Odeo MP3's. Defaults to blank. - `video` (string): This is an image that should be used as a placeholder for video files before they're loaded (QuickTime-only). Can be any relative or absolute URL. Defaults to blank. - `width` (integer): The width of the embedded media. Accepts any numeric pixel value (such as `480`) or `auto`. Defaults to `auto`, and it is recommended that you use this default. - `widescreen` (boolean): Is the enclosure widescreen or standard? This applies only to video enclosures, and will automatically resize the content appropriately. Defaults to `false`, implying 4:3 mode. Note: Non-widescreen (4:3) mode with `width` and `height` set to `auto` will default to 480x360 video resolution. Widescreen (16:9) mode with `width` and `height` set to `auto` will default to 480x270 video resolution.
Signature
public function embed([string
$options = '',
[boolean
$native = false]] )
Parameters
$options
— string- Comma-separated key:value list, or array
$native
— boolean- Use `<embed>`
Returns
- string
- HTML string to output
Line | Task |
---|---|
970+ | If the dimensions for media:content are defined, use them when width/height are set to 'auto'. |