I'd like to create an embed code for my videos. I found the embed plugin in Flowplayer, but no way how to use it with the Drupal module. Any hints?


yan’s picture

I got an embed code through the viral video plugin as explained here:

But it'd still be interesting how to use the embed plugin.

yan’s picture


prakashrajavel’s picture

how to embed flow player width and height when i use in particular block through views

radiorel’s picture

Don't know if this code will work with Flowplayer API (I use it with SWF Tools / Flowplayer 3) but might be worth a try.

//Embed plugin from Flowplayer's website
<script src="../sites/all/libraries/flowplayer3/flowplayer.embed-3.0.3.js"></script>
//Selects all the embed code for easy copy/pasting
<input type="button" onclick="SelecText()" value="Select All"/>
//Creates a small textarea to put the embed code in
<textarea rows="3" id="textarea" style="width:600px;"></textarea>
//The Flowplayer embed script
<script>var code = $f().embed().getEmbedCode();
document.getElementById("textarea").innerHTML = code;</script>
//Script for the Select All button
<script type="text/javascript"> function SelecText()
{ document.getElementById("textarea").select() }</script>

With your video content type (or whatever content type you're using Flowplayer with) create a new multiline textarea field with the above code as the default value (input type needs to be full HTML). This should create a small scrollable text field with the embed code in it with a 'select all' button next to it that selects all the embed code.

Not exactly a beautiful solution but it works for me :)

yan’s picture

Thanks for your answer, but unfortunately that doesn't work for me. Firebug tells me for the last script element:

$f is not defined

radiorel’s picture

You might need to change the 'script src' on the first line to match the name / location of the embed script on your server (if you haven't already..)

yan’s picture

Yes, I changed that..

radiorel’s picture

This is probably long past being useful to you now but in case anyone else finds this thread I thought I'd mention I've just found a much better way of creating video embed code at http://druplicity.com/content/easy-embed

Since this basically creates an iframe with a stripped-down video node in it, the embed code is much shorter than Flowplayer's, so IMO this is a rather nicer solution, plus it removes the need for the scripting above..