Age | Commit message (Collapse) | Author | Files | Lines |
|
If the frame data is large, it will be divided into multiple packets. In the current processing mode, each packet will be merged with the old packet into a new buffer, resulting in a large number of redundant operations.
Optimization scheme: Use array cache packets, and finally use DataView.set to do a merge.
After testing, 1080p picture data merging time can be reduced from 100ms to <5ms
Signed-off-by: zengdongbao <zengdongbao@gmail.com>
|
|
Key presses by a client with an international keyboard layout will often fail.
I.e. the key AltGr creates an error message "No mapping for key 255". This key is important to produce the @ symbol i.e. on German language keyboard. The currently used e.keyCode differs by browser vendor and is ambiguous for some keys.
This change relies instead on the event.code, which is stable for most common keys and more complete.
I keep the old implementation to rely on e.keyCode as a fallback if the e.code is not available or the mapping for it is missing.
See merge request spice/spice-html5!14
Signed-off-by: David Edler <david.edler@canonical.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
|
|
associated js eventlistener
|
|
consolidation of formatting, button effects, and color shift
|
|
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Browsers have stopped allowing auto play videos. The documented solution
is to mute your video. This patch mutes our videos and also attempts to
start playing if the auto play does not fire.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
If a video covers up a substantial portion of the screen,
you can no longer interact with it.
This change allows pointer events to flow through to our canvas.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This does not appear to matter, but let's just be safe.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This involved a review of the Firefox parsing code along
with the official specifcation, and setting these fields
to the specified default values.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
- It seems `SpiceDisplayConn` does not always have the array `this.o.sc.streams` set.
- It also seems (stream?) images can be loaded before `streams` is set.
- Without `streams`, or the specific stream matching `this.o.id`, `this.o.sc.streams[this.o.id].frames_loading` cannot be accessed.
- The check for the specific stream woth `this.o.id` is already in place, this patch adds a check for `this.o.sc.streams` in `handle_draw_jpeg_onload`.
- There might be a better place to ensure that `this.o.sc.streams` is initialized; this quick fix saved my bacon today though.
Might be related to, and perhaps fix:
- https://bugs.freedesktop.org/show_bug.cgi?id=94776
- https://bugzilla.redhat.com/show_bug.cgi?id=1323144
Signed-off-by: Joel Purra <mig@joelpurra.se>
|
|
Add the sc object to sendCtrlAltDel because it is otherwise undefined and issues a JS error
See merge request spice/spice-html5!2
|
|
issues a JS error
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
The previous implementation worked strictly due to a bug which would
luckily generate roughly the right scan codes, although we would send
more codes than required.
For example, the old implementation would send 0xdf48e0 for 'up key down'
and '0xdfc8e0' for 'up key up'. The prepended 0xdf is incorrect; the
correct values should be 0x48e0 and 0xc8e0. Essentially, it stored
the bytes in reverse order and had a bug while flipping them.
This code stores them in the order we transmit them which simplifies
the code.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
The common scan codes were disjointed and logically belong together.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
The keypad minus key at 109 is common between at least Chrome and Firefox.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Correct a typo from the upstream atKeynames.js at the same time.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Depending on the structure of the page, the computed mouse position was
not correct. Typically the case happend when there is no offset between
the canvas and the view area, but an offset on the view area.
The MouseEvent.offsetX and offsetY functions are now widely enough spread
to use them and avoid complex computations.
|
|
|
|
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
If we round up, we may end up with a display slightly bigger than what
the window can have, thus adding scroll bars. When rounding down we
avoid this problems.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
The resize_handler need to check for the existence of the message box
before computing it's size.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
In case the user didn't provide any password, we want to prompt him for
it. Try once and if we get an permission denied error, then ask the
password and retry to connect.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
The disconnect() function were not checking the existence of the file
transfer area element, leading to stop the disconnect() before its end.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
To add some more order to the folder, move the JS files into their own
src folder.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
Add package.json needed to publish on npmjs.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
We don't want the users to rely on anything else than main.js. All the
helper functions from the other files are thus imported in main and
exported there too.
This way all the user needs to import is:
import * as SpiceHtml5 from './main.js';
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
Avoid cluttering the global namespace. Use ES6 modules in order to
to this.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
When forcing the background of the input fields, this makes them
unreadable for dark themed browsers.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
|
spice-html5 does not support multiple display channels, and will only
use the first one offered by spice-server, and ignore the others. This
can cause issues when using a VM with a configured but unused
org.spice-space.stream.0 spice port as this will create a 'fake' display
channel which is offered by spice-server before the usual qxl display
channel.
This commit favours the display channel with id 0 rather than picking
the first one.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
log_draw() is used to debug drawing commands by dumping drawing
information to the JS console. This commit adds dumping of missing data
for uncompressed bitmaps. The 'stride' parameter is important, as
spice-html5 currently does not deal properly with such bitmaps.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Jeremy White <jwhite@codeweavers.com>
|
|
This allows show or hide debug console under spice screen.
|
|
Make sure to show both screen and console.
|
|
|
|
Signed-off-by: Vincent Desprez <vincent.desprez@apwise.com>
|
|
subtle ways.
|
|
|
|
This fixes a bug introduced by my commit 42134d3e, which would
lead to an infinite recursion of onload statements.
|
|
This helps us avoid stalled video streams.
|
|
|
|
|
|
This helps Firefox in situations where the incoming traffic
is preventing the audio element from processing data quickly enough.
|
|
|
|
It's a fair amount of noise, and not useful at level 1.
|
|
They are low frequency, useful messages and should be seen
more readily.
|