Commit Graph

1233 Commits

Author SHA1 Message Date
David Wendt 0c6584ca03 core: Store the viewport's scale factor on the stage 2021-04-26 01:15:42 -07:00
relrelb 24dcad9546 extension: Avoid script injection in XML documents
document.xmlVersion doesn't exist in Firefox, so use another method
to detect XML documents, described in MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Document/xmlVersion
2021-04-24 04:16:23 -07:00
Mike Welsh 10b014bf18 tests: Move utils.js out of polyfill folder 2021-04-23 16:58:24 -07:00
Mike Welsh 0c5951da52 tests: Add tests for Ruffle JS API
Add some basic scaffolding for testing the JS API. Adds a test for
`RufflePlayer.load` and `RufflePlayer.metadata`.
2021-04-23 16:58:24 -07:00
Mike Welsh d34b72cc47 web: Expose SWF metadata to JavaScript
Add `RufflePlayer.metadata` that exposes the SWF header fields to
JavaScript.

Add `RufflePlayer.readyState` and fire a `loadedmetadata` event
once the metadata is available, mimicking the HTML5 media APIs.
2021-04-23 16:58:24 -07:00
relrelb 488e4421e9 extension: Lint after TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb cfc57a2e1d extension: Complete TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb b0c6cfe1d3 extension: Initial TypeScript migration 2021-04-23 16:58:13 -07:00
relrelb a157d7ab72 extension: Avoid script injection in XML documents 2021-04-22 18:05:18 -07:00
relrelb 2b71786b8b extension: Convert manifest to JSON5
JSON5 is a more flexible superset of JSON. It supports comments,
trailing commas and more nice features that JSON doesn't support.
2021-04-21 19:03:19 -07:00
relrelb 0fa24b4ce0 web: Migrate file-loader to asset modules
file-loader is deprecated and asset modules are the recommended
alternative.
2021-04-21 19:03:19 -07:00
relrelb 201c4f5db0 web: Use relative paths for webpack entries
Only output.path needs to be absolute.
2021-04-21 19:03:19 -07:00
relrelb 5527973d48 web: Update package-lock.json 2021-04-21 19:03:19 -07:00
Daniel Jacobs c993ad8964 demo: Use absolute URLs for links in README 2021-04-19 16:50:52 -07:00
dependabot-preview[bot] 784e0f3436 build(deps): bump wasm-bindgen-test from 0.3.19 to 0.3.23
Bumps [wasm-bindgen-test](https://github.com/rustwasm/wasm-bindgen) from 0.3.19 to 0.3.23.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-18 23:54:51 -07:00
Daniel Jacobs 8c9db35baf
demo: Allow small screens to still upload local files 2021-04-18 21:04:02 -07:00
valadaptive f6602dd377
web: Handle errors from CSPs which block WebAssembly
This removes the "Report Bug" link from the error case in which
WebAssembly code generation is disallowed by the host's content security
policy, because there's nothing we can do to fix that, and directs
people to the wiki instead.
2021-04-17 19:21:39 -07:00
relrelb 79bcee07f5 audio: Properly round sound duration
Previously it was always rounded down. Change it to the nearest
integer.
2021-04-17 09:11:50 -07:00
Mike Welsh bab2701208 web: Bump wasm-bindgen and js-sys versions 2021-04-16 23:37:23 -07:00
Mike Welsh 7171628b44 ci: Append GitHub build ID instead to extension version
Appending the build date doesn't work (the Mozilla verison format
requires each numeric to be <65536). Use GITHUB_RUN_NUMBER instead,
which increases each time the workflow runs.
2021-04-16 22:17:01 -07:00
Mike Welsh 3f718e508e docs: Update Firefox add-on instructions 2021-04-16 12:31:14 -07:00
Mike Welsh 98c0146279 extension: Add build date to version in manifest
The Chrome/Firefox marketplaces require the version number of an
extension to increase with each upload, so append the build date
to the version in `manifest.json`. Add `versionName` with the more
readable version (`0.1 nightly 2010-15-04` for nightly builds).
2021-04-16 12:31:14 -07:00
Mike Welsh 100977a266 extension: Catch errors while signing the Firefox add-on
Properly catch errors from the `sign-addon` package and bail out
immediately. This will display better output from the Mozilla
validation service.
2021-04-16 12:31:14 -07:00
Mike Welsh 9e64f111c3 extension: Copy Firefox add-on after signing instead of moving
A rename will fail if the destination is on a different mount
(happened to me!). Instead, copy the file to the destination, then
delete the old file.
2021-04-16 12:31:14 -07:00
Mike Welsh 80dfefa45d extension: Add proper 128x128 icon 2021-04-16 12:31:14 -07:00
relrelb 4d2c8ec7f6 web: Set page title in player.js 2021-04-15 16:29:27 -07:00
relrelb 9021da874d web: Small improvement in player.js 2021-04-15 16:29:27 -07:00
relrelb 2fd0bb0183 web: Improve background.js 2021-04-15 16:29:27 -07:00
relrelb 54604c1be1 web: Prototype direct SWFs 2021-04-15 16:29:27 -07:00
relrelb d336926e3f web: Put Firefox-specific note in place 2021-04-15 16:21:23 -07:00
relrelb 9e4816c2f1 demo: Add missing class="hidden" 2021-04-15 15:56:52 -07:00
relrelb 71a17166f4 web: Rename index.js to ruffle.js 2021-04-15 13:47:07 -07:00
relrelb d86949d22f web: Refactor manifest.json 2021-04-15 13:47:07 -07:00
relrelb 1e7bd652e7 web: Update extension README.md 2021-04-15 13:47:07 -07:00
relrelb 027597039f web: Rename lv0.js to content.js 2021-04-15 13:47:07 -07:00
relrelb 0db98888b2 web: Rename extension/build/ to extension/assets/ 2021-04-15 13:47:07 -07:00
relrelb a3576da5f1 web: Unify extension/build/icons/ and extension/build/logo/ 2021-04-15 13:47:07 -07:00
relrelb 02669c0451 web: Rename extension/js/ to extension/src/ 2021-04-15 13:47:07 -07:00
relrelb 2d24afc318 web: Rename settings to options 2021-04-15 13:47:07 -07:00
dependabot-preview[bot] ee0b473f7d build(deps-dev): bump webpack from 5.30.0 to 5.32.0 in /web
Bumps [webpack](https://github.com/webpack/webpack) from 5.30.0 to 5.32.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.30.0...v5.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 02:09:14 -07:00
dependabot-preview[bot] 082334a0bc build(deps-dev): bump eslint from 7.23.0 to 7.24.0 in /web
Bumps [eslint](https://github.com/eslint/eslint) from 7.23.0 to 7.24.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.23.0...v7.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 01:59:01 -07:00
dependabot-preview[bot] 237ab46125 build(deps-dev): bump @wdio/sync from 7.3.0 to 7.3.1 in /web
Bumps [@wdio/sync](https://github.com/webdriverio/webdriverio) from 7.3.0 to 7.3.1.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.3.0...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 01:17:35 -07:00
dependabot-preview[bot] 0f039e8c15 build(deps-dev): bump typescript from 4.2.3 to 4.2.4 in /web
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.3...v4.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:54:49 -07:00
dependabot-preview[bot] 74498ff77c build(deps-dev): bump webpack from 5.30.0 to 5.31.2 in /web
Bumps [webpack](https://github.com/webpack/webpack) from 5.30.0 to 5.31.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.30.0...v5.31.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:29:03 -07:00
dependabot-preview[bot] d0cd9092b9 build(deps-dev): bump @wdio/spec-reporter from 7.2.1 to 7.3.1 in /web
Bumps [@wdio/spec-reporter](https://github.com/webdriverio/webdriverio) from 7.2.1 to 7.3.1.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.2.1...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:28:44 -07:00
dependabot-preview[bot] c6cebee557 build(deps-dev): bump @wdio/local-runner from 7.3.0 to 7.3.1 in /web
Bumps [@wdio/local-runner](https://github.com/webdriverio/webdriverio) from 7.3.0 to 7.3.1.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.3.0...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:28:31 -07:00
dependabot-preview[bot] 7ee4e17094 build(deps-dev): bump @wdio/static-server-service in /web
Bumps [@wdio/static-server-service](https://github.com/webdriverio/webdriverio) from 7.2.1 to 7.3.1.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.2.1...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:26:01 -07:00
dependabot-preview[bot] 56488f65bd build(deps-dev): bump @typescript-eslint/parser in /web
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.20.0 to 4.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.21.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:20:10 -07:00
dependabot-preview[bot] ef0a760e76 build(deps-dev): bump copy-webpack-plugin from 8.1.0 to 8.1.1 in /web
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v8.1.0...v8.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:09:48 -07:00
dependabot-preview[bot] 31128298d2 build(deps-dev): bump @wdio/mocha-framework from 7.2.1 to 7.3.1 in /web
Bumps [@wdio/mocha-framework](https://github.com/webdriverio/webdriverio) from 7.2.1 to 7.3.1.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v7.2.1...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 00:09:34 -07:00