Daniel Jacobs
a1fb368401
demo: Show overlay when dragging over file input
2021-10-06 18:17:59 -07:00
TÖRÖK Attila
3869950578
video/vp6: Add VP6[A] video decoding support
...
Gated behind the "vp6" feature, enabled by default.
Utilizing a heavily stripped-down version of the NihAV project,
retaining only the VP6 decoder, relicensed under MIT.
Including VP6WithAlpha decoding, proper FrameDependency reporting,
and cropping the unwanted encoded pixels on the right/bottom manually.
2021-10-04 22:33:06 -07:00
relrelb
f3a482a48f
extension: Prefer functions over methods
...
TypeScript is more strict with functions. Fix 2 instances affected
by this change.
2021-10-02 08:58:31 +03:00
relrelb
b250dd5ff1
extension: Fix popup reload tab button
...
Previously the popup page fetched only the `ruffleEnable` and `ruffleOptout`
options because only those appear in `popup.html`. So the remaining
options were always returned with their default value, making the popup
page think that all tabs need to be reloaded when these options have a
non-default value.
Remove the `keys` parameter of `getOptions`, and instead make it always
return all options. Adapt all usages of `getOptions`, which got simplified
by this change.
2021-10-02 08:58:31 +03:00
relrelb
7bb2b5918f
extension: Simplify `utils.ts`
...
In some cases, extension API abstraction objects can be assigned directly
with the equivalent extension API namespace. This reduces much trivial
code that just duplicates all the needed functions.
Also, extract `promisifyStorageArea` to share duplicate code between
the conversions of `chrome.storage.local` and `chrome.storage.sync`
(though `local` is not currently used).
2021-10-02 08:58:31 +03:00
relrelb
a3acdac0f9
extension: Rename `tabSettings` to `tabOptions`
...
This aligns with the rest of the code that uses the term "options"
rather than "settings".
2021-10-02 08:58:31 +03:00
Chris Midgley
1d34a957c3
dev: update web packages
2021-10-01 22:52:08 +03:00
dependabot[bot]
0ceb03f08d
build(deps-dev): bump typescript from 4.4.2 to 4.4.3 in /web
...
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.2...v4.4.3 )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 07:51:55 +03:00
dependabot[bot]
61e2c8b529
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.28.5 to 4.32.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.32.0/packages/parser )
---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 07:07:14 +03:00
dependabot[bot]
72b66944af
build(deps-dev): bump ts-loader from 9.2.4 to 9.2.6 in /web
...
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader ) from 9.2.4 to 9.2.6.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases )
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md )
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.4...v9.2.6 )
---
updated-dependencies:
- dependency-name: ts-loader
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 07:06:40 +03:00
dependabot[bot]
edabb3c614
build(deps-dev): bump prettier from 2.3.2 to 2.4.1 in /web
...
Bumps [prettier](https://github.com/prettier/prettier ) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases )
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.1 )
---
updated-dependencies:
- dependency-name: prettier
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 07:06:25 +03:00
dependabot[bot]
2d306865d6
build(deps-dev): bump typedoc from 0.21.9 to 0.22.4 in /web
...
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc ) from 0.21.9 to 0.22.4.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases )
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.21.9...v0.22.4 )
---
updated-dependencies:
- dependency-name: typedoc
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 22:35:19 +03:00
dependabot[bot]
bef03fcf2b
build(deps-dev): bump @wdio/cli from 7.11.1 to 7.14.0 in /web
...
Bumps [@wdio/cli](https://github.com/webdriverio/webdriverio ) from 7.11.1 to 7.14.0.
- [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.11.1...v7.14.0 )
---
updated-dependencies:
- dependency-name: "@wdio/cli"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 22:35:04 +03:00
dependabot[bot]
4c146bc758
build(deps-dev): bump webpack-cli from 4.7.2 to 4.8.0 in /web
...
Bumps [webpack-cli](https://github.com/webpack/webpack-cli ) from 4.7.2 to 4.8.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases )
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.7.2...webpack-cli@4.8.0 )
---
updated-dependencies:
- dependency-name: webpack-cli
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 22:34:50 +03:00
dependabot[bot]
73d5212d09
build(deps-dev): bump eslint from 7.29.0 to 7.32.0 in /web
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.29.0 to 7.32.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.29.0...v7.32.0 )
---
updated-dependencies:
- dependency-name: eslint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 22:06:28 +03:00
dependabot[bot]
497188fb45
build(deps-dev): bump @types/chrome from 0.0.154 to 0.0.158 in /web
...
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome ) from 0.0.154 to 0.0.158.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome )
---
updated-dependencies:
- dependency-name: "@types/chrome"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 22:05:47 +03:00
dependabot[bot]
b8efc1cd9b
build(deps-dev): bump chromedriver from 92.0.2 to 94.0.0 in /web
...
Bumps [chromedriver](https://github.com/giggio/node-chromedriver ) from 92.0.2 to 94.0.0.
- [Release notes](https://github.com/giggio/node-chromedriver/releases )
- [Commits](https://github.com/giggio/node-chromedriver/compare/92.0.2...94.0.0 )
---
updated-dependencies:
- dependency-name: chromedriver
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 21:35:02 +03:00
relrelb
d5b223c1b3
extension: Add log level option
2021-09-26 07:57:37 +03:00
relrelb
1d324e81b0
web: Add stylelint to `npm run format`
2021-09-26 07:57:37 +03:00
relrelb
d27e29bd26
web: Mark TypeScript enums as const
...
Unlike regular enums, const enums are completely removed during
compilation, and as such are zero-cost in bundle size terms.
Since it is not possible to query the possible values of a const
enum at runtime, adapt the `autoplay` and `unmuteOverlay` validation
logic.
2021-09-24 20:38:44 +03:00
relrelb
0b4d6e6a1c
extension: Add an option to ignore unsupported content warnings
2021-09-24 18:52:13 +03:00
relrelb
bb029468ef
extension: Listen for `onchange` events
...
For checkboxes, `click`, `onchange`, and `oninput` seem all the same,
but for other input types (e.g. dropdowns, text boxes) this matters.
2021-09-24 17:30:12 +03:00
relrelb
cf3c36f306
extension: Localize label only when a translation exists
...
In order to not have to translate to all languages for each new option.
2021-09-24 17:30:12 +03:00
relrelb
8c19e06e5e
extension: Type `utils.getOptions()` better
...
This disallows passing non-existent options:
```ts
utils.getOptions(["doesNotExist"]); // error
```
And also disallows using options that were not requested:
```ts
const options = utils.getOptions(["ruffleEnable"]);
options.ignoreOptout; // error
```
2021-09-24 17:30:12 +03:00
relrelb
34facdc5c2
extension: Use `Map` instead of `Record` to store option elements
...
This has few advantages:
* `Map` is more performant, and its keys cannot clash with builtin
JavaScript properties (e.g. `toString`).
* TypeScript has better type information about `map.keys()`, whereas
`Object.keys()` always return `string[]`.
Also, move `camelize` inside `getBooleanElements`, as it's only used
there, and unify the 2 `for` loops in `bindBooleanOptions` (iterating
`options` is wrong because it might contain options that doesn't exist
in the page).
2021-09-24 17:30:12 +03:00
relrelb
bb926461a1
extension: Return a `Promise` from `injectScriptURL`
...
This serves 2 goals:
1. Wait for the script to be injected (when the promise is resolved),
so future `sendMessageToPage` won't happen before the script can
respond.
2. Detect errors in the script injection (when the promise is
rejected).
2021-09-24 17:30:12 +03:00
relrelb
4dfbff5f2f
extension: Invert `shouldLoad` condition
...
This is a pure mechanical change, in order to lower the indentation
level.
2021-09-24 17:30:12 +03:00
relrelb
340837649e
extension: Rename message properties
...
Make them short and clear:
* `uniqueMessageSuffix` -> `ID`
* `type` -> `to`
2021-09-24 17:30:12 +03:00
Chris Midgley
f276712c2c
dev: allow for failure of firefox signing in build nightly
2021-09-21 20:10:20 +02:00
relrelb
dd42b563ff
web: Bump wasm-bindgen to 0.2.78
...
As usual, also bump its helper crates (`js-sys`, `wasm-bindgen-futures`)
to the latest versions, except for `web-sys` which is locked by wgpu
to 0.3.50.
2021-09-18 21:35:50 +02:00
Giles Cope
623654cd99
Adding back getrandom
2021-09-18 15:28:24 +02:00
Giles Cope
42c2b40052
unused deps
2021-09-18 15:28:24 +02:00
Chris Midgley
384d04536f
dev: optimize file sizes for pngs and svgs
...
Run pngs through optipng and svgs through svgo.
2021-09-16 02:37:11 -07:00
relrelb
2e8a177bef
web: Indent using spaces in tsconfig.json
2021-09-15 00:42:17 +03:00
Daniel Jacobs
56e8dd1b0e
demo: Add visual indicator to file picker for dragging and dropping
2021-09-15 00:08:16 +03:00
Seedgou
5933107fd7
docs: vectorize logo image
2021-09-14 23:43:45 +03:00
Mike Welsh
a882f85d14
chore: Bump TypeScript config to es2017
2021-09-13 14:54:17 -07:00
Tal Hayon
72a811ae2c
web: support no trailing slash in base parameter
2021-09-12 16:02:29 -07:00
Mike Welsh
d84f65874e
chore: Appease clippy
...
Debug/Clone dervies no longer squelch dead code warnings, see:
See https://github.com/rust-lang/rust/pull/85200
2021-09-11 21:50:52 -07:00
Chris Midgley
2abea5aeba
web: don't panic if failing to create an audio buffer
2021-09-11 15:48:30 -07:00
Daniel Jacobs
2213e7d012
web: Menu embed/object attribute true value is case-insensitive
2021-09-11 14:25:52 -07:00
Mike Welsh
9978eaa954
chore: Bump to wasm-bindgen 0.2.77
2021-09-10 16:32:14 -07:00
Daniel Jacobs
5ac9796ffd
web: Support salign, quality, & scale embed/object attributes (part of #4258 )
2021-09-08 16:25:47 -07:00
relrelb
acd462745d
web: Fix `publicPath()` being called from non-global scope
...
`document.currentScript` works only while the script is initially
being processed. This means that when `publicPath()` was called from
a non-global scope, it failed to detect where ruffle.js is located,
which in turn failed to determine the .wasm location.
2021-09-08 02:25:05 -07:00
relrelb
375269417f
web: Set `__webpack_public_path__` in `load-ruffle.ts`
...
Use wasm-bindgen's built-in loader instead of relying on Webpack.
In order to still respect the `publicPath` config, set
`__webpack_public_path__` just before fetching the WebAssembly module.
This allows to no longer declare `.wasm` files as resource assets in
each `webpack.config.js`.
2021-09-08 02:25:05 -07:00
relrelb
28a155a099
web: Remove `config.publicPaths`
...
This simplifies the `publicPath` function and makes it useable inside
`fetchRuffle`.
Assuming `publicPaths` isn't used anywhere, this shouldn't be harmless.
2021-09-08 02:25:05 -07:00
Tal Hayon
e7bff63149
web: check array_buffer promise for failure
2021-09-07 16:59:01 -07:00
Tal Hayon
4625ca0e0b
web: fix base param
2021-09-07 16:45:35 -07:00
David Wendt
116fb1f323
avm2: Impl `Sound.play`
...
This does not (yet) implement the third `SoundTransform` parameter on `play`.
2021-09-03 16:47:02 -06:00
David Wendt
3b6eea2a1d
core: Report sound duration as `f64` and round down in AS1
2021-09-03 16:47:02 -06:00