Commit Graph

1212 Commits

Author SHA1 Message Date
Crowdin Bot 58b18e282b chore: Update translations from Crowdin 2023-10-02 00:57:34 +02:00
Crowdin Bot bd67a5845b chore: Update translations from Crowdin 2023-09-24 12:13:31 +02:00
Crowdin Bot 5b9806bdb3 chore: Update translations from Crowdin 2023-09-19 23:41:23 +02:00
Daniel Jacobs a768399612 web: Only re-run polyfill when embed or object added to DOM 2023-09-19 20:49:27 +02:00
Daniel Jacobs 65d1ba4803 web: Switch from deprecated rules property to preferred cssRules 2023-09-18 21:28:27 +02:00
Daniel Jacobs c1f53b3253 web: Fix deletion order of dynamicStyles rules 2023-09-18 21:28:27 +02:00
Crowdin Bot 695c2ff9f5 chore: Update translations from Crowdin 2023-09-18 00:03:15 +02:00
Crowdin Bot 7f416f85a8 chore: Update translations from Crowdin 2023-09-14 23:50:25 +02:00
Daniel Jacobs 33eb739ee6 web: Add width, height, and type to RufflePlayer (fix #13176) 2023-09-14 23:49:31 +02:00
Daniel Jacobs d6bc408286 web: Don't show context menu when any modal is open (fix #13096) 2023-09-08 20:26:18 +02:00
Kornelius Rohrschneider 53ba75d587 Move logarithmic volume transformation to AudioMixer
Previously, the volume transformation to adapt the volume for
logarithmic hearing has been performed in the VolumeControls Rust struct
and TypeScript class each.
Since this calculation is the same on desktop and web and should be
implemented in the audio backend, it has been moved into the
AudioMixer::mix_audio method.
The VolumeControls struct and class now only calculate the linear volume
out of the checkbox and the slider.
Player::set_volume and Player::volume now don't take and return the
adapted volume, but use the linear volume (which gets saved internally).
2023-09-07 00:51:58 +02:00
Kornelius Rohrschneider f04470247e web: Add web volume controls
The web version of Ruffle now has a volume controls window. It can be
accessed through the right-click menu (Right-click > Volume controls).
It contains a mute button and a slider from 0 to 100.

To achieve this, a new volume controls modal has been added to the
shadow template.
TypeScript is used to create texts, set the controls and add event
listeners to update the settings and controls when being changed.

The volume settings set in the GUI are saved in a new VolumeControls
class, which is also used to calculate the real volume (adapted for
logarithmic hearing) out of the entered volume and the mute checkbox.
As soon as the volume is changed in the GUI, the real volume will be set
in the Ruffle instance.

The existing ftl files have been adapted (and new ones have been
created) to include the new multilingual text in the right-click menu
and the volume controls window.

This closes #1771.
2023-09-07 00:51:58 +02:00
Crowdin Bot d195da59af chore: Update translations from Crowdin 2023-09-06 23:55:17 +02:00
Crowdin Bot 654799b1a9 chore: Update translations from Crowdin 2023-09-06 12:22:24 +02:00
Crowdin Bot 2996f97578 chore: Update translations from Crowdin 2023-09-02 15:43:08 +02:00
renovate[bot] d14550e851 chore(deps): update node.js dependencies 2023-09-02 15:19:06 +02:00
Crowdin Bot cf9171cb78 chore: Update translations from Crowdin 2023-08-31 00:13:04 +02:00
Crowdin Bot 378b415a3b chore: Update translations from Crowdin 2023-08-26 23:27:47 +02:00
Daniel Jacobs 18e89f6132
web: Remove all occurences of innerHTML (except in test files) (#12937)
* web: Remove most occurences of innerHTML

* web: Use helper methods for shadow template element creation

* web: Refactor createErrorFooter function

* web: Shadow template code cleanup

* web: Add helper function to add CSS rules to shadow template

---------

Co-authored-by: nosamu <71368227+n0samu@users.noreply.github.com>
2023-08-26 22:51:16 +03:00
nosamu 11a17dfb4e extension: Don't show CORS error on internal player page
The player page is not restricted by CORS
2023-08-26 11:33:56 +02:00
nosamu 3df6e13848 extension: Fix HTML structure of 'open in new tab' message 2023-08-26 11:33:56 +02:00
nosamu 7838d4549b web: Don't try to enter fullscreen if already in fullscreen & vice versa
Fixes #9615
2023-08-26 11:09:02 +03:00
nosamu b456296769 extension: Persist content script registration across sessions 2023-08-26 01:21:07 +02:00
Crowdin Bot 07c236df5b chore: Update translations from Crowdin 2023-08-26 00:27:56 +02:00
nosamu 3920eb90cd extension: Register listeners synchronously at top level of service worker 2023-08-25 23:56:52 +02:00
Crowdin Bot 3ccda582e1 chore: Update translations from Crowdin 2023-08-25 11:50:24 +02:00
Crowdin Bot 1b03ce9ae6 chore: Update translations from Crowdin 2023-08-23 23:59:54 +02:00
Crowdin Bot d55cc23f55 chore: Update translations from Crowdin 2023-08-22 23:06:46 +02:00
Daniel Jacobs acc315ebfb extension: Fix check for scripting permission 2023-08-22 22:47:28 +02:00
Daniel Jacobs eef65da345 extension: Remove unnecessary lambda functions 2023-08-22 22:17:18 +02:00
Nathan Adams 9d05a37f34 web: Make open-in-new-tab open the local player directly, and disable takeover of all SWF urls 2023-08-22 19:35:05 +02:00
Daniel Jacobs ba52438c27 extension: Fix-ups for extension player page 2023-08-22 17:50:37 +02:00
Crowdin Bot 3de4b4e989 chore: Update translations from Crowdin 2023-08-21 23:09:03 +02:00
Daniel Jacobs 1a28f83229 extension: Address review feedback 2023-08-20 19:51:14 +02:00
Nathan Adams d5fa0f56ea web: Make loadedConfig private again, add reload() method instead 2023-08-20 19:51:14 +02:00
Daniel Jacobs e7df6d890e extension: Make the player page a local Ruffle demo 2023-08-20 19:51:14 +02:00
renovate[bot] 98eb789f21 chore(deps): update node.js dependencies 2023-08-19 14:37:36 +02:00
Nathan Adams cdaf06838c web: Add short_name for extension 2023-08-19 10:02:53 +02:00
Nathan Adams d21520a4c7 web: Rename extension to 'Ruffle - Flash Emulator', to increase visibility for everyone searching for 'Flash' 2023-08-19 01:11:25 +02:00
Nathan Adams 9328caa713 web: Remove webRequest permission from chrome extension 2023-08-17 08:51:57 +02:00
Crowdin Bot cad8e10f30 chore: Update translations from Crowdin 2023-08-15 00:28:29 +02:00
Nathan Adams ee8da51c6b web: Use 'chrome?.scripting' to test for direct vs indirect pluginPolyfill pmethod, as firefox pretends to be chrome here 2023-08-14 21:21:20 +02:00
Nathan Adams 49d0d417c2 web: Make firefox also use the hash for player.html swf url 2023-08-14 21:21:20 +02:00
Nathan Adams 2f9387f1ac web: Inject plugin polyfill immediately, on chrome/edge 2023-08-14 21:21:20 +02:00
Nathan Adams 7533923f9b web: Remove check for RufflePlayer in content.ts - it can't possibly ever be true 2023-08-14 21:21:20 +02:00
Nathan Adams 1ec12f0931 web: Inject polyfill via url instead of inline, on chrome/edge 2023-08-14 21:21:20 +02:00
Nathan Adams 71000dd19a web: When using manifest v3, do swf takeover using declarativeNetRequest 2023-08-14 21:21:20 +02:00
Nathan Adams 92ea9a535d web: Change manifest v3 background script to a service worker 2023-08-14 21:21:20 +02:00
Nathan Adams 5847772b58 web: Apply 'incognito' directly to the v3 manifest, instead of in a script 2023-08-14 21:21:20 +02:00
Nathan Adams c3b486f19b web: Apply 'wasm-unsafe-eval' directly to the v3 manifest, instead of in a script (and renamed from 'wasm-eval') 2023-08-14 21:21:20 +02:00
Nathan Adams 8b3ea305a5 web: Changed web_accessible_resources to an object in manifest v3 2023-08-14 21:21:20 +02:00
Nathan Adams 9ddf9b9621 web: Extract "all_urls" in manifest v3 to "host_permissions" from "permissions" 2023-08-14 21:21:20 +02:00
Nathan Adams 54be7ffacd web: Changed manifest v3 content_security_policy to an object containing extension_pages 2023-08-14 21:21:20 +02:00
Nathan Adams 22601514bc web: Rename manifest v3 browser_action to action, and removed browser_style as it's no longer an option 2023-08-14 21:21:20 +02:00
Nathan Adams 353193b3e4 web: Split manifest into firefox vs other 2023-08-14 21:21:20 +02:00
Nathan Adams 283a0694de web: Remove ruffle extension detection plugin 2023-08-14 20:51:11 +02:00
Crowdin Bot 70b43fc2ff chore: Update translations from Crowdin 2023-08-12 01:36:46 +02:00
Tom Schuster 0a55c04eaf web: Include the version in the new ruffle instance console message 2023-08-12 01:13:59 +02:00
Crowdin Bot 8e1632ab22 chore: Update translations from Crowdin 2023-08-11 10:23:54 +02:00
nosamu 5936de03e7 extension: Add exclusions for Tuxedo Computers and Taobao
Problems reported in #11906 and in a Chrome Web Store review
2023-08-09 08:34:59 +02:00
Crowdin Bot 205ef09cc6 chore: Update translations from Crowdin 2023-08-08 23:49:31 +02:00
Nathan Adams 9125d30e76 web: Don't store the full semver version as the version name, just construct it when needed 2023-08-08 14:33:49 -06:00
Daniel Jacobs c5aa5189e7 extension: Allow video to load from any source in internal player page 2023-08-07 14:31:33 -06:00
Daniel Jacobs 91c2d0efa4 web: Create modal to hold unsupported videos 2023-08-07 14:31:33 -06:00
Daniel Jacobs dbb5e381f2 core/desktop/web: Play unsupported videos with browser 2023-08-07 14:31:33 -06:00
TÖRÖK Attila ddc290ddf9 chore: Appease prettier. 2023-08-07 09:22:58 +03:00
renovate[bot] 863ce90d9d chore(deps): bump node.js dependencies 2023-08-07 09:22:58 +03:00
Nathan Adams 44623bf28f web: Remove extension specific code in polyfill, doesn't need to exist now 2023-08-06 23:55:39 +02:00
Nathan Adams 7a39dc9176 web: Add build date as part of version buildinfo 2023-08-06 23:55:39 +02:00
Nathan Adams 64d951099d web: Compare build ident if all else fails, when finding best versions 2023-08-06 23:55:39 +02:00
Nathan Adams ee1e8ec267 web: Extension shouldn't set options that are default 2023-08-06 23:55:39 +02:00
Nathan Adams 4f4dbc7973 web: Fix PublicAPI superseding, it previously always thought 'the latest ran' should replace the older version 2023-08-06 23:55:39 +02:00
Adrian Wielgosik c41d7d56f0 build: Reduce disk use of reproducible docker builds 2023-08-05 12:07:59 +02:00
Crowdin Bot 98c286e997 chore: Update translations from Crowdin 2023-08-04 17:18:58 +02:00
Oleksandr Kalko 2c4bd5c5c7
chore: Run `npm update --save` 2023-07-30 21:12:47 +00:00
Crowdin Bot 280de7cd61 chore: Update translations from Crowdin 2023-07-27 16:39:17 +02:00
renovate[bot] 3326aef6a8 chore(deps): lock file maintenance node.js dependencies 2023-07-25 17:42:46 +02:00
Nathan Adams e610c9a9ce web: Readd warnOnUnsupportedContent for backwards compatibility, but mark it deprecated and unused 2023-07-22 23:08:42 +02:00
Nathan Adams 586c3bebf6 core: Remove unsupported content warning 2023-07-22 23:08:42 +02:00
Daniel Jacobs 46a726efc6 chore: formatting 2023-07-21 23:34:43 +02:00
Daniel Jacobs e99d7f63dc extension: Don't throw error when Firefox add-on is in review 2023-07-21 23:34:43 +02:00
Nathan Adams 3447b8bfdd chore: npm run format 2023-07-20 14:00:04 +02:00
Crowdin Bot b2afcbaf3e chore: Update translations from Crowdin 2023-07-20 13:41:04 +02:00
Daniel Jacobs affff425c5 web: Fix typo in build_wasm.js 2023-07-19 11:37:15 -04:00
Nathan Adams 34c0d41fca web: Remove no longer needed depencency 'shx' 2023-07-15 23:48:04 +02:00
Nathan Adams be48ff357f web: Add build_wasm.js script to replace chained npm scripts 2023-07-15 23:48:04 +02:00
nosamu 48e37914cf web: Make isTouch indicate the source of the last PointerEvent
This allows the behavior of the context menu to change depending
on whether it was triggered by a touch or right-click.
2023-07-15 19:14:13 +02:00
nosamu e7689ac883 Revert "web: Make isTouch locally scoped to showContextMenu"
This completely broke touch detection
2023-07-15 19:14:13 +02:00
Aaron Hill 009fab1889 core: Expose `LoaderInfo.parameters` and fix other properties
When using a 'Loader', properties on the 'contentLoaderInfo' become
set during specific events in the load sequence. In particular,
'LoaderInfo.bytesTotal' becomes available during the first 'progress'
event.

Also, 'LoaderInfo.parameters' is now properly set from the URL query
parameters. In Flash player, this work even with filesystem urls
(e.g. 'file:///some/path/to/file.txt?paramOne=valOne' will load
a file named 'file.txt', setting and expose the parameter 'paramOne'
with value 'valOne' in `LoaderInfo.parameters`). This required some
cleanup to the desktop and test NavigatorBackend impls to strip
out query parameters when loading a parameter from disk.

Previously, we would set `SwfMovie.parameters` manually from the url.
Now, the various `SwfMovie` constructors automatically extract
query parameters from the provided url. Outside of `SwfMovie`,
we only append *extra* parameters (e.g. those set from `flashvars`).

This makes CPMStar ads work, since the loaded SWF needs to access
`LoaderInfo.parameters`
2023-07-05 19:47:16 -04: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
Crowdin Bot 80588d614d chore: Update translations from Crowdin 2023-07-02 11:41:18 +02:00
renovate[bot] 898b2c8948 chore(deps): lock file maintenance node.js dependencies 2023-07-01 12:20:10 +03:00
Crowdin Bot 29a5c6a4cd chore: Update translations from Crowdin 2023-07-01 00:47:31 +02:00
Crowdin Bot 1430e98851 chore: Update translations from Crowdin 2023-06-28 23:19:47 +02:00
relrelb f4c9142399 web: Assign `isExtension` only if `currentScriptURL` is available 2023-06-25 08:09:24 +03:00
relrelb e4bb8a60fa web: Don't report extension URL on error 2023-06-25 08:09:24 +03:00
Crowdin Bot 9e066bc14f chore: Update translations from Crowdin 2023-06-24 19:58:34 +02:00
Daniel Jacobs 9a093d20be
web: Don't auto-panic on browsers without ReadableStream (#11699)
* web: Don't auto-panic on browsers without ReadableStream

* web: Add comment explaining Pale Moon issue

* web: Simplify ReadableStream check
2023-06-24 15:10:19 +00:00
Crowdin Bot b1149cd267 chore: Update translations from Crowdin 2023-06-23 11:49:47 +02:00
nosamu 58780b3a4e extension: Ignore publicPath config 2023-06-23 09:05:37 +03:00
nosamu 99ed30f6e7 web: Set isExtension var using current script URL 2023-06-23 09:05:37 +03:00
Crowdin Bot 67a5a2923f chore: Update translations from Crowdin 2023-06-20 23:52:03 +02:00
nosamu 700f765f91 web: Use for..of instead of for..in loops 2023-06-18 22:09:20 +02:00
Toad06 31bb117325 web: Allow setting `allowScriptAccess` on global config 2023-06-18 08:18:52 +03:00
Crowdin Bot 73482c6e72 chore: Update translations from Crowdin 2023-06-18 01:02:34 +02:00
Crowdin Bot ca549e482c chore: Update translations from Crowdin 2023-06-17 19:25:33 +02:00
Crowdin Bot 56a87dec50 chore: Update translations from Crowdin 2023-06-15 13:10:16 +02:00
nosamu 202fe2f1bb core: Add options to set and force the stage alignment 2023-06-14 16:04:14 +02:00
Daniel Jacobs 0c1cd6aa4f selfhosted: Add a config option to enable Ruffle even on Flash browsers 2023-06-14 14:31:44 +02:00
Daniel Jacobs a666d35161 web: Stop error if Fetch response lacks headers 2023-06-13 08:52:58 +03:00
Crowdin Bot 834297f110 chore: Update translations from Crowdin 2023-06-12 12:28:05 +02:00
Oleksandr Kalko 70aa8385b7
chore: Upgrade NodeJS dependencies (#11352) 2023-06-09 15:50:59 +00:00
Crowdin Bot 93f5869005 chore: Update translations from Crowdin 2023-06-08 00:57:49 +02:00
Daniel Jacobs 55efb80dd6 web: Don't try to use Ruffle on browsers with Flash support 2023-06-07 23:48:39 +02:00
Crowdin Bot 808deaa378 chore: Update translations from Crowdin 2023-06-05 09:00:51 +02:00
Crowdin Bot 9767ffca96 chore: Update translations from Crowdin 2023-06-03 15:58:24 +02:00
renovate[bot] 6bc5d72995 chore(deps): lock file maintenance node.js dependencies 2023-06-01 08:59:52 +03:00
renovate[bot] 8bf44926af chore(deps): update node.js dependencies 2023-06-01 08:45:23 +03:00
Daniel Jacobs a2fa855156 web: Update youtube check to be more accurate using regex 2023-05-31 21:06:25 +03:00
relrelb 17e0eb112b web: Enforce ESLint's `camelcase` rule 2023-05-31 08:22:15 +03:00
Crowdin Bot 6dc3743f4b chore: Update translations from Crowdin 2023-05-30 23:21:28 +02:00
Toad06 7830a8232b
web: Allow extra MIME types in the polyfill 2023-05-30 06:35:29 +00:00
Toad06 6c0cf8fc83 web: Fix minor issues with the context menu 2023-05-28 07:51:00 +03:00
Crowdin Bot e98230c988 chore: Update translations from Crowdin 2023-05-27 00:34:44 +02:00
Crowdin Bot f3dd5dbfb6 chore: Update translations from Crowdin 2023-05-25 00:27:48 +02:00
Crowdin Bot fe4475d553 chore: Update translations from Crowdin 2023-05-23 00:05:58 +02:00
Crowdin Bot fde4c99560 chore: Update translations from Crowdin 2023-05-22 08:51:22 +03:00
nosamu 7dfc36c6fc web: Support pasting from clipboard 2023-05-21 15:26:42 +02:00
Toad06 0ff4f26db9 extension: Add a button to reset settings 2023-05-21 00:03:19 +02:00
renovate[bot] 2ca0140192 chore(deps): lock file maintenance node.js dependencies 2023-05-20 23:41:57 +03:00
Crowdin Bot 6a00475358 chore: Update translations from Crowdin 2023-05-20 00:12:12 +02:00
Toad06 4092e70bf4 extension: Remove "tabs" permission 2023-05-19 01:03:28 +02:00
nosamu 77f2875898 extension: Set charset attribute of script tag instead of escaping characters 2023-05-18 22:39:06 +02:00
Crowdin Bot e3da17b426 chore: Update translations from Crowdin 2023-05-18 13:01:57 +02:00
Toad06 b9abc463d6 web: Minor improvements to the extension player page 2023-05-18 03:34:19 +03:00
Crowdin Bot 7c954925ba chore: Update translations from Crowdin 2023-05-17 02:36:40 +02:00
renovate[bot] 82c61b5a52 chore(deps): update node.js dependencies 2023-05-16 22:57:24 +02:00
Daniel Jacobs 56afce2e3a web: Fix localStorage check on Firefox when dom.storage.enabled is false 2023-05-16 22:10:42 +03:00
Toad06 19c0bb14d5 web: Only minify ascii characters on selfhosted builds 2023-05-16 21:39:40 +03:00
Toad06 55c7a4b895 extension: Don't say that Ruffle cannot load on "player.html" 2023-05-15 16:22:29 +03:00
Toad06 dd4c805e70 web: Escape non-ASCII characters to prevent issues on non-UTF-8 encoded pages
Co-Authored-By: relrelb <relrelb@users.noreply.github.com>
2023-05-15 11:57:05 +03:00
Nathan Adams a9ba46594f chore: Updated translations from Crowdin 2023-05-14 13:31:32 +02:00
Toad06 9671b9b824
web: Download all sols as single .zip 2023-05-13 19:19:00 +03:00
Toad06 94ad41dfd4 web: Update source string 2023-05-11 09:36:06 +03:00
relrelb e01b613a78 web: Fix another instance of "Unable to lock Ruffle core"
After a panic, `Ruffle::renderer_debug_info()` cannot be called since
it tries to immutably borrow the underlying `Player`, but `Ruffle::tick()`
already holds it mutably.

As a fix, simply use the `_cachedDebugInfo` which is fetched in
advance, before any panic occurs. Rename it to just `rendererDebugInfo`
(without "cache" in its name), because now it's mandated.
2023-05-11 08:33:33 +03:00
Daniel Jacobs ea78bf2d39
web: Make isTouch locally scoped to showContextMenu 2023-05-10 17:31:07 +03:00
Nathan Adams fc96fdf1cc chore: Update translations from Crowdin 2023-05-10 00:29:13 +02:00
Nathan Adams 72769eeefa web: Localise text inside shadow template 2023-05-09 00:06:49 +02:00
Nathan Adams a29f1f75dc web: Localise the 'cant embed' message 2023-05-09 00:06:49 +02:00
Nathan Adams 1db72a0ffd web: Localise error messages 2023-05-09 00:06:49 +02:00
Nathan Adams 2430cf192e web: Localise fullscreen toggle 2023-05-09 00:06:49 +02:00
Nathan Adams d70faeec04 web: Localise save manager prompts 2023-05-09 00:06:49 +02:00
Nathan Adams 9be198212b web: Translate various button texts 2023-05-09 00:06:49 +02:00
Nathan Adams b7794749d8 web: Localise the unsupported avm2 message 2023-05-09 00:06:49 +02:00
Nathan Adams 07dea7b164 web: Add localisation to web 2023-05-09 00:06:49 +02:00
Daniel Jacobs 01a69b60bc web: Remove ContextMenu.TouchOnly as it is unlikely to be useful 2023-05-08 23:53:31 +03:00
Daniel Jacobs e7877706ef web: Use typeof to simplify check for usage of deprecated contextMenu 2023-05-08 23:53:31 +03:00
Daniel Jacobs 4790ea7304 web: Combine contextMenu with touchContextMenu 2023-05-08 23:53:31 +03:00
Daniel Jacobs 68f493336a web: Configuration to disable context menu on touch 2023-05-08 23:53:31 +03:00
Toad06 58d786b869 extension: Localize more strings 2023-05-05 00:28:11 +03:00
nosamu 9b2dc262d5 extension: Update and improve messages 2023-05-03 09:44:01 +03:00
nosamu 36710f87d9 extension: Add an Automatic option for preferred renderer 2023-05-03 09:44:01 +03:00
relrelb ed1eaa440e extension: Introduce "Advanced Options"
To avoid visual clutter, move some less handy options under a
collapsible area:

* Log level
* Ignore website compatibility warnings
* Maximum allowed ActionScript execution duration (description was
shortened in this commit)
* Preferred renderer
* Player version number
2023-05-03 09:44:01 +03:00
iwannabethedev 307f364d6f
web: Log used renderer
Log which renderer-backend was actually used in the
browser console.
2023-05-02 23:59:57 +03:00
Kornelius Rohrschneider fe56f8d212 core: Implement suggested changes in PR to documentation & code
- Documentation has been added, improved and clarified.
- The code of a string concatenation has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 27738a492e web: Implement suggested changes in PR to navigate_to_url handling
The suggested changes to the navigate_to_url handling in the feedback to
the pull request have been implemented.
Therefore, this commit consists of multiple smaller changes:

1. The allow_javascript_calls variable has been removed (as a CLI
argument and in the navigator). Javascript calls are now always denied
on desktop. This is because setting the argument was useless; no
javascript was executed in any case, at most, just a browser tab opened.
Therefore, it makes no sense to include this option.
2. The NavigateWebsiteHandlingMode default value has been provisionally
changed from Confirm to Allow. In the future (after a GUI toolkit has
been added), the default confirmation windows should include a "Save
this preference" checkbox.
3. The NetworkingRestrictionMode enum has been renamed to
NetworkingAccessMode since the previous naming was counter-intuitive.
4. The NavigateWebsiteHandlingMode enum (and variables related to it)
have been renamed to OpenURLMode to simplify the name.
5. The documentation has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 809a9f6907 web: Add and partially implement networking API restrictions
The networking API restrictions imposed by the allowNetworking parameter
& attribute have been added and partially implemented.

A new NetworkingRestrictionMode enum has been added to Ruffle (in Rust
and Typescript). It contains the values "All", "Internal" and "None" and
models the possible values of the allowNetworking parameter / attribute.
All means that all networking APIs are permitted in the SWF file,
Internal means that the SWF file may not call browser navigation or
browser interaction APIs and None means the same and that the SWF file
cannot use any SWF-to-SWF communication APIs either.
A respective allowNetworking variable has been added to the JS config.
Its default value is All.
Ruffle now recognises the allowNetworking parameter and attribute in the
SWF HTML object and parses it and sets the config variable
correspondingly if it's recognised.
Only if the variable is set to All, the external interface (responsible
for javascript calls in AS3) is created. Additionally, the variable is
given to the WebNavigatorBackend and saved in it. The navigator denies
all navigate_to_url calls if the variable hasn't been set to All.
Therefore, the API restrictions imposed by setting allowNetworking to
internal or none have been partially implemented.

Formatting has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 44ef22f646 core: Add navigate_to_url call configuration options
New configuration options (changing the navigate_to_url call handling)
have been added. The default behaviour has been changed as well.

A NavigateWebsiteHandlingMode enum has been added to Ruffle (in Rust and
Typescript). It contains the values "Allow", "Confirm" and "Deny" and
describes how navigate_to_url website calls should be handled. Allow
means that all website calls are allowed, Confirm means that a
confirmation window opens with each website call and Deny means that all
website calls are denied.
A respective navigate_website_handling_mode variable has been added to
the desktop CLI and to the JS config. The default value is "Confirm" in
each. The variable is given to the navigator (ExternalNavigatorBackend
or WebNavigatorBackend, depending on the platform) and is saved in it.
On each navigate_to_url website call, the respective navigator is now
checking navigate_website_handling_mode and acts correspondingly (allows
it, opens a confirmation window or denies it).
This changes the default behaviour of Ruffle from allowing all website
calls to opening a confirmation window with each website call.
On Safari, the confirm window can cause the background music to stop,
but this seems to be an issue with Safari.
Closes #838.

Additionally, an allow_javascript_calls variable (which defaults to
false) has been added to the desktop CLI. The variable is given to the
desktop navigator and is saved in it.
If a navigate_to_url javascript call is executed on desktop, the
navigator is now checking allow_javascript_calls and acts
correspondingly (allows it or denies it).
This changes the default behaviour of Ruffle on desktop to not allowing
javascript calls.
Closes #9316.
2023-05-02 17:13:42 +02:00
divinity76 7bc51ae2cb
web: Make panicText readonly
it's not supposed to be editable. ref https://github.com/ruffle-rs/ruffle/pull/10819#issuecomment-1529977894
2023-05-02 06:53:44 +00:00
Adrian Wielgosik e1d47e3527 web: Avoid array.at() for browser compatibility 2023-05-02 01:00:20 +02:00
nosamu 91bc57c67f web: Fix panic error details display
Fix regression caused by #10819
2023-05-01 08:52:46 +03:00
iwannabethedev 7b10052c26 extension: Add UI presentation for playerVersion default value. 2023-04-30 07:45:19 +03:00
iwannabethedev 1f956ffe55 web: Add extension option for setting 'playerVersion'.
Basic input validation UI and logic is also added and improved.
2023-04-29 01:09:09 +03:00
iwannabethedev e211f57f81 extension: Fix popup setting changed reload detection.
The problem seems to have been the inclusion of setting values
that the previous equality function did not handle correctly.
This function broadens the kinds of setting values that can
be handled correctly.
2023-04-28 11:06:52 +03:00
iwannabethedev b01e797e99
extension: Add option for setting max. exec. time
Add an option to the 'options' menu for the extension
for setting the maximum execution time for Actionscript
code.
2023-04-27 09:47:56 +00:00
iwannabethedev eaee14c7de web: Use default configuration in extension. 2023-04-26 23:24:53 +02:00
Toad06 f3a0652aea extension: Close `popup.html` when opening/reloading a window 2023-04-26 22:08:12 +03:00
Daniel Jacobs 24dfb82d12 web: Address save manager styling review comments 2023-04-26 14:36:49 +02:00
Daniel Jacobs 902911745b web: Use different heights for save manager 2023-04-26 14:36:49 +02:00
Daniel Jacobs 5e31ce992e web: Fix save manager styling 2023-04-26 14:36:49 +02:00
Toad06 526fe98ffb extension: Display favicon 2023-04-26 13:46:12 +02:00
Lord-McSweeney 3bf78d43f9 fmt 2023-04-26 11:20:24 +03:00
Lord-McSweeney f947351f40 Fix #10817
Create a child element instead of setting innerHTML.
2023-04-26 11:20:24 +03:00
iwannabethedev 02b8434648 web: Expand 'max_execution_duration' type in extension.
The option 'max_execution_duration' previously only supported
the type '{secs: number, nanos: number}'. Now it also supports
using floating point numbers (and integers).

Default values have been changed to use floating point numbers.
2023-04-25 23:59:51 +02:00
Daniel Jacobs d31828d24d web: Fix #10798 2023-04-25 17:15:41 +02:00
nosamu bce494b86c extension: Rearrange options to emphasize the most commonly used 2023-04-25 09:00:12 +03:00
nosamu 1e3701279c web: Add preferred renderer config 2023-04-25 09:00:12 +03:00
nosamu 569e822044 extension: Reduce code duplication 2023-04-25 08:48:59 +03:00
nosamu 9b87b31657 web: Don't inherit page CSS 2023-04-25 08:31:17 +03:00
relrelb 7af0a17d83 web: Update JSDoc lint rules
* Extend from `plugin:jsdoc/recommended-typescript-error`, which is
more suitable for TypeScript and errors by default.
* Remove default and disabled but passing rules.
* Configure `jsdoc/tag-lines` to match JSDoc style of current codebase.
2023-04-25 08:19:54 +03:00
relrelb 940a8c6658 extension: Make `Options` extend `BaseLoadOptions`
Omit config values from `DEFAULT_OPTIONS`, which are already
part of `DEFAULT_CONFIG` in `ruffle-core`. Also use spread syntax
to avoid naming each config that should pass to `ruffle-core`.
2023-04-24 22:33:59 +03:00
nosamu 3cde3482f4 core: Add frame rate config option 2023-04-24 14:01:37 +02:00
nosamu 4bd11c57b3 web/docs: Display enums in source order 2023-04-24 08:49:06 +03:00
Nathan Adams a2ece35c12 chore: Updated translations from Crowdin 2023-04-24 01:42:21 +02:00
Nathan Adams bbdf2bd73e chore: Ran `crowdin pull` 2023-04-24 01:42:21 +02:00
renovate[bot] 30dc715c46 chore(deps): lock file maintenance node.js dependencies 2023-04-24 00:09:04 +03:00
renovate[bot] 424a45bf2b chore(deps): update node.js dependencies 2023-04-23 22:18:42 +02:00
Daniel Jacobs 256c2fe75c web: No context menu on iOS if finger moves too far on long-press
Co-authored-by: n0samu <71368227+n0samu@users.noreply.github.com>
2023-04-22 08:57:47 +02:00
Daniel Jacobs ebb14a7ab6 web: Use div element for save manager to support browsers without dialog 2023-04-21 17:28:07 +02:00
yangyangdaji 978650a379
i18n: Update Simplified Chinese translation
Signed-off-by: yangyangdaji <1504305527@qq.com>
Co-authored-by: urain39 <urain39@qq.com>
2023-04-21 13:49:19 +00:00