Mike Welsh
7e35d4a4fc
web: Ensure parent window/frame gets focus on click ( fix #1704 )
...
Call window.focus() on mouse down to ensure the player receives
subsequent key/mouse events when it is inside a frame.
2020-12-10 19:20:00 -08:00
Mike Welsh
3bafee63a6
web: Fix spurious keyUp events ( fix #1886 )
2020-12-08 21:12:59 -08:00
Mike Welsh
b76d76d244
web: Properly handle multibyte characters in text input
...
We were checking for byte length == 1 instead of # of characters
to determine if a keyboard key was a single printable character.
Thanks to @JMcKiern for pointing this out.
2020-12-05 23:19:57 -08:00
Mike Welsh
dafe7e5027
avm1: Implement Key.getAscii
2020-11-29 02:31:10 -08:00
Mike Welsh
e655cf0c08
web: Add Ruffle::audio_context getter
2020-11-24 16:36:33 -08:00
Nathan Adams
5b5091b4b9
web: Rename copy_to_audio_buffer to copyToAudioBuffer
2020-11-24 16:36:33 -08:00
Nathan Adams
3ad4c0f392
web: Rename RufflePlayer.on_callback_available to
...
RufflePlayer.onCallbackAvailable
2020-11-24 16:36:33 -08:00
Nathan Adams
8abb8df299
web: core no longer uses webpack, but selfhosted still does
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
Mike Welsh
d13a95eafa
web: Fail gracefully if LocalStorage is unavailable ( fix #1590 )
2020-11-19 22:51:02 -08:00
relrelb
9068322d24
web: Retain focus on fullscreen enter/exit
...
Previously, has_focus has been set to false upon window click, and
to true upon canvas click.
However, the canvas didn't receive click events when the context
menu was clicked, so fullscreen toggle led to focus loss.
Listening to player click events receives both canvas and context
menu clicks.
2020-11-18 17:50:12 -08:00
relrelb
2e0509694c
docs: Miscellaneous spelling corrections
2020-11-12 13:34:05 -08:00
Mike Welsh
316bc4e920
chore: Appease clippy
2020-11-09 01:52:57 -08:00
Nathan Adams
d7b94316c6
web: Always set the end point of audio clips - fixes #1304
2020-11-03 15:15:34 -08:00
Nathan Adams
32b57f15bc
web: Fixed backspace and delete keys not registering in input fields
2020-11-02 11:43:10 -08:00
Mike Welsh
ef4d75e7d9
web: Fix incorrect handle used in audio ended handler ( fix #1405 )
2020-10-27 19:54:46 -07:00
Mike Welsh
956f40a26f
web: Use a Drop impl to ensure sounds are stopped
2020-10-25 20:41:20 -07:00
Mike Welsh
796805c31b
web: Avoid bug in generational-arena ( fix #1315 )
...
An issue with Arena::clear allowed stale sound instance indices
to be remain valid, causing certain sounds to be removed when they
shouldn't (#1315 ). Workaround this issue by forcing Arena to bump
the generational index.
2020-10-25 20:41:20 -07:00
Mike Welsh
2172fef9bd
web: Only fire mouse events for left clicks
2020-10-23 12:50:59 -07:00
Mike Welsh
827a80c837
web: Remove sound instances upon completion
...
Sounds were not being removed from the instance list when they
completed playing. This could also cause StartSound tags with
NoMultiple set to not play, because the previous sound was presumed
to be playing.
Fixes part of #1245 .
2020-10-12 15:28:31 -07:00
Nathan Adams
627a1f90e1
web: Ignore any errors converting flashvars
2020-10-12 15:28:16 -07:00
Nathan Adams
6d9155477c
core: Add flashvars support - #312
2020-10-12 15:28:16 -07:00
Mike Welsh
4034ef8d79
web: Use PanicInfo::to_string for displaying panic info
...
PanicInfo::payload wasn't giving anything useful (just resulted
in 'Unknown error') -- to_string displays all of the message,
payload, and location of the panic. Particularly the location
is helpful.
2020-10-11 00:51:00 -07:00
Sean-Thomas
a9538f81d0
web: Renamed "prime_audio" and "suspend_audio"
...
Renamed "prime_audio" and "suspend_audio" to "play" and "pause" respectfully.
2020-09-29 11:05:23 -07:00
Sean-Thomas
6b54cc4311
web: Add pause method for web player
...
Adds a suspend_audio method to compliment prime_audio on WebAudioBackend, as well as logic in player.rs on the set_is_playing method to suspend audio when is_playing is set to false. Exposes pause method for the ruffle player in JavaScript with logic to display the play button when paused.
2020-09-29 11:05:23 -07:00
Mike Welsh
313b02d24f
webgl: Fall back to canvas if not using hardware acceleration
...
Display WebGL driver info, detect whether hardware acceleration
is enabled, and fall back to the canvas backend in this case.
2020-09-25 01:22:21 -07:00
Luca Weiss
d5cb396331
*: fix spelling mistakes
2020-09-19 16:17:58 -07:00
Nathan Adams
e114282a4e
web: Implement Show Error Details for panics
2020-09-13 15:20:44 -07:00
Nathan Adams
69d1e903fb
web: Destroy shouldn't be able to throw exceptions
2020-09-13 15:20:44 -07:00
Nathan Adams
58cd1abcf2
web: Store RuffleInstances as a RefCell, so we don't lock it out from readers unless we actually need to
2020-09-13 15:20:44 -07:00
Nathan Adams
1d48073a05
web: Don't mutably lock INSTANCES if we don't need to, to allow greater odds of a successful reentry
2020-09-13 15:20:44 -07:00
Nathan Adams
95275898c7
web: If ruffle panics, inform all instances (if possible) and poison future instances
2020-09-13 15:20:44 -07:00
Nathan Adams
3ff399ca6b
core: Trace only to the log backend, but have the default log backend trace to the log crate
2020-09-13 13:51:39 -07:00
Nathan Adams
4c6c8ee1f2
web: Add trace_observer to web api, which lets you capture trace output from a specific movie
2020-09-13 13:51:39 -07:00
Nathan Adams
de009c7673
core: Add Log backend, for capturing trace output specific to a movie
2020-09-13 13:51:39 -07:00
Mike Welsh
a18e80baf2
chore: Fix clippy lints
2020-09-07 12:18:41 -07:00
Nathan Adams
91cb597a79
web: Expose ExternalInterface callbacks on the player object, not the canvas
2020-09-03 18:17:44 -07:00
Nathan Adams
5880db43cd
web: Respect allowScriptAccess, which defaults to false for streaming or 'sameDomain' for objects
2020-09-03 18:17:44 -07:00
Nathan Adams
b5531a48d0
web: Allow reentrant ExternalInterface callbacks
2020-09-03 18:17:44 -07:00
Nathan Adams
a49e8d8587
web: Implement two-way communication with ExternalInterface
2020-09-03 18:17:44 -07:00
Nathan Adams
43f5506418
web: Implement LocaleBackend for web
2020-09-02 17:12:31 -07:00
Nathan Adams
86eb6f2e50
avm1: Implement Date - #249
2020-09-02 17:12:31 -07:00
Nathan Adams
cb2461920b
core: HTTP request values need to preserve order
2020-08-28 11:53:32 -07:00
Mike Welsh
cab1634624
web: Ensure Key.getCode is set on keyUp
...
Fixes sticking keys in #1046 .
2020-08-26 15:16:46 -07:00
Mike Welsh
eaff74f364
web: Wire up mouse wheel events
2020-08-23 13:38:59 -07:00
Mike Welsh
cbd448522a
chore: Allow unknown clippy lints
...
same_item_push was added on nightly, but is currently throwing
a false negative. I added an allow for it, but this causes a
warning on stable for an unknown lints, so allow unknown lints for
now.
2020-08-12 23:51:12 -07:00
Mike Welsh
6c89869210
chore: Fix clippy lints
2020-08-12 19:04:14 -07:00
David Wendt
c926da8888
Refactor URL relativization into two utility methods that backends can provide base URLs and paths to.
2020-07-23 23:02:54 -04:00
David Wendt
7433bfe28f
Add a `NavigatorBackend` method to resolve relative URLs.
2020-07-23 23:02:53 -04:00
David Wendt
4813942fe7
The player should always change the audio backend's framerate itself.
2020-07-23 23:02:52 -04:00