function theme_emvideo_twistage_flash in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 contrib/emvideo/providers/twistage.inc \theme_emvideo_twistage_flash()
Returns HTML for an embedded Twistage player.
2 theme calls to theme_emvideo_twistage_flash()
- emvideo_twistage_preview in contrib/
emvideo/ providers/ twistage.inc - Implementation of hook_PROVIDER_preview().
- emvideo_twistage_video in contrib/
emvideo/ providers/ twistage.inc - Implementation of hook_PROVIDER_video().
File
- contrib/
emvideo/ providers/ twistage.inc, line 119 - Provide support for Twistage to the emfield.module (http://twistage.com).
Code
function theme_emvideo_twistage_flash($embed, $width, $height, $autoplay, $item) {
if ($embed) {
// Prepare the variables to be sent to the embed code.
$playerprofile = variable_get('emvideo_twistage_playerprofile', '');
if (!empty($playerprofile)) {
$playerprofile = "&p={$playerprofile}";
}
$allowfullscreen = variable_get('emvideo_twistage_allowfullscreen', TRUE) ? 'true' : 'false';
$autoplay = $autoplay ? 'true' : 'false';
$id = form_clean_id('twistage-' . $embed);
// Create the embed code using the embedded player API:
// http://console.twistage.com/doc/api/video/embed
$output = <<<TWISTAGECODE
<object width="{<span class="php-variable">$width</span>}" height="{<span class="php-variable">$height</span>}" id="{<span class="php-variable">$id</span>}" type="application/x-shockwave-flash" data="http://service.twistage.com/plugins/player.swf?v={<span class="php-variable">$embed</span>}{<span class="php-variable">$playerprofile</span>}">
<param name="movie" value="http://service.twistage.com/plugins/player.swf?v={<span class="php-variable">$embed</span>}{<span class="php-variable">$playerprofile</span>}"/>
<param name="allowfullscreen" value="{<span class="php-variable">$allowfullscreen</span>}"/>
<param name="allowscriptaccess" value="always"/>
<param name="base" value="http://service.twistage.com"/>
<param name="flashvars" value="v={<span class="php-variable">$embed</span>}&config={config:{autoplay:{<span class="php-variable">$autoplay</span>}}}"/>
</object>
TWISTAGECODE;
}
return $output;
}