Daniel Jacobs
2ced2d2300
web: Don't polyfill with self-hosted Ruffle while extension is loading
2023-03-24 17:58:54 -07:00
nosamu
f97827ef9c
web: Display config parse errors
2023-03-22 16:51:55 -07:00
Daniel Jacobs
9832ee5845
web: Remove else from save manager, unneeded with early return
2023-03-21 08:47:16 +01:00
Daniel Jacobs
fe17ca8832
web: Don't replace save if user does not confirm needed reload
2023-03-21 08:47:16 +01:00
Daniel Jacobs
f123b5e50c
web: Don't break Ruffle when localStorage is unavailable
2023-03-21 08:47:16 +01:00
Daniel Jacobs
d2e7d8ba7a
web: Improve save manager styling
2023-03-21 08:47:16 +01:00
Daniel Jacobs
0cbfaf4a3e
Add confirmation for delete and reload content for delete conflict
2023-03-21 08:47:16 +01:00
Daniel Jacobs
92618f6894
web: Alow download sol to work on extension page by avoiding fetch
2023-03-21 08:47:16 +01:00
Daniel Jacobs
9671f7ccac
web: Close Save Manager when clicking outside of it
2023-03-21 08:47:16 +01:00
Daniel Jacobs
509d273073
web: Make all save manager functions private
2023-03-21 08:47:16 +01:00
Daniel Jacobs
ef3220e77d
web: Only accept sol files in save manager
2023-03-21 08:47:16 +01:00
Daniel Jacobs
320edd3c0f
web: Allow duplicate key replacement to reload page
2023-03-21 08:47:16 +01:00
Daniel Jacobs
10f35781fc
web: Add title text to save table keys in case of name duplicates
2023-03-21 08:47:16 +01:00
Daniel Jacobs
f71723c082
web: Only show context menu item for save manager when saves exist
2023-03-21 08:47:16 +01:00
Daniel Jacobs
94ff2891e9
web: Don't allow arbitrary upload of save files for technical reasons
2023-03-21 08:47:16 +01:00
Daniel Jacobs
54ad95beb3
web: Make save manager completely functional
2023-03-21 08:47:16 +01:00
Daniel Jacobs
824cc1689c
web: [WIP] Add Save Manager to context menu
2023-03-21 08:47:16 +01:00
MrCheeze
9e71ea9124
web: Allow ExternalInterface.call to call methods of primitive types ( close #9105 )
2023-03-19 07:18:01 +01:00
relrelb
156c76cb94
web: Simplify custom context menu separators logic
...
Instead deduplicating separators in `RufflePlayer.showContextMenu()`
using DOM attributes, do it right in `RufflePlayer.contextMenuItems()`,
using a simpler approach.
2023-03-18 02:10:08 -07:00
Nathan Adams
1bb8515d85
chore: Update avm2 compatibility warning to be less severe
2023-03-15 15:30:25 -07:00
Daniel Jacobs
5a1b43008b
web: Remove Config object; it was never a correct type for the config
2023-03-15 11:45:00 +01:00
Daniel Jacobs
5944bae33b
web: Log a message when the preloader configuration option is false
2023-03-02 10:51:36 +02:00
Daniel Jacobs
3051e66960
web: Mark shadow-DOM elements as readonly
2023-03-02 10:51:36 +02:00
Daniel Jacobs
a63f520449
web: Change preloader name while keeping old name for compatibility
2023-03-02 10:51:36 +02:00
Nathan Adams
b10d4876d3
web: Add compatibilityRules config option to disable all compatibility rules
2023-03-01 21:25:19 +01:00
Daniel Jacobs
c891a82440
web: Don't focus inside setTimeout on iOS and don't fire unneeded events
2023-03-01 08:15:58 +02:00
Daniel Jacobs
584cb4c1cf
web/ui: Open the virtual keyboard when clicking an editable EditText
2023-03-01 08:15:58 +02:00
Daniel Jacobs
b9b1fa4f8d
web: Add context menu item to show virtual keyboard
...
Co-authored-by: n42k <pedro@amaro.sh>
2023-03-01 08:15:58 +02:00
relrelb
9f8419a145
web: Change `ruffle-core` output directory to `dist`
...
This aligns with the other packages.
2023-02-24 12:43:01 +02:00
Daniel Jacobs
bcbf8c9108
web: Allow context menu to work on iOS using PointerEvents ( #9598 )
...
Co-authored-by: nosamu <71368227+n0samu@users.noreply.github.com>
2023-02-23 12:47:08 +02:00
relrelb
140e1fcfee
web: Use `@tsconfig/strictest`
2023-02-22 21:39:12 +02:00
nosamu
70bf0a816a
core: Add options to set and force stage scale mode
2023-02-22 12:13:20 +02:00
relrelb
1581123284
web: Miscellaneous tiny cleanups
2023-02-18 16:35:59 +02:00
relrelb
a7f41f4df5
web: Add missing access modifiers
2023-02-18 16:35:59 +02:00
relrelb
b36643f52d
web: Cleanup some comments
2023-02-18 16:35:59 +02:00
relrelb
903f8bc33a
web: Enforce ESLint's `no-constructor-return` rule
2023-02-18 16:35:59 +02:00
relrelb
f68542991f
web: Enforce ESLint's `curly` rule
2023-02-18 16:35:59 +02:00
relrelb
87ecbcc066
web: Remove `InternalContextMenuItem` type
...
Simply declare it inline.
2023-02-18 16:35:59 +02:00
David Wendt
85f544a6cc
web: Break out all the Flash identifier strings into a separate module and make `plugin-polyfill.ts` only import that.
2023-02-15 21:27:14 -07:00
nosamu
cfa3363416
web: Construct SwfMovie with spoofed URL when loaded from data
2023-01-29 17:55:55 +01:00
Nathan Adams
4117eece3b
web: Indicate when we used cached debug info
2023-01-16 23:18:42 +01:00
Nathan Adams
6f967d4b3c
web: Cache the output of render debug info in case of panics
2023-01-16 23:18:42 +01:00
Lord-McSweeney
8cef9b65a1
Fix playerVerion misspelling
...
...and also add punctuation to docs.
2023-01-16 17:49:24 +01:00
Lord-McSweeney
4049acee66
Update config.ts
2023-01-16 17:49:24 +01:00
nosamu
21c65252f5
web: Warn about root movie fetch over file protocol
2023-01-10 13:34:06 +01:00
CUB3D
11982c6d7d
web: Allow specifying player version
2023-01-10 13:13:30 +01:00
Nathan Adams
a69d30bb67
render: Add debug info method to renderer backends
2023-01-05 05:51:32 +01:00
Lord-McSweeney
9fecbc391c
Fix incorrect line-height being inherited
...
Sets line-height to default on Ruffle's shadow-root, preventing incorrect line-height inheritance from the document.
2023-01-04 08:43:13 +01:00
nosamu
f92be1c798
web: Make RufflePluginArray iterable
2022-12-19 11:56:18 -08:00
nosamu
3a98981030
web: Add CORS panic error message with FAQ link
2022-12-19 11:21:38 -08:00
nosamu
52d94a4a13
web: Fix strings using buildInfo variables
2022-12-14 10:01:35 +01:00
relrelb
54d59b0ab6
web: Fix TypeScript 4.9 upgrade
...
Per the last paragraph in https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/#in-narrowing ,
TypeScript 4.9 checks that the right side of `in` operator is assignable
to `object`.
Since we can't guarantee that in the `Reflect.has()` polyfill, add
a `@ts-expect-error` annotation to avoid build failure.
2022-12-14 07:30:34 +02:00
aidanbabo
d14ce5243f
web: Add version number requested in #8021
...
Change the compile time "macros" such as `%VERSION_NUMBER%` to be
contained in only one file `build-info.ts`.
Closes #8021
2022-12-13 22:49:20 +01:00
Toad06
1cb2678013
web: Add `has` and `ownKeys` methods to the `Reflect` polyfill
2022-11-14 21:31:08 +02:00
relrelb
acdb5ccb52
web: Remove `RufflePlayer` element existence-checks
...
They should always be present.
2022-10-14 11:56:44 +03:00
relrelb
29b661b366
web: Avoid deprecated `HTMLDocument` type
...
As suggested, use `Document` instead.
2022-10-14 11:56:44 +03:00
relrelb
a8f869329e
web: Fix config with `serde-wasm-bindgen`
...
Since `serde-wasm-bindgen` doesn't support `#[serde(default)]` (https://github.com/cloudflare/serde-wasm-bindgen/issues/20 ),
we no longer able to deserialize a partial `Config` object. As a solution,
take care to pass a full object from the TypeScript side.
2022-09-26 17:23:32 +03:00
Nathan Adams
97110cbecd
web: Add renderer type to player debug/panic info
2022-09-04 18:55:13 -07:00
TÖRÖK Attila
8bb6e77525
web: Also enable the "reference-types" feature in the build with WASM extensions
2022-09-02 13:36:20 -07:00
Daniel Jacobs
d9da45d0f2
web: Don't show loading bar when wasm Content-Length does not exist
2022-09-01 21:43:53 +03:00
nosamu
c5c619abbd
web: Correct IANA Flash MIME type
2022-08-29 02:49:23 -07:00
nosamu
c83ae114b2
web: Move MIME type check to its own function
2022-08-29 02:49:23 -07:00
Daniel Jacobs
29bdd138d5
web: Don't add debug info to context menu in insecure context
...
It won't work anyway, since the Clipboard API doesn't work in insecure contexts.
2022-08-28 20:18:46 -07:00
EmperorBale
f8289b47d8
avm2: Implement call stack & stack traces ( #7564 )
...
* avm2: Implement call stack
* avm2: Class traits should have a special prefix
* avm2: Stack tracebacks should also contain error message
* avm2: Move method naming to Executable
* avm2: Handle getter and setter methods in tracebacks
* chore: Formatting
* chore: Add comments
* avm2: Make full_name write to a string, instead of creating a new one
* core: Make GcArena publicly accessible
* core: Add Deref impl for Either type
* desktop: Add AVM2 call stack to panic message
* avm2: Prefix native methods with a `/`
* chore: Appease clippy
* avm2: Check if method actually contains bytecode instead of unwrapping
* web: Add AVM2 stack trace to panic message
* chore: Formatting
* chore: Clippy
* avm2: Fix stack traces for free standing functions
* core: Remove global data from context
* core: Rename GcGlobalData to GcCallstack
* core: Introduce StaticCallstack, make GcArena private again
Co-authored-by: Adrian Wielgosik <4729533+adrian17@users.noreply.github.com>
2022-08-28 18:30:20 +02:00
relrelb
e3831d2228
web: Disallow imports not used as values
...
Configure [`importsNotUsedAsValues`](https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues )
to `error`, and switch from `import` to `import type` where needed.
Also remove the `strict` configuration, as it's inherited from
`@tsconfig/recommended`.
2022-08-26 17:27:29 -07:00
Daniel Jacobs
c008cc4dea
web: Add debug info context menu item
2022-08-26 16:13:55 -07:00
Adrian Wielgosik
b18329c8fe
web: Allow modifying player volume via JS
2022-08-20 11:53:42 -07:00
Daniel Jacobs
7105c1e803
web: Clarify uncompressed length is in bytes in metadata
2022-08-03 09:17:24 +03:00
Daniel Jacobs
ce95f01de3
web: Include uncompressed length of SWF in metadata
2022-08-03 09:17:24 +03:00
Mike Welsh
9fb46c71ad
web: Use `AudioBufferSourceNode` for web audio
...
On web:
* Mix audio on the Rust side, piping to `AudioBufferSourceNode`.
* Decode MP3 using `symphonia`.
2022-07-28 21:25:33 -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
nosamu
01c8c38762
web: Hide loading screen when root movie download fails
2022-07-20 19:55:12 +03: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
a31dd2e101
Revert "web: Add a loading screen"
...
This reverts commit bec0710175
.
2022-07-11 19:05:52 +02:00
nosamu
47d9c5220a
Revert "web: Workaround sometimes overwitten remove method"
...
This reverts commit ed4f0b98b2
.
2022-07-11 19:05:52 +02:00
nosamu
478c69f846
Revert "web: Completely remove exact px values from preloader"
...
This reverts commit 2c067fe5dd
.
2022-07-11 19:05:52 +02:00
nosamu
d79e45e49e
Revert "web: Add meaningless loading animation to preloader"
...
This reverts commit c48ca2874b
.
2022-07-11 19:05:52 +02:00
nosamu
7c522f2d66
Revert "web: Make preloader position relative"
...
This reverts commit ded77ab46a
.
2022-07-11 19:05:52 +02:00
Daniel Jacobs
ded77ab46a
web: Make preloader position relative
2022-07-10 13:30:42 -07:00
Daniel Jacobs
c48ca2874b
web: Add meaningless loading animation to preloader
2022-07-10 13:30:42 -07:00
Daniel Jacobs
2c067fe5dd
web: Completely remove exact px values from preloader
2022-07-10 13:30:42 -07:00
Daniel Jacobs
ed4f0b98b2
web: Workaround sometimes overwitten remove method
2022-07-10 13:30:42 -07:00
Daniel Jacobs
bec0710175
web: Add a loading screen
2022-07-10 13:30:42 -07:00
nosamu
7fa35f2a82
web: Construct relative SWF URLs using document base
2022-07-07 08:58:04 +03:00
Toad06
d53af46c76
web: Disable "Report bug" link if build is outdated
2022-05-30 20:50:15 +03:00
Robert Setter
6114f14fe0
Updating the verbiage for the AS3 warnings to try and reduce the number of support questions about it. ( #7106 )
...
* Updating AS3 warning verbiage.
* Updating AS3 verbiage
* Increase root font size
* Refining font size.
* correcting font size in .message
2022-05-29 15:08:46 +03:00
relrelb
4f05d1852d
web: Prefer using `Element` over `HTMLElement`
...
`Element` is a slightly more general type, which is more common than
`HTMLElement`, and it satisfies our needs in most cases.
2022-05-09 15:00:14 -07:00
relrelb
4ae5e89ea7
web: Enforce ESLint's `eqeqeq` rule
2022-05-06 10:40:58 -07:00
GhostlyDark
27c9637ed8
web: Don't use inline CSS attributes
2022-05-01 13:08:58 -07:00
nosamu
e8d5274a18
web: Fix compatibility with Rocket Loader
...
Cloudflare's Rocket Loader script [prevents the DOMContentLoaded event from firing](https://dev.to/hollowman6/solution-to-missing-domcontentloaded-event-when-enabling-both-html-auto-minify-and-rocket-loader-in-cloudflare-5ch8 ), which was preventing Ruffle's public API from initializing. Work around this by also listening for the `load` event.
Fixes #2254 and #6583 .
2022-04-23 19:46:32 -07:00
Mike Welsh
91c1a408fb
web: Don't set container bgcolor in transparent wmode
...
If a Flash embed set both the `bgcolor` param and transparent
`wmode`, the Ruffle polyfill would incorrectly set the container
to use the background color. Keep the background transparent instead.
2022-04-19 01:57:15 -07:00
Mike Welsh
3305ac69c4
web: Support wmode parameter
2022-04-17 08:33:51 -07:00
Daniel Jacobs
d3118b5e23
web: Youtube objects on Firefox without data attribute don't work with the rewrite by default
2022-04-10 19:25:26 -07:00
Daniel Jacobs
1d4a2fd5c6
web: Make notreallyyoutube.com use Ruffle
2022-04-10 19:25:26 -07:00
Daniel Jacobs
958b4e7291
web: Workaround mixed-content issues for YouTube Flash embeds
2022-04-10 19:25:26 -07:00
Daniel Jacobs
907b59222a
web: Don't polyfill YouTube Flash embeds
2022-04-10 19:25:26 -07:00
Toad06
2c79a5e3d8
web: Only polyfill `<object>` with `classid` when it doesn't contain another polyfillable `<object>` tag
2022-04-03 10:15:19 -07:00
Mike Welsh
dd45dc81a0
web: Fix hangs on Safari by avoiding getOutputTimestamp
...
`AudioContext.getOutputTimestamp` returns incorrect values in
Safari 15.1+, and this would cause movies with 'stream' sounds to
soft-lock because the calculated audio position would barely
progress.
See:
https://developer.apple.com/forums/thread/696356
Change the output timestamp calculation to use
`AudioContext.currentTime` instead.
2022-03-19 15:13:49 -07:00
elliot
355bd35935
web: Add specific error message for disabled WASM on Microsoft Edge ( #6423 )
...
* web: Add specific error message for disabled WASM on Microsoft Edge
Related to #6395
* web: Update Microsoft Edge WASM error message conditional
Co-Authored-By: Daniel Jacobs <danielhunterjacobs@gmail.com>
* web: Update "More Information" link for Microsoft Edge WASM error
Co-authored-by: Daniel Jacobs <danielhunterjacobs@gmail.com>
2022-03-09 23:12:21 +02:00
Chris Midgley
cf7b6b2515
web: Don't include query parameters in downloaded SWF name ( #6368 )
...
* fix: don't include query parameters in downloaded SWF name
* refactor: store swfUrl as URL
2022-02-28 22:27:56 +02:00
elliot
2b162e8532
web: Add `isPlaying` property to `RufflePlayer` ( #6294 )
2022-02-28 21:28:19 +02:00
Toad06
c14569e3d4
web: Add `refresh` method to `navigator.plugins`
2022-01-26 18:53:33 -08:00
relrelb
479719f425
web: De-duplicate TypeScript ESLint rules
...
Pull them to the root config, using the `overrides` feature:
https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns
2022-01-16 11:07:00 -08:00
relrelb
d0eb6adbc0
web: Fix `publicPath` when loaded from a CDN
...
CDNs allow omitting the filename:
* https://unpkg.com/@ruffle-rs/ruffle
* https://cdn.jsdelivr.net/npm/@ruffle-rs/ruffle
That caused `currentScriptURL` to be determined incorrectly:
```js
new URL(".", "https://unpkg.com/@ruffle-rs/ruffle ").href
// "https://unpkg.com/@ruffle-rs/ "
```
If the filename is omitted, append a slash to prevent the last
component from being dropped:
```js
new URL(".", "https://unpkg.com/@ruffle-rs/ruffle/ ").href
// "https://unpkg.com/@ruffle-rs/ruffle/ "
```
2022-01-15 14:49:19 -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
TÖRÖK Attila
db6731be2c
web: Detect and log whether WebAssembly extensions are actually used
2022-01-12 11:29:16 -08:00
TÖRÖK Attila
ab69c12649
web: Build two WASM modules, with/without extensions, load the appropriate one
2022-01-12 11:29:16 -08:00
Mike Welsh
3010c505aa
chore: Add error-report issue template
...
The `error-report` label was not being added to error reports
submitted by panics in the web player, despite the `labels` query
parameter in the URL. Users do not have triage/write access to the
repo, which is required by GitHub to add a label to an issue.
Add an issue template for error reports with the `error-report`
label. This template is now added to the issue URL, which
automatically adds the tag regardless of access level.
2022-01-02 13:59:54 -08:00
Chris Midgley
f0b29cc5d0
web: allow entering fullscreen after using escape to exit ( #5714 )
...
* web: allow entering fullscreen after using escape to exit
* chore: fmt
* web: fix fullscreen for Safari too
* web: dedupe methods and always set fullscreen
* chore: fmt
* web: use isFullscreen method
2021-12-10 19:54:22 +02:00
Daniel Jacobs
d3a5561e8f
web: Give toggleable option to download swfs in extension/selfhosted
2021-11-15 23:12:27 +02:00
Tal Hayon
7ed38850fd
core: implement displayState for Stage in avm1/2
2021-11-11 16:20:05 -07:00
Toad06
a24d469f27
web: Unmute audio on iOS when silent mode is enabled
...
Co-Authored-By: Christoph Guttandin <158417+chrisguttandin@users.noreply.github.com>
2021-10-28 08:48:22 -07:00
Mike Welsh
16c443165f
web: Add error-report label to bug report link
2021-10-24 17:21:03 -07: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
Mike Welsh
df270c55af
wgpu: Make WgpuRenderBackend::build_descriptors async
...
This will be necessary for using wgpu on web, where the whole
renderer creation will need to be async.
2021-10-24 17:20:19 -07:00
Toad06
7f317bca49
web: Don't polyfill files meant to be used as fallback content
2021-10-17 11:44:15 -07:00
Mike Welsh
04d84a3386
web: Implement WebAudioBackend::get_sound_position
2021-10-16 22:53:25 -07: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
Daniel Jacobs
2213e7d012
web: Menu embed/object attribute true value is case-insensitive
2021-09-11 14:25:52 -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
4625ca0e0b
web: fix base param
2021-09-07 16:45:35 -07:00
Daniel Jacobs
3982f3af98
web: Support menu embed/object attribute (part of #4258 )
2021-08-28 14:56:35 +02:00
Tal Hayon
8cb5cf0252
web: Adds support for base embed/object attribute (Part of #4258 )
2021-08-19 21:22:47 +02:00
Daniel Jacobs
985a97d599
web: Re-enable context menu on mobile, with option to disable ( #5000 )
...
* Re-enable context menu on mobile, with option to disable
* Review refactors
Co-authored-by: Adrian Wielgosik <adrian.wielgosik@gmail.com>
2021-08-19 20:28:40 +02:00
Daniel Jacobs
88f368ad0a
Link all CompileErrors to wiki without a report bug button
2021-08-08 11:56:20 +02:00
Daniel Jacobs
38ae22e834
Add a loadeddata event, which triggers when loadedmetadata does for now
2021-08-03 14:28:20 -07:00
Adrian Wielgosik
02dd0ae463
web: add isExtension info to panic info and context menu version string
2021-08-03 17:47:42 +02:00
Adrian Wielgosik
b940e7f00f
Extension: Sidestep CORS issues by offering to load the SWF in a tab
2021-08-02 21:28:16 +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
f9be5c2230
web: Unify "menu_item" and "active" CSS classes
...
It seems that these two classes were totally equivalent, so simply
drop "active" and use only "menu_item".
Also, don't highlight disabled context menu items on hover.
2021-07-13 23:45:18 +03:00
divinity76
c94ebf133a
open "not yet supported more info" in new tab
...
i fully intended to press "run anyway" just to see what happened, and it was annoying that Ruffle took me to another page so i had to re-load the flash.. (from a page with 10 seconds worth of ads before playing the flash, even)
2021-07-13 21:42:50 +03:00
relrelb
df47c53f5c
web: Remove unused `RufflePlayer._trace_observer`
2021-07-12 23:21:14 +03:00
relrelb
803da71e9c
web: Remove `RufflePlayer.playButtonClicked`
...
Replace its few usages with `play` which is part of the public API.
Also made little cleanups to the selfhosted test utils along the way.
2021-07-12 23:21:14 +03:00
Daniel Jacobs
bdf693c9c4
Remove error report link from could not download wasm module
2021-07-08 20:20:57 +02:00
relrelb
558bbdb520
web: Cleanup .eslintrc.json files
...
* `eslint:recommended` is not needed in the each file as it already
appears in the root config.
* The default `@typescript-eslint/naming-convention` rule is preferred.
* Other formatting improvements.
2021-07-03 21:18:42 +03:00
relrelb
6010fac5d4
web: Fix lint warnings
...
Using `npm run format`.
2021-06-23 15:04:54 +03:00
Chris Midgley
55685b0a2d
lint: fix prettier errors
2021-06-20 02:21:17 -07:00
Daniel Jacobs
b52b2a64da
web: Fix wasm compile error check
2021-06-07 11:30:17 -07:00
Daniel Jacobs
bd2db4cca3
web: Add better error information about wasm CompileErrors
2021-06-05 10:15:34 -07:00
Chris Midgley
cb601255d9
web: improve typescript types
2021-06-05 10:12:59 -07:00
Mike Welsh
22948789b8
web: Add MovieData.isActionScript3 and backgroundColor
2021-05-23 23:02:38 -07:00
Toad06
c5233ed172
web: Make `unmuteOverlay: "hidden"` resume audio without extra click
2021-05-16 23:34:11 -07:00
Toad06
0ee6b62517
web: Add a `none` value to completely disable the unmute overlay
2021-05-16 23:34:11 -07:00
Adrian Wielgosik
c40d08e73a
web: Fix context menu checkmark in web builds
2021-05-10 00:19:29 -07:00
Adrian Wielgosik
8ca22c1f02
core: Support for custom context menu items on movie root
2021-05-02 15:28:00 -07:00
relrelb
f8a8b82c04
web: Cleanup ESLint configuration
...
* Cleanup .eslintrc.json files.
* Avoid unnecessary eslint-* directives.
2021-04-30 18:16:55 -07:00
Adrian Wielgosik
940cb8d2f7
web: Use unicode escapes for checkbox emojis
2021-04-28 13:58:04 -07:00
Adrian Wielgosik
a1737b5922
avm1: Respect menu.builtInItems, but on root clip only
2021-04-27 16:42:02 -07:00
Adrian Wielgosik
be40e2ce28
Fix formatting
2021-04-27 16:42:02 -07:00
Adrian Wielgosik
ce4d66e0f4
avm1: support Stage.showMenu
2021-04-27 16:42:02 -07:00
Adrian Wielgosik
41a126885c
web: Minimal context menu buttons for movie control
2021-04-27 16:42:02 -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
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
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
Mike Welsh
ae9be98821
web: Disable context menu from touch events
...
Once a touch event is seen, completely disable the context menu to
prevent a long press from triggering the context menu.
Fixes #1972 .
2021-04-12 16:28:43 -07:00
Chris Midgley
aab3ff781d
web: use customElements.get over try-catch
2021-04-09 14:37:09 -07:00
Chris Midgley
a171883d39
web: check for window.customElements before entering loop
2021-04-09 14:37:09 -07:00
Chris Midgley
2e42942058
web: try a limited number of times defining a custom element
2021-04-09 14:37:09 -07:00
Chris Midgley
20480ef6d8
web: crash out of infinite loop if not NotSupportedError
2021-04-09 14:37:09 -07:00
Mike Welsh
d0c7aa0dff
web: Fix fullscreen sizing on Safari
...
When Ruffle would go fullscreen on Safari, the content would often
not fill the viewport because Ruffle's width/height CSS would
override the :-webkit-full-screen CSS that Safari adds.
Add our own :-webkit-full-screen CSS with !important to force 100%
dimensions in fullscreen.
2021-03-25 16:26:37 -07:00
Suhao Jeffrey Huang
ce72277a07
web: Hide navigation bar in fullscreen on Android ( fix #1698 )
2021-03-25 16:26:37 -07:00
relrelb
56cece3336
web: Use publicPath() instead of ruffleRuntimePath
...
Similarly to how selfhosted currently does.
2021-03-13 02:19:05 -08:00
relrelb
1ed8dea599
web: Improvements
2021-03-05 23:07:55 -08:00
relrelb
d62c3c0500
web: Fix CSS variables in shadow-template.ts
...
Apparently CSS variables need to be defined in :host rather than in
:root when it comes to shadow DOM.
2021-02-25 14:34:40 -08:00
relrelb
1b41f8fad1
web: Fix panic message alignment
2021-02-25 14:34:40 -08:00
Mike Welsh
eb173f06ca
web: Strip query params from URL in GitHub issue titles
2021-02-20 14:12:07 -08:00
relrelb
73b5916b2a
web: Fix player positioning
2021-02-19 17:40:43 -08:00
relrelb
6a710fa1f3
web: Remove stale globals definitions
...
They were removed in 3e084963c6
.
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
Ben Lubar
1c620b2c9b
add TypeScript documentation for maxExecutionDuration
2021-02-16 20:31:40 -08:00
Adrian Wielgosik
f787cffe54
web: Minimal polyfill of window.Reflect
2021-02-09 19:10:47 -08:00
Toad06
b5749ee228
web: Fix some context menu and warning message issues
2021-02-04 15:10:04 -08:00
Mads Marquart
1990e51639
avm2: Add UiBackend::display_unsupported_message
...
To allow displaying rich content when unsupported ActionScript 3 content is encountered.
2021-01-31 23:04:20 -08:00
Brian Gontowski
31dd2729e2
web: Add an onFSCommand callback into JavaScript
2021-01-31 18:03:31 -08:00
Toad06
b62ca3d589
web: Move `allowScriptAccess` to `BaseLoadOptions`
2021-01-30 16:59:58 -08:00
Omar Shehata
218f1f1da5
web: Pause player when tab is inactive ( close #347 )
2021-01-26 22:34:43 -08:00
Adrian Wielgosik
9195491f1b
web: Redesign the context menu
2021-01-26 17:12:43 -08:00
relrelb
aeda974143
web: Rename contextMenu to contextMenuElement
...
Firefox has a read-only "contextMenu" property, so avoid
shadowing it.
2021-01-25 03:51:50 -08:00
relrelb
b07eb07afb
web: Revert config removal
2021-01-25 03:51:50 -08:00
relrelb
5827801b03
web: Rename config.showContextMenu to config.contextMenu
2021-01-25 03:51:50 -08:00
relrelb
70326108b9
web: Rename "right click menu" to "context menu"
2021-01-25 03:51:50 -08:00
relrelb
21b0128bca
web: Add option to disable the context menu
2021-01-25 03:51:50 -08:00
Toad06
dc2b4fcc42
web: Use enum instead of arbitrary values
2021-01-20 15:03:52 -08:00
Toad06
bc47bfb9e9
web: Display appropriate errors when Ruffle fails to initialize
2021-01-20 15:03:52 -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
Mike Welsh
9bb36885bb
web: Add backgroundColor option and support bgcolor attribute
...
Add `backgroundColor` setting to the config options, allowing
a user to override the background color of an SWF. The polyfill
will now look for the `bgcolor` HTML attribute on the embed
and fill in this setting appropriately.
2021-01-13 11:57:19 -08:00
TÖRÖK Attila
cce3a8199d
web: Add a config option to disable the message about unsupported content
2021-01-10 16:02:23 -08:00
relrelb
828d8b7339
demo: General refactor
...
General cleanup and refactoring of the web demo
2021-01-09 19:36:05 -08:00
Toad06
b81fb64be9
web: Prevent "414 URI Too Long" error on Github when reporting bugs
2021-01-07 11:51:00 -08:00
Mike Welsh
01aca9f861
web: Remove upgrade_to_https param from Ruffle::new
...
Grab it from the `config` directly instead of using an extra param.
2021-01-07 11:46:07 -08:00
Mike Welsh
8728804f28
web: Add letterbox config option
2021-01-07 11:46:07 -08:00
Toad06
24362d72e3
web: Fix minor issues in `ruffle-player.ts`
2021-01-06 12:04:03 -08:00
Toad06
201d014edb
web: Read the `allowScriptAccess` property from `embed` tags
2021-01-04 13:08:02 -08:00