Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

Flash

Summary: Embedding Flash movies
Version: 2006-10-28 (flash.php & swf.php), 2009-10-25 (swf-sites.php), 2010-01-02 (archive.org.php)
Prerequisites: pmwiki-2.1.19; swf-sites.php requires PHP 5 >= 5.1.0
Status:
Maintainer:
Categories: Media Images Video Audio

Question

Can Flash (*.swf) movies be embedded into wiki pages?

Answer

Yes. There are several solutions depending on the situation:

Embedding Flash .swf files (2 options):

  • swf.php recipe - automatically convert any link ending in ".swf" to the correct HTML code for an embedded Flash animation
  • flash.php recipe - an alternative to swf.php that uses a different syntax

Embedding video content from video sharing sites:

  • swf-sites.php recipe - Embedding YouTube, Vimeo, GoogleVideo, and Flickr videos
  • additional sites - Embedding videos and audio from other sites (archive.org, teachertube, slideshare, godtube, audioo)

Embedding Flash: swf.php / Attach:flashvid.swf

By installing the following recipe, any link ending in .swf will automatically be converted to HTML code for an embedded Flash animation.

Place the swf.phpΔ script in your cookbook/ directory, and add the following line to config.php:

include_once('cookbook/swf.php');

The swf.php script uses a reduced Twice Cooked method and causes links ending in ".swf" to be converted to embedded Flash movies (similar to how images are automatically embedded into pages).

In addition, the %width=% and %height=% WikiStyles are extended to apply to the embedded content. It is adviseable to specify the width and the height to get proper size of the swf file. Otherwise you may not see it in correct size.

For Example use: %width=640px height=400px%Attach:MyFlash.swf
To center flash object use %center%%width=640px height=400px%Attach:MyFlash.swf

Discussion for swf.php

add your commments/requests/bugs here please, newest comments at the bottom. please date and sign your comment as well.

Note: the swf.php script is using the Flash 6 player (applets generated with Flash MX). For MX2004 and later (or earlier, if you're using some obsolete Flash features), you'd have to alter the $SwfTagFmt string to fit html generated by that version of Flash (or AfterShock). -Radu
When I try using an absolute URL to an swf file, the height and width don't seem to work. It will wrap the object tag with a span of the specified height and width, but it won't put the height and width into the object tag itself. -bdk?

Here is an informative blog entry for standards compliant flash.


Embedding Flash: flash.php & flash2.php / (:flash ... :)

flash.phpΔ and flash2.phpΔ are two other scripts for flash embedding, using a different syntax.
  • Install the usual way in cookbook and add to config.php
include_once("$FarmD/cookbook/flash2.php");
  • Markup syntax examples:
    1. (:flash Attach:myflashfile.swf width=300 height=200:)
    2. (:flash http://example.com/path/myflash.swf width=200 height=200:)
Width and height are optional. Setting $EnableExternalResource = 0; will disable use of syntax 2, i.e. only uploaded flash animations can be shown, not externally linked ones. ~HansB

Discussion for flash.php & flash2.php

add your commments/requests/bugs here please, newest comments at the bottom. please date and sign your comment as well.

very strange: I tried uploading a working version that I had locally stored, and the version on the server remains corrupted; perhaps the file's permissions need to be adjusted? shi March 19, 2008, at 07:38 PM

I have fixed a number of bugs in flash.php and uploaded it as flash2.phpΔ - the old version broke attachments in a subtle way (which appeared after the flash video on a given page) - Ed Wildgoose (contact me via http://www.mailasail.com)

The server's settings may be set to disallow the overwriting of uploaded files. See UploadsAdmin for info.

flash.php External Data Issue

  • just having a small problem with this. my flash file loads some external movie clips and this is not happening on my wiki pages. the flash file runs fine when embeded in a normal html page. would like to fix this if i knew how.
  • I'm experiencing some difficulty with flash.php and external data as well. From what I can tell, it's a relative path issue. It seems that relative paths inside flash movies do not resolve correctly within the pmWiki file structure. I'll test for absolute paths later. Is this a known issue? Does pmWiki have problems parsing other relative paths?
  • just something it took me a day to realize: it appears that when embedding a flash video that is uploaded to a different group within the same Site than the page you're putting it on (say it's uploaded to MainGroup, but you're now trying to embed it onto a page in ThisOtherGroup), one must treat it like an external URL, and provide an absolute link:
for instance, this doesn't work (presuming flashfile is uploaded to a different group on the same site)
(:flash Attach:MainGroup/flashfile.swf width=150 height=100:)
but this DOES work with the absolute address:
(:flash http://blah.com/pmwiki/uploads/MainGroup/flashfile.swf width=150 height=100:)
overtones99 April 21, 2008, at 08:17 PM
Note, there doesnt seem to be a way of handling parameters to flash. E.g. This is what we need:
<object type="application/x-shockwave-flash" data="http://images.fotki.com/flash/FlipBook-1.0.swf" 
width="139" height="202"> <param name="movie" value="http://images.fotki.com/flash/FlipBook-1.0.swf"> 
<param name="wmode" value="transparent"> <param name="quality" value="best"> <param name="flashvars" 
value="url=http%3A//feeds.fotki.com/simonhobbs/album_tdskbkfrdrfkt.rss&amp;linkcolor=%235471B9&amp;
bgcolor=%23DFE5F4&amp;rows=4&amp;cols=3&amp;el_size=45"> </object>

Any ideas? SimonH

PL 8 October 2009
Flash videos produced at screencast.com include video and audio controls in the exported swf. No extra files to deal with as are produced for example by Camtasia. Screencast.com Registration is free.
hi simon. see the audioo recipe below - it's a standalone recipe that permits parameters to be passed along to Flash. perhaps it can be used as a template for developing a plugin for the fotki.com player. overtones99 October 20, 2009, at 08:21 PM

Updates for flash.php

  • 2006-07-23: Added missing type declaration. Updated to newer swflash.cab version.
  • 2006-09-19: Fixed some confusion of " and ' to quote strings in the "<object>...</object>" code. Now Firefox even display the flash again.

YouTube, GoogleVideo, Vimeo, and Flickr Video

swf-sites.phpΔ enables embedding YouTube, Vimeo(approve links), Google Video(approve links), and Flickr videoplayers into wiki pages.

The simplest use of any of these includes:

(:youtube videocode:)
(:vimeo videocode:)
(:googlevideo videocode:)
(:flickrvid videocode secret=value:)

... where 'videocode' is the unique alpha-numberic id assigned to your movie. For example, if the URL to play the video is:

http://youtube.com/watch?v=nr-SZXIVvuo

you would type:

(:youtube nr-SZXIVvuo:)

In addition, Replace-On-Edit Patterns ($ROEPatterns) have been created for each recipe, so that wiki-editors can simply copy-and-paste the embed code from the respective video website, click 'save' or 'save-and-edit', and have the code automatically converted to the appropriate PmWiki markup. If this is undesired, an admin can disable this in config.php by setting $YouTubeROEenabled, $VimeoROEenabled, etc to false.

Installation

To enable this recipe, put swf-sites.phpΔ in your cookbook directory, and add the following line to config.php:

include_once("$FarmD/cookbook/swf-sites.php");

Be sure to add any default setup variables before including the recipe. See below for details.

Video Parameters

The following websites allow embedding on external sites. Please read up on which parameters are available for each videoplayer, as they're all pretty different in the functionality they permit.

YOUTUBE

The YouTube markup can accept various parameters as defined by the YouTube api, via the following format:

(:youtube videocode [ param1=val1 param2=val2 ... ] :)
[ brackets denote optional arguments ]

An abbreviated* list of common YouTube parameters available in this recipe (some are part of the YouTube api, and some are simply convenience parameters):

  • width & height (defaults: width=425, height=344) - in pixels, but don't add 'px' at the end! (non-api)
  • scale (default: 1) - scale the video's dimensions by some numerical factor (ex: 0.5 = half-size) (non-api)
  • playlist - 0 or 1 (default: 0) - provide this if you're embedding a playlist (non-api)
  • loop - 0 or 1 (default: 0)
  • start - 0 or 1 (default: 0) - starting frame of the video
  • autoplay - 0 or 1 (default: 0)
  • fs - 0 or 1 (default: 0) - add the fullscreen button to the playbar
  • border, color1 & color2 - (default: border=0) - border adds a frame around the video, of the color1; color2 affects the controls (whether or not border is turned on). colors are supplied in hexadecimal, but with no '#': color1=996633
  • nocookie - 0 or 1 (default: 1) - if enabled, video will come from http://www.youtube-nocookie.com(approve links), for privacy issues

* For more possible parameters, see the YouTube api reference page:

Examples: if you'd like your video to loop:

(:youtube nr-SZXIVvuo loop=1:)

... or if you'd like it to loop, with FullScreen enabled, and you'd like to double the default size

(:youtube nr-SZXIVvuo loop=1 fs=1 scale=2:)

... or provide your own width & height

(:youtube nr-SZXIVvuo width=425 height=344:)

The following default setup variables are available for use in config.php, before including the recipe:

  • $YouTubeDefaultParams - an array defining the defaults for the parameters listed above. Set parameters like so: $YouTubeDefaultParams['scale'] = '1.3';
  • $YouTube_XHTMLcompliant - true or false (default: true) - set to false if you'd rather use the non-XHTML-compliant embed code from the YouTube site
  • $YouTubeROEenabled - true or false (default: true) - turns Replace-On-Edit-Patterns Off/On for embed code pasted into a browser window
  • $YouTubeROEFmt - default is '(:youtube $1 scale=1:)' - default replacement of YouTube embed code - change it if you'd rather YouTube embed code be replaced with a different set of default variables.

VIMEO

Vimeo markup accepts various parameters via the following format:

(:vimeo videocode [ param1=val1 param2=val2 ... ] :)

Vimeo parameters:

  • width & height (defaults: width=400, height=327) - in pixels, but don't add 'px' at the end! (non-api)
  • scale (default: 1) - scale the video's dimensions by some numerical factor (ex: 0.5 = half-size) (non-api)
  • show_title - 0 or 1 (default: 1) - displays the title of the video
  • show_byline - 0 or 1 (default: 1) - displays the name of the artist/author/creator
  • show_portrait - 0 or 1 (default: 0) - displays the portrait of the creator
  • color - a hex color-code, with no leading '#' (default: 00ADEF) - the color of the videoplayer text and controls
  • fullscreen - 0 or 1 (default: 1) - permits the fullscreen button on the playbar
  • autoplay - 0 or 1 (default: 0)
  • loop - 0 or 1 (default: 0)

Examples: Simplest vimeo embed:

(:vimeo 6507668:)

... or provide your own width & height

(:vimeo 6507668 width=425 height=344:)

The following default setup variables are available for use in config.php, before including the recipe:

  • $VimeoDefaultParams
  • $Vimeo_XHTMLcompliant - true or false (default: true) - set to false if you'd rather use the non-XHTML-compliant embed code from the Vimeo site.
  • $VimeoROEenabled - true or false (default: true) - turns Replace-On-Edit-Patterns Off/On for embed code pasted into a browser window
  • $VimeoROEFmt - default is '(:vimeo $1 scale=1 $2 $3 $4 $5:)' - default replacement of Vimeo embed code - change it if you'd rather Vimeo embed code be replaced with a different set of default variables.

GOOGLEVIDEO

GoogleVideo markup accepts a handful of optional parameters, though not as many as Vimeo & Youtube:

(:googlevideo videocode [ param1=val1 param2=val2 ... ] :)

GoogleVideo parameters:

  • width & height (defaults: width=400, height=326) - in pixels, but don't add 'px' at the end! (non-api)
  • scale (default: 1) - scale the video's dimensions by some numerical factor (ex: 0.5 = half-size) (non-api)
  • fs - 0 or 1 (default: 1) - permits the fullscreen button on the playbar

Examples: Simplest GoogleVideo embed:

(:googlevideo 8953172273825999151:)

... or provide your own width & height, and disallow fullscreen:

(:googlevideo 8953172273825999151 width=425 height=344 fs=0:)

The following default setup variables are available for use in config.php, before including the recipe:

  • $GoogleVideoDefaultParams
  • $GoogleVideo_XHTMLcompliant - true or false (default: true) - set to false if you'd rather use the non-XHTML-compliant embed code provided at the GoogleVideos site
  • $GoogleVideoROEenabled - true or false (default: true) - turns Replace-On-Edit-Patterns Off/On for embed code pasted into a browser window
  • $GoogleVideoROEFmt - default is '(:googlevideo $1 scale=1:)' - default replacement of Vimeo embed code - change it if you'd rather Vimeo embed code be replaced with a different set of default variables.

FLICKRVID

FlickrVid markup accepts a handful of parameters, though not as many as Vimeo & Youtube:

(:flickrvid videocode secret=secretval [ param1=val1 param2=val2 ... ] :)

* Note - flickrvid has changed since previous version. Previously it declared the videocode via id=videocode; now the videocode is unprefixed, and must appear immediately following (:flickrvid .... To locate the correct videocode, look in the embed code for "photo_id=somenumber"

FlickrVid parameters:

  • secret (required) - this can be obtained from the embed code on the users pages - look for photo_secret=somenumber
  • id (required) - the id for the video - look in the embed code for photo_id=somenumber
  • width & height (defaults: width=400, height=300) - in pixels, but don't add 'px' at the end! (non-api)
  • scale (default: 1) - scale the video's dimensions by some numerical factor (ex: 0.5 = half-size) (non-api)
  • showinfo - 0 or 1 (default: 1) - display the video information before and after playing

Examples: Simplest FlickrVid embed:

(:flickrvid 98765 secret=43210:)

... or provide your own width & height, and turn video info off

(:flickrvid 98765 secret=43210 width=425 height=344 showinfo=false:)

The following default setup variables are available for use in config.php, before including the recipe:

  • $FlickrVidDefaultParams
  • $FlickrVidROEenabled - true or false (default: true) - turns Replace-On-Edit-Patterns Off/On for embed code pasted into a browser window
  • $FlickrVidROEFmt - default is '(:flickrvid [args] scale=1:)' - default replacement of FlickrVid embed code - change it if you'd rather FlickrVid embed code be replaced with a different set of default variables.

* Note: FlickrVid is not yet XHTML 1.0 compliant - I was unable to locate any leads online yet that seemed to work. If you have any suggestions, please do let me know.

Updates for swf-sites.php

overtones99:

  • 2009-10-25 - slightly cleaned up & simplified youtube code (scaling); removed plwidth & plheight from docs, to prevent misuse.
  • 2009-10-20 -
    • Vimeo, GoogleVideo, FlickrVid: updated (:vimeo:) & (:googlevideo:) & (:flickrvid:) to allow arguments, and created a number of various setup variables accessed in config.php
    • Vimeo, Youtube, GoogleVideo, FlickrVid: added ROEPatterns to auotmatically convert pasted <embed> code with the appropriate pmwiki video markup
    • cleaned up YouTube code
    • fixed GoogleVideo bug that prevented fullscreen
    • permitted option of compliant and non-compliant XHTML versions of each recipe (except FlickrVid).
    • removed $YouTubeDefaultHeightFmt & ..WidthFmt (for all recipes) - default width and height are now included in $YouTubeDefaultParams, $VimeoDefaultParams, and so forth.
    • changed FlickrVid so that videcode is declared like YouTube, GoogleVideo, and Vimeo - with it as the first argument, and without the id= prefix
    • replaced/updated much of the documentation
  • 2009-10-09 - YouTube: added 'scale' option for youtube; returned youtube code back to being xhtml 1.0 compliant; incorporated suggestion from Byron Lunz for non-XHTML-compliant version, via $YouTube_XHTMLcompliant
  • 2009-09-21b: YouTube: added ability to embed YouTube playlists
  • 2009-09-21: Updated swf-sites.php - changed YouTube code so that it accepts valid YouTube api parameters

previously:

  • 2008-04-09: Edited swf-sites.php to include Flickr video. (JRH)
  • 2008-01-22: Edited swf-sites.php to swf-sites2.php to update YouTube & Google functions. (BKL)
  • 2007-08-29: Added Vimeo and combined with YouTube and Google Video into swf-sites.phpΔ
  • 2007-02-07: Updated YouTube and GoogleVideo recipes. They both now feature valid XHTML.

Discussion for swf-sites.php

add your commments/requests/bugs here please, newest comments at the bottom. please date and sign your comment as well.

Hi. Im using the swf-sites recipe. (:youtube tgbNymZ7vqY:) works fine. (:youtube tgbNymZ7vqY width=425 height=344:) - which is listed as possible code above - doesn't work at all. No video is shown. Also "scale" as "default variable" doesn't have any effect on the video's dimension. And YES I added it before the "include"-line. What am I doing wrong? me - Feb 15 2010

hi. sorry you're having trouble with the recipe. the examples you've provided above work fine on my site - http://plus1plus1plus.org/Resources/PmWiki-swfsites-test - i'm running pmwiki 2.2.6, and 2009-10-25 version of the swf-sites recipe. i'll try updating my pmwiki to the latest version in the next day or two to see if any problem arises, though i don't think that will change anything. in the meantime, can you tell me what you included in your config? what exactly did you add above the "include"-line? my setup looks like this and works fine:

$YouTubeDefaultParams['rel'] = '0';
include_once("$FarmD/cookbook/swf-sites.php");

overtones99 February 16, 2010, at 02:56 AM

Hi. My config.php

$YouTubeDefaultParams['scale'] = '1.3';
$YouTubeROEenabled = 'false';
include_once("$FarmD/cookbook/swf-sites.php");

Other recipes like svg, flashmediaplayer works quite fine. 'm running 2.2.11. At the moment only your to lines are added for including swf-sites.php. me - Feb 16 2010

hi. it looks like it might be a php-version issue. i followed the link you left on my page and i get the error message: "Fatal error: Call to undefined function: array_diff_key() in /homepages/45/d67474843/htdocs/test/cookbook/swf-sites.php on line 443" - which tells me that your server is probably running a version of php less than 5.1.0 (see http://us.php.net/manual/en/function.array-diff-key.php). can you confirm this by checking your phpinfo page? if indeed this is the case, then i'll try as soon as possible (sometime soon, but unfortunately probably not today or this week) to figure out a workaround.
also - was this error msg showing up all along, or is it new for this go-round? you didn't mention any error msg in your first post - it just sounded like the video just wasn't showing up on the page. is the error new?
overtones99 February 16, 2010, at 08:46 AM

Hi. First I saw, that you're running another recipe-version then me. No idea where I downloaded an older one. After uploading the actual one - i got the error-message. So I checked the php-version. It was 4.4.9. In contrast my provider claims he offers php5... [sic] I checked the help-pages and read that I have to activate php 5 on my own - by default php4 is used... now it works - so you don't need to make a workaround. Sorry for the first "error" (shame on me) - the second error I could fix on my own. me - Feb 16 2010

glad to hear it works now! overtones99 February 17, 2010, at 04:03 AM

Flash videos from other sites

Flash from other (less common?) sites can be installed via separate cookbook recipes. If you have a recipe for sharing videos from another site, feel free to use the following recipes as template and add it below.

ARCHIVE.ORG

For video or audio from Archive.org(approve links), download archive.org.phpΔ and add the following line to config.php:

include_once("$FarmD/cookbook/archive.org.php");

An $ROEPatterns has been included so that users can simply copy&paste the provided archive.org embed-code, and it will automatically convert into valid pmwiki markup.

The markup for this recipe looks like:

for one track of audio:

(:archive.org gd1975-06-17.aud.unknown.87560.flac16/gd75-06-17s1t01_vbr.mp3 height=24 width=350 
autoplay=false:)
(all parameters are optional)

for video from archive.org:

(:archive.org bb_minnie_the_moocher/bb_minnie_the_moocher_512kb.mp4 height=504 width=640 
scale=1 fs=true autoplay=false autoBuffering=true:)
(all parameters are optional)

to create a playlist of multiple tracks of audio or video, several videocodes can be listed with commas in between, wrapped with one set of [square brackets]:

(:archive.org [gd1975-06-17.aud.unknown.87560.flac16/gd75-06-17s1t01_vbr.mp3,
gd1975-06-17.aud.unknown.87560.flac16/gd75-06-17s1t02_vbr.mp3,...]  ... :)
  • Note 1: at this point this does not appear with the tray of tracks like it does on the archive.org site - this is a limitation of the flowplayer setup on archive.org, not of the recipe. However, one can navigate the playlist using the >> and << buttons, and the ROEPattern will spit out a list of the available tracks beneath the player
  • Note 2: that there is currently a bug for video playlists; when copying & pasting directly from archive.org, the videos often have the first slot of the playlist filled with an 'image.jpg', which currently causes the video to automatically begin playing. i hope to fix this soon, but for now one can prevent this autoplaying by simply removing the jpg from the playlist.

Currently available parameters:

Archive.org currently uses the FlowPlayer (v. 3.0.5 - not the most up-to-date version) to view most of its media, which is a surprisingly versatile open source media player. Many, though not all, of the FlowPlayer parameters have been enabled in this recipe; note that for most of these, empty values in $ArchiveOrgPlayerDefaultParams ('') will in most cases (but not all) implement the FlowPlayer defaults.

FlowPlayer Clip Parameters - http://flowplayer.org/documentation/configuration/clips.html
  • width & height (default: 350 x 24 for audio, 640 x 504 for video)
  • scale (default: 1) - multiplier for width and height (disabled for audio)
  • autoplay (default: false)
  • autoBuffering (default: false) - player begins automatically loading the file
  • start (default: 0) - start position, in seconds
  • duration (default: 0) - how long until playback ceases - (default: 0)
  • linkUrl - link to a url when user clicks on the video window (disabled for audio)
  • linkWindow (default: _blank) - window to open new url in (_self, _blank, _parent, _top) (disabled for audio)
FlowPlayer Controlbar Parameters - http://flowplayer.org/plugins/flash/controlbar.html
  • controls (default is empty) - if 'null' or 'false', controls will not appear at all
  • all (default is empty) - show or hide all btns - true shows all, false, allows for enabling one-button-at-a-time
  • fs (default: true) - show/hide fullscreen button (disabled for audio)
  • time (default: true) - show/hide the time
  • play (default: true) - show/hide the play btn
  • stop (default: false) - show/hide the stop btn
  • volume (default: true) - show/hide the volume btn
  • mute (default: true) - show/hide the mute btn
  • scrubber (default: true) - show/hide the scrubber
  • gloss (default: high) - available, but doesn't seem to affect anything...?
  • autoHide (default: fullscreen) - automatically hide the controls (values: always, never, fullscreen)
  • hideDelay (default: 500) - how long it takes to hide the controls (in milliseconds) [note: the flowplayer autoHide is not perfect and sometimes disappears altogether if the hideDelay is too low]
  • bottom (default: 0) - bottom position of the controlbar, measured in pixels
  • top (default is empty) - top position of the controlbar, measured in pixels from the top
  • ctrlHeight - height of controlbar
  • ctrlWidth - width of controlbar
  • opacity (default: 0.95) - opacity of controls (a decimal value between 0-1)
Controlbar Appearance - http://flowplayer.org/documentation/configuration/plugins.html#styling-properties
  • borderRadius (default: 0) - rounding of the controller's edges (default/0 is no rounding)
  • backgroundColor (default: #000000) - a #hex value
  • backgroundGradient (default: medium)
  • timeColor (default: #eeeeee) - a #hex value
  • durationColor (default: #01DAFF) - a #hex value
  • progressColor (default: #777777) - a #hex value
  • progressGradient (default: none) - vals: none, low, medium or high; or an array: [0.2, 1.0]
  • bufferColor - a #hex value
  • bufferGradient - none, low, medium or high; or an array: [0.2, 1.0]
  • sliderColor (default: #777777) - a #hex value
  • sliderGradient - none, low, medium or high; or an array: [0.2, 1.0]
  • buttonColor (default: #333333) - a #hex value
  • buttonOverColor (default: #505050)
  • volumeSliderColor - a #hex value
  • volumeSliderGradient - none, low, medium or high; or an array: [0.2, 1.0]
  • timeBgColor - a #hex value
Other Options For config.php
  • $linkToArchiveOrg - possible values: true, false, "ROE" (default: "ROE") - links in the FlowPlayer context menu currently fail for archive.org, making it very hard for a visitor to be able to locate and download these freely available files.
    • By setting $linkToArchiveOrg = true; in config.php, the archive.org player will always display a small html link to the page where the files are stored (http://www.archive.org/details/PageName(approve links)) directly beneath the player. This will affect all players on the website.
    • Another option, $linkToArchiveOrg = "ROE"; adds a similar link via pmwiki markup during the ROE (Replace-On-Edit) process (i.e. %newwin%[[http://www.archive.org/details/PageName | download from Archive.org]]); this allows each user to choose whether or not to include such a link.
    • And finally, if this is too much clutter for you, set $linkToArchiveOrg = false; and no link will appear for any player.
  • $hexcheck_enabled (default: false) - normally a user is required to supply color-hex-codes in the form '#AABBCC', and if they don't supply the leading '#' the color will fail. to avoid this scenario, set $hexcheck_enabled = true;, and the recipe will check for '#' and then add it to color codes where necessary.
  • $trackListing_enabled (default: true) - many videos and audio available from archive.org are playlists containing multiple tracks; the problem is that when embedded on an external site, the current version of the archive.org player doesn't display the dropdown menu of all the tracks - it only has << and >> search buttons. This is misleading and may cause a visitor to think there is only 1 track available. Setting $trackListing_enabled = true; causes a list of all tracks to be posted beneath the player during the ROE process, along with a note about how to use the << & >> buttons.
  • $ArchiveOrgROEParamsVideo (default: array('width', 'height', 'autoplay', 'fs', 'scale')) & $ArchiveOrgROEParamsAudio (default: array('width', 'height', 'autoplay')) - these variables determine which parameters will show up during the ROE process when a user pastes archive.org embed code into the edit window and saves. Users may not always be aware of all the various parameters available to them, so the usefulness of expanding these arrays is to help make users aware of their options, and to encourage them to customize their players; for instance, adding 'durationColor', 'progressColor', etc to the array would result in ROE's resulting in (:archive.org filename ... durationColor=... progressColor=... :).
Versions:
  • 2010-01-02 - links in the context menu for the player don't currently work, so added $linkToArchiveOrg overtones99
  • 2009-12-21 - major upgrade overtones99
    • enabled many many FlowPlayer parameters not available in the initial release
    • changed default fs='true'
    • fixed bug with 'gloss' parameter
    • all hex-numbers now require a preceding '#' - admin can automatically check this by setting $hexcheck_enabled = true; in config
    • changed bgColor and bgGradient to backgroundColor & backgroundGradient
    • changed msg above tracklist
    • ability to suppress tracklist printout using $trackListing_enabled = false;
  • 2009-12-20 - initial release overtones99

TeacherTube

For TeacherTube, use teachertube.phpΔ and add the following to config.php

   include_once("$FarmD/cookbook/teachertube.php");

Put in the unique ID for the movie, not the whole URL, something like (:teachertube 7f89ddbebc2ac9128303:)

SlideShare

For SlideShare, use slideshare.phpΔ and add the following to config.php

   include_once("$FarmD/cookbook/slideshare.php");

Put in the unique ID for the movie, not the whole URL, something like (:slideshare jbrenman/shift-happens-33834:)
Put the doc value for the movie, it found in embed code for Wordpress. Something like

  (:slideshare what-is-web-20-1194363300579044-4:)

GodTube

For godTube, use godtube.phpΔ and add the following to config.php

   include_once("$FarmD/cookbook/godtube.php");

Put in the unique ID for the movie, not the whole URL, something like (:godtube flvideo1/20/17395:) or (:godtube flvideo/4ee3524ccf035d35b284/1650:)

Working example (doesn't seem to have a working example any more...

Audioo

Audioo (http://audioo.com) allows visitors to embed audio content from their site the same way one would embed video from YouTube. To embed their flashplayer, put audioo.phpΔ in your cookbook, and add the following line to config.php:

include_once("$FarmD/cookbook/audioo.php");

An $ROEPatterns has been included so that users can simply paste in the audioo.com embed code, and it will automatically convert into valid pmwiki markup.

The videocode for this recipe is the entire URL for the audioo page.

Examples:
(:audioo http://audioo.com/t/for-blinky-palermo--dog-star-orchestra/4d4e3e080544ffd/ :)

Optional parameters for Audioo include:

  • autostart - true or false (default: false)
  • volume - 0 to 100 (default: 80)

... and can be added following the url:

(:audioo http://audioo.com/t/for-blinky-palermo--dog-star-orchestra/4d4e3e080544ffd/ autostart=true:)

Updates for other flash media

  • 2009-12-20: updated Audioo recipe; enabled ROEPattern; added Archive.org recipe
  • 2009-10-20: updated Audioo recipe; now accepts parameters 'volume' and 'autostart'
  • 2009-03-02: Added Audioo recipe (overtones99)
  • 2007-07-18: Added SlideShare recipe. (Robert)

Discussion for other flash media sites

add your commments/requests/bugs here please, newest comments at the bottom. please date and sign your comment as well.

Is there an update now that GodTube has become Tangle? Thanks - Think1

I would really appreciate it if someone could write up a cookbook for embedding mp3 audio files: see http://www.macloo.com/examples/audio_player/.
Added January 2009. or even for embedding mp4 video files. Thanks again. LFS


Sandbox

This first two flash recipes have been enabled on this page.

%center% %width=400 height=400% Attach:fol.swf 

[[PmWiki.PmWiki|Attach:fol.swf]]

Attach:fol.swf


(:flash Attach:fol.swf width=300 height=200:)

(:flash width=300 height=200:)


See Also

Contributors

User notes: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date
* (-) Optional negative comment. Name, date

These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on February 17, 2010, at 04:06 AM