Closed (fixed)
Project:
Dash Media Player
Version:
5.x-1.1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2008 at 15:55 UTC
Updated:
5 Mar 2009 at 22:37 UTC
I feel stupid, but for some reason, I cannot get this to work.
I tried adding the dash player to a node via hook_nodeapi and inserting into $node->content. I also tried creating a block with the code to call the dash player. In both cases, the dash player was output completely outside the dom instead of where it was called.
I'm not sure how to get the dash player to output where I want it to. Here's what I did:
function mymodule_block($op='list', $delta=0, $edit=array()) {
$blocks = array();
switch($op) {
case 'list':
$blocks[]['info'] = t('Audio player');
return $blocks;
case 'view':
$params['width'] = 342;
$params['height'] = 108;
$params['playlist'] = 'audio';
$params['autostart'] = 'false';
$params['id'] = 'audio_player';
$block['subject'] = '';
$block['content'] = '<div id="audio_player">'.dashplayer_get_player($params).'</div>';
return $block;
}
}
And here's what I see:
<object id="audio_player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="342" height="108" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
<param name="movie" value="http://mysite.com/sites/all/player/dashPlayer.swf" />
<param name="wmode" value="window" />
<param name="allowfullscreen" value="true" />
<param name="FlashVars" value="autostart=false&id=audio_player" />
<param name="quality" value="high" />
<embed name="audio_player" allowScriptAccess="always" src="http://mysite.com/sites/all/player/dashPlayer.swf" width="342" height="108" border="0" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="window" allowfullscreen="true" quality="high" flashvars="autostart=false&id=audio_player" /></object>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Clearly, I've done something very wrong here...
Comments
Comment #1
travist commentedebeyrent,
Send me an email with your site info and I will personally take a look free of charge. I would like to see what you did that made it not work right.
Thanks,
Travis.
Comment #2
ebeyrent commentedThis issue has been resolved ( I have no idea how or why...) and can be closed.