[[PlayerToc(plugins)]] = Snapshot plugin = This plugins renders a JPG snapshot from a video frame. It sends the JPG data to a serverside script for processing and displays the returning URL. This plugin is compatible with version 4.1 of the player. == Example == Here is an example of the snapshot plugin in action. Below is the string of flashvars used. [[JWPlayer(600,300,file=/player/testing/files/bunny.m4v&plugins=snapshot&snapshot.script=http://www.jeroenwijering.com/test/snapshot/create.php)]] {{{ file=/player/testing/files/bunny.flv&plugins=snapshot&snapshot.script=http://www.jeroenwijering.com/test/snapshot/create.php }}} == Configuration == The plugin is loaded with the flashvar ''plugins=snapshot''. This will automatically load the latest version of the plugin straight off our servers. It offers two flashvars: * '''snapshot.bitmap''' (''true''): Set this to ''false'' if you want to render the thumbnail serverside. The plugin will then not post the JPG data, but two variables: '''file''' (location of the video) and '''position''' (position of the snapshot in seconds). * '''snapshot.script''' (''undefined''): the location of the serverside script (PHP,ASP,..) that processes the snapshot. It must echo the HTTP url of the resulting image, so the player can display the result to the user. Here's an example of such a script: {{{ }}} Note that both the retrieval of bitmap data and the loading of a serverside script are subject to the [wiki:FlashSecurity Crossdomain security restrictions] of Flash. This means that a player on one domain cannot create a snaphot from a video on another domain. This player also cannot post the snapshot to a script on another domain. Both issues can be circumvented by placing a [wiki:FlashSecurity crossdomain.xml] file at the server the video is loaded from and/or the server the script is loaded from. == Source code == The source code of this plugin can be obtained [changeset:HEAD/plugins/snapshot?old_path=%2F&format=zip in a zip] (click the zip links at the bottom) or through [http://subversion.tigris.org/ Subversion]: {{{ svn co http://developer.longtailvideo.com/svn/plugins/snapshot }}} If you don't have a Subversion client, check out [http://tortoisesvn.tigris.org/ Tortoise] (Windows) or [http://scplugin.tigris.org/ SC Plugin] (MAC). You don't need Adobe Flash to modify this plugin. Instead, you can edit the plugin with any text editor you like. The plugin can be compiled with the free, cross-platform [http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk MXMLC compiler]. See our [wiki:PluginsCompiling plugin compiling overview] for more info.