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
David Wendt
f56d16a68d
Separate player creation from root movie setup, and allow users of Ruffle to load in movies synchronously or asynchronously.
...
During the small period of time when a player is created but has no root movie, a temporary empty movie is installed with an assumed stage size and framerate of 550x400@12fps. This is Flash default for new projects, so it seemed appropriate. User ActionScript cannot see these values, and I'm not even sure JavaScript can, either.
2020-07-23 23:02:51 -04:00
David Wendt
6998dafdb9
Store an origin URL on every movie that is loaded.
2020-07-23 23:02:50 -04:00
Mike Welsh
8e97fdfe0c
web: Fix WebAudioBackend::stop_sounds_with_handle ( fix #752 )
...
This would incorrectly stop all audio nodes whenever a Stop sound
event was encountered.
2020-06-25 23:04:47 -07:00
CUB3D
166cb60d89
chore: Clean up useage of unwrap
2020-06-24 01:46:07 +01:00