Daniel Jacobs
ffdb248872
demo/extension: Expand iPad check to work for iPadOS 13+
2023-11-15 08:04:23 -05:00
Kornelius Rohrschneider
514611451f
web: Set default Polyfill allowScriptAccess value to samedomain
...
The default allowScriptAccess value for polyfilled elements has been set
to samedomain. This means that it's true if the SWF file has the same
domain as the player website and false otherwise.
To do this, a new isPolyfillElement parameter is given to the
RufflePlayer::load method.
2023-11-08 17:09:54 +01:00
Kornelius Rohrschneider
8c8367a09c
web: Fix Ruffle configuration not working properly for Polyfill elements
...
Previously, the Ruffle configuration options weren't working properly
for polyfilled elements.
A polyfilled element can have specific configuration options which
overwrite the more general Ruffle configuration settings.
But the code handling those specific configuration options has
previously set some of them to default values if they haven't been
provided, therefore overwriting the more general configuration settings.
This has been fixed. A getPolyfillOptions function has been created and
returns a URLLoadOptions object, containing only the options that have
been set for the respective element. Helper functions have been adapted
to not return any default values anymore.
getPolyfillOptions is now used in all places where polyfilled options
need to be retrieved (therefore reducing duplicated code).
Documentation has been added to clarify that these options must not
contain any default values, since those would overwrite other
configuration settings with a lower priority.
The extension and demo code has been changed to clarify that no default
values are contained in the element configuration options.
The RuffleEmbed::attributeChangedCallback method has previously loaded
an SWF file only with the parameters and base options. This has been
fixed as well since it now also uses getPolyfillOptions.
When using RuffleObject::connectedCallback to load an SWF file, setting
an element config option to "" hasn't worked for most config options
before either. This has been fixed as well by using the new
getPolyfillOptions function.
The default WindowMode value of the default Ruffle web config has been
set to Window (as it is in the desktop version and according to the
documentation). It has previously been set to Opaque (which causes the
same functionality).
2023-11-08 17:09:54 +01:00
Nathan Adams
d5fa0f56ea
web: Make loadedConfig private again, add reload() method instead
2023-08-20 19:51:14 +02:00
Nathan Adams
3447b8bfdd
chore: npm run format
2023-07-20 14:00:04 +02:00
TÖRÖK Attila
0fe8469d24
chore: Run `npm update --save` in `web`
...
Also `npm install` to make sure `package-lock.json` is clean.
2023-07-02 13:55:24 +02:00
nosamu
202fe2f1bb
core: Add options to set and force the stage alignment
2023-06-14 16:04:14 +02:00
Oleksandr Kalko
70aa8385b7
chore: Upgrade NodeJS dependencies ( #11352 )
2023-06-09 15:50:59 +00:00
nosamu
ec452d91bd
demo: Use forceScale option
2023-04-18 21:43:38 +02:00
relrelb
d9feadce00
web: Run `npm run format`
...
In order to fix Stylelint's new `media-feature-range-notation` rule:
https://stylelint.io/user-guide/rules/media-feature-range-notation/
2023-04-01 13:11:23 +03:00
Daniel Jacobs
4c50e2c271
demo: Add option to reload the current SWF
2023-04-01 01:46:03 -07:00
relrelb
b0eb1057f1
web: Run `npm run format`
2023-03-28 23:43:02 +03:00
Daniel Jacobs
a63f520449
web: Change preloader name while keeping old name for compatibility
2023-03-02 10:51:36 +02:00
nosamu
cfa3363416
web: Construct SwfMovie with spoofed URL when loaded from data
2023-01-29 17:55:55 +01:00
dependabot[bot]
65c9c61f75
build(deps-dev): bump webpack-cli from 4.10.0 to 5.0.1 in /web
...
Bumps [webpack-cli](https://github.com/webpack/webpack-cli ) from 4.10.0 to 5.0.1.
- [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.10.0...webpack-cli@5.0.1 )
---
updated-dependencies:
- dependency-name: webpack-cli
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 09:02:08 +02:00
dependabot[bot]
766c34c215
build(deps-dev): bump css-loader from 6.7.1 to 6.7.3 in /web
...
Bumps [css-loader](https://github.com/webpack-contrib/css-loader ) from 6.7.1 to 6.7.3.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases )
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.7.1...v6.7.3 )
---
updated-dependencies:
- dependency-name: css-loader
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 20:56:39 -07:00
Daniel Jacobs
c2354c1a30
demo: Make open-modal kebab-case
2022-08-19 16:20:06 -07:00
Daniel Jacobs
d8ed2f0d01
demo: Address feedback for metadata color scheme and icon placement
2022-08-19 16:20:06 -07:00
Daniel Jacobs
a2968e6ecb
demo: Use switch statement instead of branches
2022-08-19 16:20:06 -07:00
Daniel Jacobs
7343acf65b
demo: Replace division & Math.round with bitshift (acts like Math.floor)
2022-08-19 16:20:06 -07:00
Daniel Jacobs
86f0813a79
demo: Use Object.entries for simpler code
2022-08-19 16:20:06 -07:00
Daniel Jacobs
9bd1a8c940
demo: Ensure metadata does not overflow 320 x 320 screen
2022-08-19 16:20:06 -07:00
Daniel Jacobs
92a4d7c831
demo: Add uncompressedLength to metadata on demo page
2022-08-19 16:20:06 -07:00
Daniel Jacobs
42cf08d578
demo: Show metadata on information icon click
2022-08-19 16:20:06 -07:00
Daniel Jacobs
75becaf3ba
demo: Add metadata to status bar on the page
2022-08-19 16:20:06 -07:00
relrelb
1accf2d8f9
web: Make `SourceAPI` a singleton
...
As a first step towards a simpler Web API, convert `SourceAPI` from
a class to a constant object, under the assumption that `SourceAPI`
isn't a public Ruffle API and as such is safe to be changed.
As a result the different `ruffle-core` users don't need to construct
a new `SourceAPI` instance before calling `PublicAPI.negotiate()`.
2022-07-23 10:37:33 -07:00
Daniel Jacobs
56adcc5665
web: Add a loading screen ( #7396 )
...
* web: Add a loading screen
* web: Workaround sometimes overwitten remove method
* web: Completely remove exact px values from preloader
* web: Add meaningless loading animation to preloader
* web: Make preloader position relative
* web: Minor preloader CSS changes
* web: Don't change autoplay/unmuteOverlay showing logic
* demo: Use preloader-background for demo
* web: Don't fully remove preloader
* web: Hide preloader loading bar if there's no content-length
* web: Fix typo in load-ruffle
* web: Show/hide playButton and unmuteOverlay based on preloader state
* web: Address preloader feedback
* web: Revert ESLint change
* web: Remove unneeded optional chaining
* web: Change load option from hasPreloader to preloader
* web: Address some preloader feedback
* web: Change margin-bottom for preloader loading anim
* web: Simplify preloader conditional
* web: Show/hide full container when hiding/showing preloader
* web: Make preloader full-size
2022-07-19 22:20:53 +03:00
nosamu
245b55a832
chore: Fix lint
2022-07-13 20:36:52 -07:00
nosamu
7c55a14c36
demo: Update swfs.json example
2022-07-13 20:36:52 -07:00
nosamu
320f84dc88
demo: Improve Sample SWF dropdown
2022-07-13 20:36:52 -07:00
dependabot[bot]
94bf3bdbce
build(deps-dev): bump webpack-cli from 4.9.2 to 4.10.0 in /web
...
Bumps [webpack-cli](https://github.com/webpack/webpack-cli ) from 4.9.2 to 4.10.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.9.2...webpack-cli@4.10.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>
2022-07-02 00:46:28 +03:00
Daniel Jacobs
254a4a9175
demo: Fix styling on mobile devices
2022-05-09 10:07:16 -07:00
Daniel Jacobs
57659a1f44
demo: Add an area to say the file name
2022-05-06 10:43:20 -07:00
Daniel Jacobs
f94a76a248
demo: Style the local file selector and sample file select
2022-05-06 10:43:20 -07:00
dependabot[bot]
53b828df23
build(deps-dev): bump css-loader from 6.5.1 to 6.7.1 in /web
...
Bumps [css-loader](https://github.com/webpack-contrib/css-loader ) from 6.5.1 to 6.7.1.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases )
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.5.1...v6.7.1 )
---
updated-dependencies:
- dependency-name: css-loader
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 13:48:03 -07:00
Mike Welsh
d3becd9d2c
demo: Add Ruffle splash anim as initial animation
2022-04-27 22:39:14 -07:00
Mike Welsh
ac765bd187
chore: Update copyright
...
I (Michael R. Welsh) assign to Ruffle LLC all rights, title, and
interest to copyrights of my personal contributions to Ruffle,
effective March 26, 2022.
2022-03-26 18:13:14 -07:00
relrelb
fa1dc8af4a
demo: Rename `serve` command to `start`
...
`npm start` is a common convention for launching a web server.
Also use the `npm start` and `npm test` shorthands instead of
`npm run start` and `npm run test`.
2022-03-26 01:43:24 +03:00
relrelb
295ca0d836
demo: Copy `swfs.json` to `dist` directory
...
Otherwise it's not served when running `npm run demo`.
2022-03-26 01:43:24 +03:00
dependabot[bot]
cb4f7fc634
build(deps-dev): bump webpack-cli from 4.9.1 to 4.9.2 in /web
...
Bumps [webpack-cli](https://github.com/webpack/webpack-cli ) from 4.9.1 to 4.9.2.
- [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.9.1...webpack-cli@4.9.2 )
---
updated-dependencies:
- dependency-name: webpack-cli
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 01:01:28 +02:00
relrelb
809e91d029
demo: Serve on default port
...
The switch to 8081 seems like a leftover from #5250 .
Return to the default 8080.
2022-01-24 13:29:42 -08:00
relrelb
3f8f117fd3
web: Convert .eslintrc files from JSON to YAML
...
YAML is shorter, more modern, readable, and flexible than JSON.
In other words, YAML >>> JSON.
Auto-converted using [`yq`](https://github.com/kislyuk/yq ).
2022-01-12 20:10:00 -08:00
relrelb
e5617de4aa
web: Suppress Webpack's size limit for .wasm files
...
Webpack warns on assets larger than 250KB by default. Our WebAssembly
module exceeds this limit by far (it's a few MBs).
2021-12-10 22:50:45 +02:00
Chris Midgley
8ac19e9807
web: update everything ( #5731 )
...
* web: update everything
* chore: apply new lint corrections
2021-11-25 23:21:43 +02:00
dependabot[bot]
6927ed8064
build(deps-dev): update style-loader requirement in /web
...
Updates the requirements on [style-loader](https://github.com/webpack-contrib/style-loader ) to permit the latest version.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases )
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v3.3.0...v3.3.1 )
---
updated-dependencies:
- dependency-name: style-loader
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-02 09:09:39 +02:00
dependabot[bot]
0e947bb368
build(deps-dev): update css-loader requirement in /web
...
Updates the requirements on [css-loader](https://github.com/webpack-contrib/css-loader ) to permit the latest version.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases )
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.3.0...v6.5.0 )
---
updated-dependencies:
- dependency-name: css-loader
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-11-02 07:00:47 +02:00
Mike Welsh
4141909bcb
web: Support wgpu on web
...
Add wgpu feature to web build (disabled by default currently).
2021-10-24 17:20:19 -07:00
Daniel Jacobs
a1fb368401
demo: Show overlay when dragging over file input
2021-10-06 18:17:59 -07:00
Chris Midgley
1d34a957c3
dev: update web packages
2021-10-01 22:52:08 +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
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
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
dependabot[bot]
6a9fc6fd1c
chore: Update style-loader requirement from ^3.0.0 to ^3.2.1 in /web
...
Updates the requirements on [style-loader](https://github.com/webpack-contrib/style-loader ) to permit the latest version.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases )
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v3.0.0...v3.2.1 )
---
updated-dependencies:
- dependency-name: style-loader
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 23:57:14 +03:00
cyrozap
74d6195725
demo: Fix local file uploads on iOS
...
It seems Mobile Safari on iOS refuses to allow selection of any files
when the "accept" attribute doesn't contain any file types it
recognizes. To fix this, detect when the demo is running on an iOS
device and remove the "accept" attribute from the file input in that
case.
Fixes: 2d0c76c06f
("demo: Only accepts .swf and .spl files")
2021-08-11 19:53:38 +02:00
relrelb
508f541ada
Revert "web: Simplify .wasm loading"
...
This reverts commit 66bfff7687
.
2021-07-27 11:19:55 +03:00
relrelb
66bfff7687
web: Simplify .wasm loading
...
Use wasm-bindgen's built-in loader instead of relying on Webpack.
This allows to no longer declare .wasm files as resource assets in
each webpack.config.js.
Also the bundled JS is a bit smaller (e.g. demo is now ~88KB vs.
~90KB before).
2021-07-24 14:18:19 -07:00
relrelb
49e26338bc
web: Fix and cleanup npm build scripts
...
* Remove `buildProduction` as it was equivalent to `build`.
* Fix `build:avm_debug` and change it to `build:debug`, which also
disables Webpack optimizations.
2021-07-17 11:40:25 +03:00
relrelb
a33066f666
demo: Small cleanups
2021-07-12 23:21:14 +03:00
relrelb
70938b849c
web: Remove babel-eslint dependency
...
Not only it's deprecated, it's also not needed because ESLint's
built-in "es2021" environment seems to support everything we use.
2021-07-03 21:18:42 +03:00
dependabot[bot]
4a145f71e2
chore: Bump style-loader from 2.0.0 to 3.0.0 in /web
...
Bumps [style-loader](https://github.com/webpack-contrib/style-loader ) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases )
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v2.0.0...v3.0.0 )
---
updated-dependencies:
- dependency-name: style-loader
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 23:49:35 +03:00
Chris Midgley
8927500489
dev: update all package.json devDependencies to latest
2021-06-20 02:21:17 -07:00
Daniel Jacobs
e6bc34cf1c
Add favicon to demo page ( fix #2910 )
2021-06-10 23:57:31 -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
Daniel Jacobs
c993ad8964
demo: Use absolute URLs for links in README
2021-04-19 16:50:52 -07:00
Daniel Jacobs
8c9db35baf
demo: Allow small screens to still upload local files
2021-04-18 21:04:02 -07:00
relrelb
9e4816c2f1
demo: Add missing class="hidden"
2021-04-15 15:56:52 -07:00
relrelb
792519a725
demo: Improvements
2021-04-11 21:49:18 -07:00
relrelb
690b51f15b
web: Shorten CopyWebpackPlugin to CopyPlugin
2021-03-05 23:07:55 -08:00
relrelb
1ed8dea599
web: Improvements
2021-03-05 23:07:55 -08:00
Mike Welsh
f6f7222221
web: Remove clean-webpack-plugin dependency
2021-03-03 06:44:45 -08:00
relrelb
73b5916b2a
web: Fix player positioning
2021-02-19 17:40:43 -08:00
relrelb
8f62236fe1
web: Remove demo/package-lock.json
...
demo is the only package to have its own package-lock.json.
2021-02-19 16:28:09 -08:00
Mike Welsh
836b631237
web: Revert style changes in #3239
2021-02-18 04:11:04 -08:00
relrelb
1c21856980
web: General refactoring
...
* web: Don't load a random SWF Instead, show a prompt to select or drag an SWF.
* web: Refactor webpack.config.js
* demo: Refactor index.js
* demo: Cleanup CSS
2021-02-16 20:39:46 -08:00
Andrew Larson
f34bdb045d
demo: Fix player not being destroyed when None is selected
...
Fix issue with duplicate instances in web demo when sample SWF
is unloaded.
2021-01-25 03:31:24 -08:00
relrelb
0ea7b857cf
demo: Lint index.js
2021-01-22 09:19:26 -08:00
relrelb
0349d90fcd
demo: Add drag-and-drop functionality
2021-01-22 09:19:26 -08:00
Maxwell DeKock
b2594b2b6c
web: Fix error in demo when selecting None for sample ( close #2416 )
2021-01-21 18:05:12 -08:00
Adrian Wielgosik
b69e17bf35
web: Allow customizing log level
2021-01-19 18:10:35 -08:00
Mike Welsh
c2b768c453
web: Fallback to instantiate with improper MIME type
...
Use --target web in wasm-bindgen and file-loader for WASM files,
allowing wasm-bindgen's built-in fallback from
WebAssembly.instantiateStreaming to instantiate.
file-loader spits out the WASM file directly in the output folder,
and imports will resolve to the URL, so that we can load the file
directly, avoiding webpack's built-in wasm loaders.
This allows Ruffle to function on web servers even if they serve
WASM files with the incorrect MIME type, fixing one of our biggest
support requests (#400 , #1458 ). There is some performance impact
on loading with the fallback, but this is preferable to not
working at all.
2021-01-16 15:30:11 -08:00
relrelb
828d8b7339
demo: General refactor
...
General cleanup and refactoring of the web demo
2021-01-09 19:36:05 -08:00
Mike Welsh
87ae91963b
demo: Enable letterbox for demo
2021-01-07 11:46:07 -08:00
Toad06
2d0c76c06f
demo: Only accepts .swf and .spl files
2020-12-30 15:14:28 -08:00
Nathan Adams
797dd83766
web: Merge streamSwfUrl and streamSwfData into load
2020-11-25 11:33:51 -08:00
willbrindle
54ac1ea300
docs: Update demo README instructions to be correct
2020-11-24 17:50:30 -08:00
willbrindle
c3e64f1b12
demo: Allow specifying file in demo via query params
2020-11-24 17:50:30 -08:00
Nathan Adams
600d267bf3
web: We no longer need git dependency in webpack builds - fixes #1517
2020-11-24 16:36:33 -08:00
Nathan Adams
abb311670f
web: Rename RufflePlayer.play_swf_data to RufflePlayer.playSwfData
2020-11-24 16:36:33 -08:00
Nathan Adams
bc3b6ade4e
web: Rename SourceAPI.create_player to SourceAPI.createPlayer
2020-11-24 16:36:33 -08:00
Nathan Adams
c56d707045
web: Make demo depend directly on ruffle-core
2020-11-24 16:36:33 -08:00
Nathan Adams
5ff7168fe9
web: Switched core package from javascript to typescript
2020-11-24 16:36:33 -08:00
relrelb
d71c886e48
web: Move margin to #nav
2020-11-18 17:50:12 -08:00
relrelb
c8ed1debc6
web: Change margin to margin-top
...
This makes the demo page fit in a whole page without a scrollbar.
2020-11-18 17:50:12 -08:00
Nathan Adams
dab79107b2
web: Include git details into the build
2020-11-04 16:46:14 -08:00
Mike Welsh
cd96df7ee7
web: Disable automatic publicPath in webpack configs
2020-10-21 15:19:36 -07:00
Mike Welsh
8465638939
web: Drop webpack-dev-server and use webpack serve
...
See https://github.com/webpack/webpack-dev-server/issues/2759
2020-10-18 17:36:52 -07:00
dependabot-preview[bot]
a965d2f6ba
build(deps-dev): bump webpack-cli from 3.3.12 to 4.0.0 in /web
...
Bumps [webpack-cli](https://github.com/webpack/webpack-cli ) from 3.3.12 to 4.0.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/v3.3.12...webpack-cli@4.0.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-17 15:33:13 -07:00
Mike Welsh
990052db77
chore: Bump to webpack 5
2020-10-17 14:07:28 -07:00