{"id":13438252,"url":"https://github.com/syranide/react-swf","last_synced_at":"2026-02-24T04:34:16.257Z","repository":{"id":12752851,"uuid":"15426070","full_name":"syranide/react-swf","owner":"syranide","description":"Shockwave Flash Player component for React","archived":false,"fork":false,"pushed_at":"2018-01-05T20:55:58.000Z","size":140,"stargazers_count":73,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-23T22:01:14.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syranide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-24T22:27:13.000Z","updated_at":"2024-10-26T08:00:02.000Z","dependencies_parsed_at":"2022-08-18T15:22:27.473Z","dependency_job_id":null,"html_url":"https://github.com/syranide/react-swf","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/syranide/react-swf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syranide%2Freact-swf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syranide%2Freact-swf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syranide%2Freact-swf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syranide%2Freact-swf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syranide","download_url":"https://codeload.github.com/syranide/react-swf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syranide%2Freact-swf/sbom","scorecard":{"id":863740,"data":{"date":"2025-08-11","repo":{"name":"github.com/syranide/react-swf","commit":"bb67f8da654e52553fa6ca20733ef9983f25a2b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}}]},"last_synced_at":"2025-08-24T02:06:45.242Z","repository_id":12752851,"created_at":"2025-08-24T02:06:45.242Z","updated_at":"2025-08-24T02:06:45.242Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29739683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:04.003Z","updated_at":"2026-02-24T04:34:16.239Z","avatar_url":"https://github.com/syranide.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized","Awesome React","Utilities"],"sub_categories":["Uncategorized","Tools","Framework bindings / integrations"],"readme":"## ReactSWF ![](https://img.shields.io/github/release/syranide/react-swf.svg) ![](https://img.shields.io/badge/npm-react--swf-blue.svg) ![](https://img.shields.io/badge/bower-react--swf-blue.svg)\n\nShockwave Flash Player component for React. GCC `ADVANCED` optimizations compatible.\n\nSupports all browsers supported by React. ReactSWFCompat is required to support IE8-9.\n\nDepends on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#Polyfill_for_non-ES6_browsers) and [`Object.assign()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill)\n\nUse [SWFPlayerVersion](https://github.com/syranide/swf-player-version) to determine SWF Player support.\n\n```jsx\n\u003cReactSWF\n  src=\"example.swf\"\n  id=\"guid_001\"\n  width=\"300\"\n  height=\"200\"\n  wmode=\"transparent\"\n  flashVars={{foo: 'A', bar: 1}}\n/\u003e\n```\n```jsx\nconst SWF_ID_PREFIX = '__MyExternalInterfaceExample_SWFID_';\nconst SWF_CALL_NAME_PREFIX = '__MyExternalInterfaceExample_SWFCall_';\n\nlet nextUID = 0;\n\nclass MyExternalInterfaceExample extends React.Component {\n  constructor(props) {\n    super(props);\n\n    // For most purposes nextUID is sufficient. However, if you rely on\n    // non-trivial server rendering you must generate deterministic UIDs per\n    // React root to avoid markup mismatch.\n    this._uid = nextUID++;\n\n    window[SWF_CALL_NAME_PREFIX + this._uid] = this.handleSWFCall.bind(this);\n  }\n\n  componentWillUnmount() {\n    delete window[SWF_CALL_NAME_PREFIX + this._uid];\n  }\n\n  handleSWFCall() {\n    // Beware; SWF calls are executed in the context of SWF Player.\n    console.log('SWFCall', arguments);\n    return 'foobar';\n  }\n\n  invokeSWFMyCallback(arg) {\n    // Beware; SWF Player does not sufficiently escape serialized arguments.\n    return this._swfPlayerNode.myCallback(arg);\n  }\n\n  render() {\n    // Globally unique ID is required for ExternalInterface callbacks in IE\u003c11.\n    return (\n      \u003cReactSWF\n        ...\n        ref={c =\u003e this._swfPlayerNode = c}\n        id={SWF_ID_PREFIX + this._uid}\n        flashVars={{myCallbackName: SWF_CALL_NAME_PREFIX + this._uid}}\n      /\u003e\n    );\n  }\n}\n```\n\n## ReactSWFCompat\n\nReactSWFCompat (`require('react-swf/compat')`) also supports IE8-9, but should only be used if you must support these browsers. Internally it uses `ReactDOMServer.renderToString` to render to markup and then immediately `ReactDOM.render` on-top of that. There may be some behavioral differences in edge-cases but overall it should behave just the same. Due to the design of React you are required to provide a container element, the SWF-markup will be rendered inside.\n\n```jsx\n\u003cReactSWFCompat\n  container={\u003cdiv style={{background: '#cccccc'}} /\u003e}\n  src=\"example.swf\"\n  id=\"guid_001\"\n  width=\"300\"\n  height=\"200\"\n  wmode=\"transparent\"\n  flashVars={{foo: 'A', bar: 1}}\n/\u003e\n```\n\n## Breaking changes\n\n#### 1.0.0\n\n* IE8-9 is no longer supported due to issues with the new DOM renderer in React 15. `ReactSWFCompat` has been introduced as a workaround to this.\n\n#### 0.13.0\n\n* `getFPVersion` and `isFPVersionSupported` forked to [SWFPlayerVersion](https://github.com/syranide/swf-player-version) and dropped from ReactSWF. Replace `ReactSWF.getFPVersion =\u003e SWFPlayerVersion.get` and `ReactSWF.isFPVersionSupported =\u003e SWFPlayerVersion.isSupported`.\n\n#### 0.12.3\n\n* Depends on `Object.assign()`, [polyfills are available](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill).\n\n#### 0.11.0\n\n* React 0.13 components no longer support `ref.getDOMNode()`, use `ref.getFPDOMNode()` instead.\n* Depends on `Object.is()`, [polyfills are available](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#Polyfill_for_non-ES6_browsers).\n\n## Properties\n\nStandard DOM properties are forwarded to the underlying `\u003cobject\u003e`.\n\nChanges to props cannot be and are not reflected by an already mounted SWF (except for `width` and `height`). You must manually provide a computed `key` to ensure the component is reset when appropriate. Beware, this also applies to `src`.\n\n```\nsrc {string} [required]\nwidth {number}\nheight {number}\n```\n```\nflashVars {object|string} - {key: {string}}, \"key=value\u0026...\"\n```\n```\nallowFullScreen {boolean} - true, false*\nallowFullScreenInteractive {boolean} - true, false*\nallowNetworking {enum} - all*, internal, none\nallowScriptAccess {enum} - always, sameDomain*, never\n```\n```\nalign {enum} - l, t, r\nbase {string}\nbgcolor {string} - #RRGGBB\nbrowserZoom {enum} - scale*, noscale\nfullScreenAspectRatio {enum} - portrait, landscape\nloop {boolean} - true*, false\nmenu {boolean} - true*, false\nplay {boolean} - true*, false\nquality {enum} - low, autolow, autohigh, medium, high, best\nsalign {enum} - l, t, r, tl, tr\nscale {enum} - default*, noborder, exactfit, noscale\nseamlessTabbing {boolean} - true*, false\nwmode {enum} - window*, direct, opaque, transparent, gpu\n```\n\nDetailed explanation of most properties found at [[Flash OBJECT and EMBED tag attributes]](http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html).\n\n## API\n\n#### Instance methods\n\n```\ngetFPDOMNode()\n  returns {?DOMNode} Flash Player object DOM node.\n\n  Returns the Flash Player object DOM node.\n  Should be prefered over `React.findDOMNode`.\n```\n\n## AS3 ExternalInterface\n\n#### Security flaws\n```\nEscape object key characters for FP:\n\"\u0026\" =\u003e \"\u0026amp;\"\n\"\u003c\" =\u003e \"\u0026lt;\"\n\"\\\"\" =\u003e \"\u0026quot;\"\n\nEscape object key characters for JS:\n\"\\r\" =\u003e \"\\\\r\"\n\"\\\"\" =\u003e \"\\\\\\\"\"\n+ wrap key string with \"\\\"\"\nidentifiers with keyword names must also be quoted for JS\n\nEscape string characters for JS:\n0x005C =\u003e \"\\\\\\\\\" (Backslash)\n0x2028 =\u003e \"\\\\u2028\" (Line separator)\n0x2029 =\u003e \"\\\\u2029\" (Paragraph separator)\n\nInvalid UTF8 characters for FP and JS:\n0x0000        (NULL character)\n0xD800-0xDFFF (Non private use surrogates)\n0xFDD0-0xFDEF (Non-characters)\n0xFFFE-0xFFFF (Non-characters)\nremove or replace with \"\\uFFFD\" (replacement character)\ncan only be produced by String.fromCharCode(c) in FP, not \"\\uXXXX\" (exception: 0x0000)\n```\n\nThis list *may* be incomplete.\n\n#### ExternalInterface.addCallback\n\nReturned strings should be encoded using `StringForJS.encode`.\n\nYou must provide a unique DOM `id` to `ReactSWF` for IE8-10.\n\n```\n\u003cReactSWF id=\"my_guid_123\" ... /\u003e\n```\n\n#### ExternalInterface.call\n\nString arguments should be encoded using `StringForJS.encode`.\n\n#### StringForJS.encode\n\nThe Flash run-time does not sufficiently encode strings passed to JavaScript. This can cause run-time errors, string corruption or character substitution to occur. Encoded strings are transparently decoded by the JavaScript run-time.\n\n```as3\npublic class StringForJS {\n  private static var UNSAFE_CHARS_REGEX:RegExp = new RegExp(\n    // NULL-char (0x00) and backslash (0x5C)\n    \"[\\\\x00\\\\\\\\\" +\n    // Line separator (0x2028), paragraph separator (0x2029)\n    \"\\u2028-\\u2029\" +\n    // Non private use surrogates (0xD800 - 0xDFFF)\n    String.fromCharCode(0xD800) + \"-\" + String.fromCharCode(0xDFFF) +\n    // Non-characters (0xFDD0 - 0xFDEF)\n    String.fromCharCode(0xFDD0) + \"-\" + String.fromCharCode(0xFDEF) +\n    // Non-characters (0xFFFE + 0xFFFF)\n    String.fromCharCode(0xFFFE) + String.fromCharCode(0xFFFF) + \"]\",\n    \"g\"\n  );\n\n  private static function unsafeCharEscaper():String {\n    switch (arguments[0]) {\n      case \"\\u0000\": return \"\\\\0\";\n      case \"\\u005C\": return \"\\\\\\\\\";\n      case \"\\u2028\": return \"\\\\u2028\";\n      case \"\\u2029\": return \"\\\\u2029\";\n      default:       return \"\\uFFFD\";\n    };\n  }\n\n  // Encode unsafe strings for use with ExternalInterface. Invalid characters\n  // are substituted by the Unicode replacement character.\n  public static function encode(value:String):String {\n    return value.replace(UNSAFE_CHARS_REGEX, unsafeCharEscaper);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyranide%2Freact-swf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyranide%2Freact-swf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyranide%2Freact-swf/lists"}