kopia lustrzana https://github.com/backface/turtlestitch
rodzic
573d421d02
commit
7998d21846
28
gui.js
28
gui.js
|
@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.gui = '2017-September-25';
|
modules.gui = '2017-September-26';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -8425,16 +8425,16 @@ CamSnapshotDialogMorph.uber = DialogBoxMorph.prototype;
|
||||||
|
|
||||||
// CamSnapshotDialogMorph settings
|
// CamSnapshotDialogMorph settings
|
||||||
|
|
||||||
CamSnapshotDialogMorph.prototype.enableCamera = false; // off while experimental
|
CamSnapshotDialogMorph.prototype.enableCamera = true; // off while experimental
|
||||||
CamSnapshotDialogMorph.prototype.enabled = true;
|
CamSnapshotDialogMorph.prototype.enabled = true;
|
||||||
|
|
||||||
CamSnapshotDialogMorph.prototype.notSupportedMessage =
|
CamSnapshotDialogMorph.prototype.notSupportedMessage =
|
||||||
'Due to browser security policies, you need to\n' +
|
'Please make sure your web browser is up to date\n' +
|
||||||
'access Snap! through HTTPS to use the camera.\n\n' +
|
'and your camera is properly configured. \n\n' +
|
||||||
|
'Some browsers also require you to access Snap!\n' +
|
||||||
|
'through HTTPS to use the camera.\n\n' +
|
||||||
'Plase replace the "http://" part of the address\n' +
|
'Plase replace the "http://" part of the address\n' +
|
||||||
'in your browser by "https://" and try again.\n\n' +
|
'in your browser by "https://" and try again.';
|
||||||
'Please also make sure your camera is properly\n' +
|
|
||||||
'connected and configured.';
|
|
||||||
|
|
||||||
// CamSnapshotDialogMorph instance creation
|
// CamSnapshotDialogMorph instance creation
|
||||||
|
|
||||||
|
@ -8472,6 +8472,9 @@ CamSnapshotDialogMorph.prototype.buildContents = function () {
|
||||||
'Camera not supported',
|
'Camera not supported',
|
||||||
CamSnapshotDialogMorph.prototype.notSupportedMessage
|
CamSnapshotDialogMorph.prototype.notSupportedMessage
|
||||||
);
|
);
|
||||||
|
if (myself.videoElement) {
|
||||||
|
myself.videoElement.remove();
|
||||||
|
}
|
||||||
myself.cancel();
|
myself.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8485,16 +8488,7 @@ CamSnapshotDialogMorph.prototype.buildContents = function () {
|
||||||
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
||||||
navigator.mediaDevices.getUserMedia({ video: true })
|
navigator.mediaDevices.getUserMedia({ video: true })
|
||||||
.then(function (stream) {
|
.then(function (stream) {
|
||||||
/*
|
myself.videoElement.srcObject = stream;
|
||||||
there are issues at this point with current Safari 11:
|
|
||||||
URL.createObjectURL is still considered experimental
|
|
||||||
and needs to be prefixed with webkitURL for URL,
|
|
||||||
and - worse - does not accept a stream as argument,
|
|
||||||
throwing a type error. Until these issues are resolved
|
|
||||||
we'll disable camera support, treating it as a hidden
|
|
||||||
experimental feature. -Jens
|
|
||||||
*/
|
|
||||||
myself.videoElement.src = window.URL.createObjectURL(stream);
|
|
||||||
myself.videoElement.play().catch(noCameraSupport);
|
myself.videoElement.play().catch(noCameraSupport);
|
||||||
myself.videoElement.stream = stream;
|
myself.videoElement.stream = stream;
|
||||||
})
|
})
|
||||||
|
|
|
@ -3656,6 +3656,7 @@ Fixes:
|
||||||
170926
|
170926
|
||||||
------
|
------
|
||||||
* Symbols: added 'keyboard' and 'keyboardFilled' icons
|
* Symbols: added 'keyboard' and 'keyboardFilled' icons
|
||||||
|
* GUI: fixed camera support for Safari, thanks, Bernat!
|
||||||
|
|
||||||
|
|
||||||
v4.1 Features:
|
v4.1 Features:
|
||||||
|
@ -3664,7 +3665,7 @@ v4.1 Features:
|
||||||
* inheritance of sprite attributes (x, y, direction, size, costumes, costume #, sounds, scripts)
|
* inheritance of sprite attributes (x, y, direction, size, costumes, costume #, sounds, scripts)
|
||||||
* first-class costumes and sounds
|
* first-class costumes and sounds
|
||||||
* visual indicator (map-pin icon) for sprite-local custom blocks (i.e. methods)
|
* visual indicator (map-pin icon) for sprite-local custom blocks (i.e. methods)
|
||||||
* [experimental hidden] camera snapshots for costumes and new sprites
|
* camera snapshots for costumes and new sprites
|
||||||
* localization support when typing expressions
|
* localization support when typing expressions
|
||||||
* support for user-forced line-breaks in custom block labels
|
* support for user-forced line-breaks in custom block labels
|
||||||
* ternary Boolean slot setting: support to limit Boolean input slots to “true/false” outside of rings and in palette
|
* ternary Boolean slot setting: support to limit Boolean input slots to “true/false” outside of rings and in palette
|
||||||
|
|
Ładowanie…
Reference in New Issue