Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

lightspark

> 编程语言
Open source

An open source flash player implementation

1.9K stars0 likes0 views
WebsiteGitHub

About

An open source flash player implementation

Lightspark

Lightspark is an open source Flash player implementation for playing files in the SWF format. Lightspark can run as a web browser plugin or as a standalone application.

Lightspark supports SWF files written on all versions of the ActionScript language.

Building and Installation

In preparation for building Lightspark, you need development packages for:

  • opengl
  • curl
  • zlib
  • libavcodec
  • libswresample
  • librtmp
  • sdl2
  • libjpeg
  • libavformat
  • liblzma
  • fontconfig (optional)

Lightspark won't be able to access the fonts installed in the system if the fontconfig development files are not installed.

The following tools are also required:

  • cmake
  • nasm
  • c/c++ compiler with support for c++14 (gcc version >=5 or clang version >=3.4)

To install these, run the following command(s):

Ubuntu (tested on 25.10):

bash
sudo apt install git gcc g++ nasm cmake libcurl4-gnutls-dev libsdl2-dev libfontconfig-dev libavcodec-dev libswresample-dev librtmp-dev libjpeg-dev libavformat-dev liblzma-dev

Fedora (tested on 33):

RPMFusion is required and will be enabled as part of this process.

bash
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf builddep lightspark

Archlinux

bash
sudo pacman -S ffmpeg fontconfig rtmpdump sdl2 git cmake nasm

If you want commands for a distro not listed here, please create an issue if it doesn't already exist.

If JIT compilation using llvm is enabled (this is disabled by default), you also need the development packages for llvm (version 2.8 or >= 3.0).

If compiling the PPAPI (Chromium) plugin is enabled (on by default), keep in mind that it will replace the Adobe Flash plugin, as only one Flash plugin is allowed in Chromium.

There are two ways of building Lightspark. You can use the included script, by running ./build.sh. or for a debug build, run ./build.sh -d. You can also do it manually, with the following commands:

bash
cd lightspark
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

The CMAKE_BUILD_TYPE options are: Debug LeanDebug Release RelWithDebInfo Profile

If you run into issues building Lightspark, firstly try deleting the contents of obj, and run ./build.sh file again. If you continue to have issues, please let us know.

Usage

Browser plugin

Most browsers including Firefox and Chromium don't support flash any longer, so the plugins don't work on their latest versions.

There are alternative browsers that still support flash, see https://github.com/lightspark/lightspark/wiki/Getting-Lightspark-up-and-running-in-Web-Browser

Lightspark registers itself as the plugin for application/x-shockwave-flash and for application/x-lightspark, so it should be recognisable in the about:plugins page. Its description string is Shockwave Flash 12.1 r<current version>. The current version is now "r710".

Command line

The command line version of Lightspark can play a local SWF file.

lightspark file.swf

Type lightspark -h to see all command line options.

Keyboard shortcuts

  • Ctrl+Q: quit (standalone player only)
  • Ctrl+F: toggle between normal and fullscreen view
  • Ctrl+M: mute/unmute sounds
  • Ctrl+P: show profiling data
  • Ctrl+S: create screenshot and save it as bmp file in temp folder
  • Ctrl+C: copy an error to the clipboard (when Lightspark fails)

Environment variables

  • LIGHTSPARK_PLUGIN_LOGLEVEL: sets the log level (0-4) (browser plugins only)
  • LIGHTSPARK_PLUGIN_LOGFILE: sets the file the log will be written to (browser plugins only)
  • LIGHTSPARK_PLUGIN_PARAMFILE: if set, the flash variables set by the website will be written to this file (browser plugins only)
  • LIGHTSPARK_RANDOM_SEED: if set, lightspark will use the provided integer value as seed for random numbers (this is useful for debugging to ensure you get the same sequence of random numbers in every run)

SWF Support

Many applications do not yet work yet because the implementation is incomplete. But we do support a number of them. See our compatibility page for more details.

Testing

An easy way to compare Lightspark to Adobe Flash Player is to use the Flash Player Projector, which is simply a standalone executable of Flash that can be quickly run directly from the command line.

The Flash Player Projector can be found here, or if that link is broken, on this page, under the Linux category. Extract the archive, and then you have your flashplayer executable.

This should be used when testing Lightspark, to discern what are genuine bugs with Lightspark, and what are simply bugs with the SWF file itself. If you think you have found a bug, see our bug reporting help for details.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言