Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-say

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-say - npm Package Compare versions

Comparing version 1.0.1-master.6dc8065 to 1.0.1-master.cfdb77a

lib/getSerializableVoices.js

8

CHANGELOG.md

@@ -9,8 +9,10 @@ # Changelog

### Added
- `exclusive` props: will cancel other utterances on speak
- Utterance queue are now controlled by `<Composer>` instance, instead of native `speechSynthesis` for better browser compatibility
- Chrome: does not fire `start` and `end` events if `speak`/`cancel` are called too fast
- Safari: does not play audio or `start` event if the first utterance is not triggered by user event
- Unmounting elements will cancel the speech in progress or pending speech
### Changed
- Lerna bootstrap will no longer hoist
- Utterance queue are now controlled by `<Composer>` instead of `speechSynthesis` for better compatibility
- Chrome does not fire `start` and `end` events if `speak`/`cancel` are called too fast
- Updated playground

@@ -17,0 +19,0 @@ ## [1.0.0] - 2018-07-09

@@ -19,10 +19,6 @@ 'use strict';

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
var _regenerator = require('babel-runtime/regenerator');

@@ -32,6 +28,2 @@

var _promise = require('babel-runtime/core-js/promise');
var _promise2 = _interopRequireDefault(_promise);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');

@@ -41,122 +33,10 @@

var speakUtterance = function () {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(_ref2, _ref3) {
var _this = this;
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var speechSynthesis = _ref2.speechSynthesis;
var reject = _ref3.reject,
resolve = _ref3.resolve,
utterance = _ref3.utterance;
var startDeferred, errorDeferred, endDeferred, endEvent;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.prev = 0;
startDeferred = (0, _createDeferred2.default)();
errorDeferred = (0, _createDeferred2.default)();
endDeferred = (0, _createDeferred2.default)();
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require('babel-runtime/helpers/createClass');
utterance.addEventListener('end', endDeferred.resolve);
utterance.addEventListener('error', errorDeferred.resolve);
utterance.addEventListener('start', startDeferred.resolve);
var _createClass3 = _interopRequireDefault(_createClass2);
// if (speechSynthesis.speaking) {
// console.warn(`ASSERTION: speechSynthesis.speaking should not be truthy before we call speak`);
// }
// Chrome quirks:
// 1. Speak an utterance
// 2. Cancel in the midway
// 3. Speak another utterance
// Expected: speaking is falsy, then turn to truthy, then receive "start" event, and audio played
// Actual: speaking is falsy, then turn to truthy (which is wrong), but receive no "start" event, and no audio played
// Workaround: retry 2 times with a second
// Safari quirks:
// - Audio doesn't play if the speech is started from a user event
// - If no audio is played, the "start" event won't fire
// console.debug(`STARTING: ${ utterance.text }`);
_context2.next = 9;
return (0, _retry2.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
speechSynthesis.speak(utterance);
_context.prev = 1;
_context.next = 4;
return _promise2.default.race([startDeferred.promise, (0, _timeout2.default)(1000)]);
case 4:
_context.next = 10;
break;
case 6:
_context.prev = 6;
_context.t0 = _context['catch'](1);
// This is required for Chrome quirks.
// Chrome doesn't know it can't start speech, and it just wait there forever.
// We need to cancel it out.
speechSynthesis.cancel();
throw _context.t0;
case 10:
case 'end':
return _context.stop();
}
}
}, _callee, _this, [[1, 6]]);
})), 2, 0);
case 9:
_context2.next = 11;
return _promise2.default.race([errorDeferred.promise, endDeferred.promise, (0, _spinWaitUntil2.default)(function () {
return !speechSynthesis.speaking;
}).then(function () {
return (0, _sleep2.default)(500);
}).then(function () {
return { type: 'end', artificial: true };
})]);
case 11:
endEvent = _context2.sent;
_context2.t0 = endEvent.type;
_context2.next = _context2.t0 === 'cancel' ? 15 : _context2.t0 === 'error' ? 17 : 18;
break;
case 15:
speechSynthesis.cancel();
throw new Error('cancelled');
case 17:
throw endEvent.error;
case 18:
return _context2.abrupt('return', resolve());
case 21:
_context2.prev = 21;
_context2.t1 = _context2['catch'](0);
return _context2.abrupt('return', reject(_context2.t1));
case 24:
case 'end':
return _context2.stop();
}
}
}, _callee2, this, [[0, 21]]);
}));
return function speakUtterance(_x, _x2) {
return _ref4.apply(this, arguments);
};
}();
var _memoizeOne = require('memoize-one');

@@ -178,85 +58,8 @@

var _createDeferred = require('./createDeferred');
var _Utterance = require('./Utterance');
var _createDeferred2 = _interopRequireDefault(_createDeferred);
var _Utterance2 = _interopRequireDefault(_Utterance);
var _retry = require('./retry');
var _retry2 = _interopRequireDefault(_retry);
var _sleep = require('./sleep');
var _sleep2 = _interopRequireDefault(_sleep);
var _spinWaitUntil = require('./spinWaitUntil');
var _spinWaitUntil2 = _interopRequireDefault(_spinWaitUntil);
var _timeout = require('./timeout');
var _timeout2 = _interopRequireDefault(_timeout);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createUtterance(utteranceLike, ponyfill) {
var SpeechSynthesisUtterance = ponyfill.SpeechSynthesisUtterance;
var lang = utteranceLike.lang,
onBoundary = utteranceLike.onBoundary,
onEnd = utteranceLike.onEnd,
onError = utteranceLike.onError,
onStart = utteranceLike.onStart,
_utteranceLike$pitch = utteranceLike.pitch,
pitch = _utteranceLike$pitch === undefined ? 1 : _utteranceLike$pitch,
_utteranceLike$rate = utteranceLike.rate,
rate = _utteranceLike$rate === undefined ? 1 : _utteranceLike$rate,
text = utteranceLike.text,
voice = utteranceLike.voice,
_utteranceLike$volume = utteranceLike.volume,
volume = _utteranceLike$volume === undefined ? 1 : _utteranceLike$volume;
var utterance = new SpeechSynthesisUtterance(text);
var targetVoice = void 0;
if (typeof voice === 'function') {
targetVoice = voice.call(speechSynthesis, getSerializableVoices(speechSynthesis));
} else {
var _ref = voice || {},
voiceURI = _ref.voiceURI;
targetVoice = voiceURI && [].find.call([].slice.call(getSerializableVoices(speechSynthesis)), function (v) {
return v.voiceURI === voiceURI;
});
}
// Edge will mute if "lang" is set to ""
utterance.lang = lang || '';
if (utterance.pitch || utterance.pitch === 0) {
utterance.pitch = pitch;
}
if (utterance.rate || utterance.rate === 0) {
utterance.rate = rate;
}
// Cognitive Services will error when "voice" is set to "null"
// Edge will error when "voice" is set to "undefined"
if (targetVoice) {
utterance.voice = targetVoice;
}
if (utterance.volume || utterance.volume === 0) {
utterance.volume = volume;
}
if (utterance.addEventListener) {
utterance.addEventListener('boundary', onBoundary);
utterance.addEventListener('end', onEnd);
utterance.addEventListener('error', onError);
utterance.addEventListener('start', onStart);
}
return utterance;
}
var SpeechContext = function () {

@@ -269,2 +72,3 @@ function SpeechContext(ponyfill) {

this.cancel = this.cancel.bind(this);
this.cancelAll = this.cancelAll.bind(this);
this.speak = this.speak.bind(this);

@@ -277,5 +81,5 @@

key: 'setPonyfill',
value: function setPonyfill(_ref6) {
var speechSynthesis = _ref6.speechSynthesis,
SpeechSynthesisUtterance = _ref6.SpeechSynthesisUtterance;
value: function setPonyfill(_ref) {
var speechSynthesis = _ref.speechSynthesis,
SpeechSynthesisUtterance = _ref.SpeechSynthesisUtterance;

@@ -287,53 +91,53 @@ this.ponyfill = { speechSynthesis: speechSynthesis, SpeechSynthesisUtterance: SpeechSynthesisUtterance };

value: function () {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
var cancelAll;
return _regenerator2.default.wrap(function _callee3$(_context3) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id) {
var index;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context3.prev = _context3.next) {
switch (_context.prev = _context.next) {
case 0:
console.debug('CANCELLING QUEUED ITEMS: ' + this.queueWithCurrent.length);
this.queueWithCurrent.forEach(function (entry) {
return entry.cancelled = true;
index = this.queueWithCurrent.findIndex(function (utterance) {
return utterance.id === id;
});
cancelAll = _promise2.default.all(this.queueWithCurrent.map(function (_ref8) {
var promise = _ref8.deferred.promise;
return promise.catch(function (err) {
return 0;
});
}));
if (!~index) {
_context.next = 3;
break;
}
return _context.abrupt('return', this.queueWithCurrent[index].cancel());
this.ponyfill.speechSynthesis.cancel();
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
_context3.prev = 4;
_context3.next = 7;
return cancelAll;
function cancel(_x) {
return _ref2.apply(this, arguments);
}
case 7:
_context3.next = 11;
break;
case 9:
_context3.prev = 9;
_context3.t0 = _context3['catch'](4);
case 11:
console.debug('ALL CANCELLED OR FINISHED');
case 12:
return cancel;
}()
}, {
key: 'cancelAll',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
case 'end':
return _context3.stop();
return _context2.stop();
}
}
}, _callee3, this, [[4, 9]]);
}, _callee2, this);
}));
function cancel() {
return _ref7.apply(this, arguments);
function cancelAll() {
return _ref3.apply(this, arguments);
}
return cancel;
return cancelAll;
}()

@@ -343,19 +147,18 @@ }, {

value: function speak(utteranceLike) {
var deferred = (0, _createDeferred2.default)();
// console.debug(`QUEUED: ${ utteranceLike.text }`);
if (utteranceLike.uniqueID && this.queueWithCurrent.find(function (_ref9) {
var uniqueID = _ref9.utteranceLike.uniqueID;
return utteranceLike.uniqueID === uniqueID;
if (utteranceLike.id && this.queueWithCurrent.find(function (_ref4) {
var id = _ref4.id;
return id === utteranceLike.id;
})) {
// Do not queue duplicated speak with same unique ID
// console.debug('NOT QUEUEING DUPE');
return;
}
this.queueWithCurrent.push({
deferred: deferred,
utteranceLike: utteranceLike
});
var utterance = new _Utterance2.default(utteranceLike);
this.queueWithCurrent = [].concat((0, _toConsumableArray3.default)(this.queueWithCurrent), [utterance]);
if (this.queueWithCurrent.length === 1) {

@@ -365,3 +168,3 @@ this._next();

return deferred.promise;
return utterance.deferred.promise;
}

@@ -371,33 +174,27 @@ }, {

value: function _next() {
var _this2 = this;
var _this = this;
var entry = this.queueWithCurrent[0];
var utterance = this.queueWithCurrent[0];
if (!entry) {
if (!utterance) {
return;
}
entry.deferred.promise.then(function () {
_this2.queueWithCurrent.shift();
_this2._next();
var id = utterance.id;
var promise = utterance.speak(this.ponyfill);
promise.then(function () {
_this.queueWithCurrent = _this.queueWithCurrent.filter(function (utterance) {
return utterance.id !== id;
});
_this._next();
}, function () {
// TODO: If the error is due to Safari restriction on user touch
// The next loop on the next audio will also fail because it was not queued with a user touch
_this2.queueWithCurrent.shift();
_this2._next();
_this.queueWithCurrent = _this.queueWithCurrent.filter(function (utterance) {
return utterance.id !== id;
});
_this._next();
});
if (entry.cancelled) {
// console.debug(`CANCELLED BEFORE PLAY: ${ entry.utteranceLike.text }`);
return entry.deferred.reject(new Error('cancelled'));
}
var utterance = createUtterance(entry.utteranceLike, this.ponyfill);
speakUtterance(this.ponyfill, {
reject: entry.deferred.reject,
resolve: entry.deferred.resolve,
utterance: utterance
});
}

@@ -408,19 +205,2 @@ }]);

function getSerializableVoices(speechSynthesis) {
return speechSynthesis.getVoices().map(function (_ref10) {
var def = _ref10['default'],
lang = _ref10.lang,
localService = _ref10.localService,
name = _ref10.name,
voiceURI = _ref10.voiceURI;
return {
'default': def,
lang: lang,
localService: localService,
name: name,
voiceURI: voiceURI
};
});
}
var Composer = function (_React$Component) {

@@ -432,11 +212,11 @@ (0, _inherits3.default)(Composer, _React$Component);

var _this3 = (0, _possibleConstructorReturn3.default)(this, (Composer.__proto__ || (0, _getPrototypeOf2.default)(Composer)).call(this, props));
var _this2 = (0, _possibleConstructorReturn3.default)(this, (Composer.__proto__ || (0, _getPrototypeOf2.default)(Composer)).call(this, props));
_this3.handleVoicesChanged = _this3.handleVoicesChanged.bind(_this3);
_this2.handleVoicesChanged = _this2.handleVoicesChanged.bind(_this2);
props.speechSynthesis.addEventListener && props.speechSynthesis.addEventListener('voiceschanged', _this3.handleVoicesChanged);
props.speechSynthesis.addEventListener && props.speechSynthesis.addEventListener('voiceschanged', _this2.handleVoicesChanged);
_this3.mergeContext = (0, _memoizeOne2.default)(function (_ref11, voices) {
var cancel = _ref11.cancel,
speak = _ref11.speak;
_this2.mergeContext = (0, _memoizeOne2.default)(function (_ref5, voices) {
var cancel = _ref5.cancel,
speak = _ref5.speak;
return {

@@ -449,3 +229,3 @@ cancel: cancel,

_this3.state = {
_this2.state = {
context: new SpeechContext({

@@ -455,5 +235,5 @@ speechSynthesis: props.speechSynthesis,

}),
voices: getSerializableVoices(props.speechSynthesis)
voices: props.speechSynthesis.getVoices()
};
return _this3;
return _this2;
}

@@ -485,3 +265,3 @@

this.setState(function () {
return { voices: getSerializableVoices(nextProps.speechSynthesis) };
return { voices: nextProps.speechSynthesis.getVoices() };
});

@@ -500,7 +280,7 @@ }

key: 'handleVoicesChanged',
value: function handleVoicesChanged(_ref12) {
var target = _ref12.target;
value: function handleVoicesChanged(_ref6) {
var target = _ref6.target;
this.setState(function () {
return { voices: getSerializableVoices(target) };
return { voices: target.getVoices() };
});

@@ -511,3 +291,3 @@ }

value: function render() {
var _this4 = this;
var _this3 = this;

@@ -525,3 +305,3 @@ var props = this.props,

_Context2.default.Provider,
{ value: _this4.mergeContext(state.context, state.voices) },
{ value: _this3.mergeContext(state.context, state.voices) },
typeof children === 'function' ? _react2.default.createElement(

@@ -554,2 +334,2 @@ _Context2.default.Consumer,

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Db21wb3Nlci5qcyJdLCJuYW1lcyI6WyJzcGVlY2hTe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PC9Db250ZXh0LkNvbnN1bWVyPlxuICAgICAgICAgICAgICAgIDpcbiAgICAgICAgICAgICAgICAgIGNoaWxkcmVuXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDwvQ29udGV4dC5Qcm92aWRlcj5cbiAgICAgICAgfVxuICAgICAgPC9Db250ZXh0LkNvbnN1bWVyPlxuICAgICk7XG4gIH1cbn1cblxuQ29tcG9zZXIuZGVmYXVsdFByb3BzID0ge1xuICBzcGVlY2hTeW50aGVzaXM6IHdpbmRvdy5zcGVlY2hTeW50aGVzaXMgfHwgd2luZG93LndlYmtpdFNwZWVjaFN5bnRoZXNpcyxcbiAgc3BlZWNoU3ludGhlc2lzVXR0ZXJhbmNlOiB3aW5kb3cuU3BlZWNoU3ludGhlc2lzVXR0ZXJhbmNlIHx8IHdpbmRvdy53ZWJraXRTcGVlY2hTeW50aGVzaXNVdHRlcmFuY2Vcbn07XG5cbkNvbXBvc2VyLnByb3BUeXBlcyA9IHtcbiAgc3BlZWNoU3ludGhlc2lzOiBQcm9wVHlwZXMuYW55LFxuICBzcGVlY2hTeW50aGVzaXNVdHRlcmFuY2U6IFByb3BUeXBlcy5hbnlcbn07XG4iXX0=

@@ -35,3 +35,2 @@ 'use strict';

{
exclusive: props.exclusive,
lang: props.lang,

@@ -59,3 +58,2 @@ onBoundary: props.onBoundary,

Say.propTypes = {
exclusive: _propTypes2.default.bool,
lang: _propTypes2.default.string,

@@ -76,2 +74,2 @@ onBoundary: _propTypes2.default.func,

exports.default = Say;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TYXkuanMiXSwibmFtZXMiOlsiU2F5IiwicHJvcHMiLCJzcGVlY2hTeW50aGVzaXMiLCJzcGVlY2hTeW50aGVzaXNVdHRlcmFuY2UiLCJleGNsdXNpdmUiLCJsYW5nIiwib25Cb3VuZGFyeSIsIm9uRW5kIiwib25FcnJvciIsIm9uU3RhcnQi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TYXlQcmltaXRpdmU+XG4gIDwvQ29tcG9zZXI+XG5cblNheS5kZWZhdWx0UHJvcHMgPSB7XG4gIHNwZWVjaFN5bnRoZXNpczogd2luZG93LnNwZWVjaFN5bnRoZXNpcyB8fCB3aW5kb3cud2Via2l0U3BlZWNoU3ludGhlc2lzLFxuICBzcGVlY2hTeW50aGVzaXNVdHRlcmFuY2U6IHdpbmRvdy5TcGVlY2hTeW50aGVzaXNVdHRlcmFuY2UgfHwgd2luZG93LndlYmtpdFNwZWVjaFN5bnRoZXNpc1V0dGVyYW5jZVxufTtcblxuU2F5LnByb3BUeXBlcyA9IHtcbiAgbGFuZzogUHJvcFR5cGVzLnN0cmluZyxcbiAgb25Cb3VuZGFyeTogUHJvcFR5cGVzLmZ1bmMsXG4gIG9uRW5kOiBQcm9wVHlwZXMuZnVuYyxcbiAgb25FcnJvcjogUHJvcFR5cGVzLmZ1bmMsXG4gIG9uU3RhcnQ6IFByb3BUeXBlcy5mdW5jLFxuICBwaXRjaDogUHJvcFR5cGVzLm51bWJlcixcbiAgcmF0ZTogUHJvcFR5cGVzLm51bWJlcixcbiAgc3BlZWNoU3ludGhlc2lzOiBQcm9wVHlwZXMuYW55LFxuICBzcGVlY2hTeW50aGVzaXNVdHRlcmFuY2U6IFByb3BUeXBlcy5hbnksXG4gIHNwZWFrOiBQcm9wVHlwZXMuc3RyaW5nLFxuICB2b2ljZTogUHJvcFR5cGVzLm9uZU9mVHlwZShbUHJvcFR5cGVzLmFueSwgUHJvcFR5cGVzLmZ1bmNdKSxcbiAgdm9sdW1lOiBQcm9wVHlwZXMubnVtYmVyXG59O1xuXG5leHBvcnQgZGVmYXVsdCBTYXlcbiJdfQ==

@@ -7,2 +7,34 @@ 'use strict';

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = require('babel-runtime/helpers/inherits');
var _inherits3 = _interopRequireDefault(_inherits2);
var _propTypes = require('prop-types');

@@ -16,11 +48,104 @@

var _Context = require('./Context');
var _Composer = require('./Composer');
var _Context2 = _interopRequireDefault(_Context);
var _Composer2 = _interopRequireDefault(_Composer);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SayButton = function SayButton(props) {
var SayButton = function (_React$Component) {
(0, _inherits3.default)(SayButton, _React$Component);
function SayButton(props) {
(0, _classCallCheck3.default)(this, SayButton);
var _this = (0, _possibleConstructorReturn3.default)(this, (SayButton.__proto__ || (0, _getPrototypeOf2.default)(SayButton)).call(this, props));
_this.handleClick = _this.handleClick.bind(_this);
_this.state = {
busy: false,
id: Date.now() + Math.random()
};
return _this;
}
(0, _createClass3.default)(SayButton, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.props.context.cancel(this.state.id);
}
}, {
key: 'handleClick',
value: function handleClick() {
var _this2 = this;
var props = this.props,
state = this.state;
props.onClick && props.onClick(event);
this.setState(function () {
return { busy: true };
}, (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return props.context.speak({
id: state.id,
lang: props.lang,
onBoundary: props.onBoundary,
onEnd: props.onEnd,
onError: props.onError,
onStart: props.onStart,
pitch: props.pitch,
rate: props.rate,
text: props.speak,
voice: props.voice,
volume: props.volume
});
case 2:
_this2.setState(function () {
return {
busy: false
};
});
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, _this2);
})));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
disabled = _props.disabled,
busy = this.state.busy;
return _react2.default.createElement(
'button',
{
disabled: typeof disabled === 'boolean' ? disabled : busy,
onClick: this.handleClick
},
children
);
}
}]);
return SayButton;
}(_react2.default.Component);
var SayButtonWithContext = function SayButtonWithContext(props) {
return _react2.default.createElement(
_Context2.default.Consumer,
_Composer2.default,
{

@@ -31,24 +156,3 @@ speechSynthesis: props.speechSynthesis,

function (context) {
return _react2.default.createElement(
'button',
{ onClick: function onClick(event) {
props.exclusive && context.cancel();
context.speak({
lang: props.lang,
onBoundary: props.onBoundary,
onEnd: props.onEnd,
onError: props.onError,
onStart: props.onStart,
pitch: props.pitch,
rate: props.rate,
text: props.speak,
voice: props.voice,
volume: props.volume
});
props.onClick && props.onClick(event);
} },
props.children
);
return _react2.default.createElement(SayButton, (0, _extends3.default)({ context: context }, props));
}

@@ -58,4 +162,3 @@ );

SayButton.propTypes = {
exclusive: _propTypes2.default.bool,
SayButtonWithContext.propTypes = {
lang: _propTypes2.default.string,

@@ -73,3 +176,3 @@ onBoundary: _propTypes2.default.func,

exports.default = SayButton;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TYXlCdXR0b24uanMiXSwibmFtZXMiOlsiU2F5QnV0dG9uIiwicHJvcHMiLCJzcGVlY2hTeW50aGVzaXMiLCJzcGVlY2hTeW50aGVzaXNVdHRlcmFuY2UiLCJleGNsdXNpdmUiLCJjb250ZXh0IiwiY2FuY2VsIiwic3BlYWsiLCJsYW5nIiwib25Cb3VuZGFyeSIsIm9uRW5kIiwib25FcnJvciIsIm9uU3RhcnQiLCJwaXRjaCIsInJhdG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HByb3BzLnNwZWVjaFN5bnRoZXNpc1V0dGVyYW5jZSB9XG4gID5cbiAgICB7IGNvbnRleHQgPT5cbiAgICAgIDxTYXlCdXR0b24gY29udGV4dD17IGNvbnRleHQgfSB7IC4uLnByb3BzIH0gLz5cbiAgICB9XG4gIDwvQ29tcG9zZXI+XG5cblNheUJ1dHRvbldpdGhDb250ZXh0LnByb3BUeXBlcyA9IHtcbiAgbGFuZzogUHJvcFR5cGVzLnN0cmluZyxcbiAgb25Cb3VuZGFyeTogUHJvcFR5cGVzLmZ1bmMsXG4gIG9uRW5kOiBQcm9wVHlwZXMuZnVuYyxcbiAgb25FcnJvcjogUHJvcFR5cGVzLmZ1bmMsXG4gIG9uU3RhcnQ6IFByb3BUeXBlcy5mdW5jLFxuICBwaXRjaDogUHJvcFR5cGVzLm51bWJlcixcbiAgcmF0ZTogUHJvcFR5cGVzLm51bWJlcixcbiAgc3BlYWs6IFByb3BUeXBlcy5zdHJpbmcsXG4gIHZvaWNlOiBQcm9wVHlwZXMub25lT2ZUeXBlKFtQcm9wVHlwZXMuYW55LCBQcm9wVHlwZXMuZnVuY10pLFxuICB2b2x1bWU6IFByb3BUeXBlcy5udW1iZXJcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFNheUJ1dHRvbldpdGhDb250ZXh0XG4iXX0=

@@ -7,2 +7,14 @@ 'use strict';

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');

@@ -42,9 +54,9 @@

var Say = function (_React$Component) {
(0, _inherits3.default)(Say, _React$Component);
var SayPrimitive = function (_React$Component) {
(0, _inherits3.default)(SayPrimitive, _React$Component);
function Say(props) {
(0, _classCallCheck3.default)(this, Say);
function SayPrimitive(props) {
(0, _classCallCheck3.default)(this, SayPrimitive);
var _this = (0, _possibleConstructorReturn3.default)(this, (Say.__proto__ || (0, _getPrototypeOf2.default)(Say)).call(this, props));
var _this = (0, _possibleConstructorReturn3.default)(this, (SayPrimitive.__proto__ || (0, _getPrototypeOf2.default)(SayPrimitive)).call(this, props));

@@ -56,7 +68,7 @@ _this.handleBoundary = _this.handleBoundary.bind(_this);

_this.state = { uniqueID: Date.now() + Math.random() };
_this.state = { id: Date.now() + Math.random() };
return _this;
}
(0, _createClass3.default)(Say, [{
(0, _createClass3.default)(SayPrimitive, [{
key: 'componentWillUnmount',

@@ -66,2 +78,6 @@ value: function componentWillUnmount() {

this.unmounted = true;
this.props.context.cancel(this.state.id).catch(function (err) {
return 0;
});
}

@@ -98,46 +114,60 @@ }, {

var _props = this.props,
exclusive = _props.exclusive,
lang = _props.lang,
pitch = _props.pitch,
rate = _props.rate,
text = _props.speak,
voice = _props.voice,
volume = _props.volume;
var uniqueID = this.state.uniqueID;
(0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
var _props, context, lang, pitch, rate, text, voice, volume, id;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_props = _this2.props, context = _props.context, lang = _props.lang, pitch = _props.pitch, rate = _props.rate, text = _props.speak, voice = _props.voice, volume = _props.volume;
id = _this2.state.id;
return _react2.default.createElement(
_Context2.default.Consumer,
null,
function (context) {
exclusive && context.cancel();
context.speak({
lang: lang,
onBoundary: _this2.handleBoundary,
onEnd: _this2.handleEnd,
onError: _this2.handleError,
onStart: _this2.handleStart,
pitch: pitch,
rate: rate,
text: text,
uniqueID: uniqueID,
voice: voice,
volume: volume
});
context.speak({
id: id,
lang: lang,
onBoundary: _this2.handleBoundary,
onEnd: _this2.handleEnd,
onError: _this2.handleError,
onStart: _this2.handleStart,
pitch: pitch,
rate: rate,
text: text,
voice: voice,
volume: volume
});
return false;
}
);
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, _this2);
}))().catch(function (err) {
return console.error(err);
});
return false;
}
}]);
return Say;
return SayPrimitive;
}(_react2.default.Component);
exports.default = Say;
var SayPrimitiveWithContext = function SayPrimitiveWithContext(props) {
return _react2.default.createElement(
_Context2.default.Consumer,
null,
function (context) {
return _react2.default.createElement(
SayPrimitive,
(0, _extends3.default)({
context: context
}, props),
props.children
);
}
);
};
Say.propTypes = {
exclusive: _propTypes2.default.bool,
SayPrimitiveWithContext.propTypes = {
lang: _propTypes2.default.string,

@@ -154,2 +184,4 @@ pitch: _propTypes2.default.number,

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TYXlQcmltaXRpdmUuanMiXSwibmFtZXMiOlsiU2F5IiwicHJvcHMiLCJoYW5kbGVCb3VuZGFyeSIsImJpbmQiLCJoYW5kbGVFbmQiLCJoYW5kbGVFcnJvciIsImhhbmRsZVN0YXJ0Iiwic3RhdGUiLCJ1bmlxdWVJRCIsIkRhdGUiLCJub3ciLCJNYXRoIiwicmFuZG9tIiwidW5tb3VudGVkIiwiZXZlbnQiLCJvbkJvdW5kYXJ5Iiwib25FbmQiLCJvbkVycm9yIiwib25TdGFydCIsIm5leHRQcm9wcyIsInNwZWFrIiwiZXhjbHVzaXZlIiwibGFuZyIsInBpdGNoIiwicmF0ZSIsInRleHQiLCJ2b2ljZSIsInZvbHVtZSIsImNvbnRleHQiLCJjYW5jZWwiLCJSZWFjdCIsIkNvbXBvbmVudCIsInByb3BUeXBlcyIsIlByb3BUeXBlcyIsImJvb2wiLCJzdHJpbmciLCJudW1iZXIiLCJmdW5jIiwib25lT2ZUeXBlIiwiYW55Il0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBOzs7O0FBQ0E7Ozs7QUFFQTs7Ozs7O0lBRXFCQSxHOzs7QUFDbkIsZUFBW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ICAgIHsgY29udGV4dCA9PlxuICAgICAgPFNheVByaW1pdGl2ZVxuICAgICAgICBjb250ZXh0PXsgY29udGV4dCB9XG4gICAgICAgIHsgLi4ucHJvcHMgfVxuICAgICAgPlxuICAgICAgICB7IHByb3BzLmNoaWxkcmVuIH1cbiAgICAgIDwvU2F5UHJpbWl0aXZlPlxuICAgIH1cbiAgPC9Db250ZXh0LkNvbnN1bWVyPlxuXG5TYXlQcmltaXRpdmVXaXRoQ29udGV4dC5wcm9wVHlwZXMgPSB7XG4gIGxhbmc6IFByb3BUeXBlcy5zdHJpbmcsXG4gIHBpdGNoOiBQcm9wVHlwZXMubnVtYmVyLFxuICByYXRlOiBQcm9wVHlwZXMubnVtYmVyLFxuICBvbkJvdW5kYXJ5OiBQcm9wVHlwZXMuZnVuYyxcbiAgb25FbmQ6IFByb3BUeXBlcy5mdW5jLFxuICBvbkVycm9yOiBQcm9wVHlwZXMuZnVuYyxcbiAgb25TdGFydDogUHJvcFR5cGVzLmZ1bmMsXG4gIHNwZWFrOiBQcm9wVHlwZXMuc3RyaW5nLFxuICB2b2ljZTogUHJvcFR5cGVzLm9uZU9mVHlwZShbUHJvcFR5cGVzLmFueSwgUHJvcFR5cGVzLmZ1bmNdKSxcbiAgdm9sdW1lOiBQcm9wVHlwZXMubnVtYmVyXG59O1xuXG5leHBvcnQgZGVmYXVsdCBTYXlQcmltaXRpdmVXaXRoQ29udGV4dFxuIl19
{
"name": "react-say",
"version": "1.0.1-master.6dc8065",
"version": "1.0.1-master.cfdb77a",
"description": "A React component that synthesis text into speech using Web Speech API",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc