I want to achieve something much like the YouTube 'embed this on your own site' text field which can be found on every video's page. I want people to embed the players from my site on there own. I have a flash players that take in parameters to display unique contents inside them it each time, much like a YouTube video players do. Is there a module, or way make the unique code used in my flash players explosed for visitors to copy?
Many thanks,
BeechyBoy

Comments

Fixdit’s picture

Has nobody had any experience with this? Is there much of a call for it? I will go off and start development on a new module if it's something of interest? Let me know.
ashleydavison [at] enjoystudios.co.uk

DrupalShark’s picture

I think the embedding has many uses. I would also be interested in the flash player. I have been having trouble getting flash to play while using Joroen Wijering's Flash Player. With no other players and swf tools not coming back for Drupal 6 I am at a loss for playing flash video on my site. Any ideas?

mike.hobo’s picture

I have achieved this for my music site. Using contemplate, But I believe you could do it in a node.tpl.php page too. If you would like to see it go here: http://www.pdxfm.com/song/119

Pretty much in Contemplate I put a

<strong>embed:</strong>&nbsp;<textarea>
<object type="application/x-shockwave-flash" data="http://www.pdxfm.com/modules/audio/players/xspf_slim.swf?song_url=http://www.pdxfm.com/audio/play/<?php print $node->nid ?>&song_title=<?php print check_plain($node->title) ?> by <?php print $node->name ?>" height="70" width="350" >
<param name="movie" value="http://www.pdxfm.com/modules/audio/players/xspf_slim.swf?song_url=http://www.pdxfm.com/audio/play/<?php print $node->nid ?>&song_title=<?php print check_plain($node->title) ?> by <?php print $node->name ?>" />
<param name="allownetworking" value="internal" />
<param name="allowScriptAccess" value="never" />
<param name="enableJSURL" value="false" />
<param name="enableHREF" value="false" />
<param name="saveEmbedTags" value="true" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
</object></textarea>

That is my code for the music player. This code may be different then most XSPF codes, but it is so it will be myspace friendly.

I don't what you are using for your videos (Jeroen or whatever), but pretty much in node.tpl.php or contemplate you put the same code you use to embed it on your site and put it in tags. Also you might have to change paths so that they aren't just like "/video/player.swf" and put "http://www.site.com/video/player.swf"

Fixdit’s picture

That was great Mike, thanks very much. A nice simple way to implement this. I took an example of my own embed code rendered from the node.tpl.php in the browser. I replaced all the static elements with php variables like 'nid' and 'title' and sandwiched this modified code inside some textarea brackets. So far it seems to work a charm.

Pro Drupal Development from London
ashleydavison [at] enjoystudios.co.uk

mike.hobo’s picture

Glad to help :)

lainel’s picture

This is a very nice code, it works with the slim and extended, but is there a way to allow it to work with the pixelout player?

mike.hobo’s picture

I'm not sure, but you may want to just try putting this into node.tpl.php

<textarea><?php print $output;?></textarea>

But then you may have to change 1pixelout.inc file a little bit.

lainel’s picture

Or Mike, where did you go to design your music player?
Did you have to purchase it?

mike.hobo’s picture

I used flash, and customized it myself. It was a easy process, but there are XSPF skins online, maybe check out http://blog.lacymorrow.com/projects/xspf-jukebox/

lainel’s picture

Thank you , but do you think you could make me one, and I'll pay you?

mike.hobo’s picture

I may be able to work on this, in a week, I'm going on vacation down to mexico :)

lainel’s picture

Cool, how much would you charge?