@myinterview/widget-react 1.0.56-experimental-14 → 1.0.56-experimental-8647f49-4c92db4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +36 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/microphoneInterface.d.ts +1 -0
- package/dist/cjs/utils/sentry.utils.d.ts +2 -0
- package/dist/esm/index.js +36 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/microphoneInterface.d.ts +1 -0
- package/dist/esm/utils/sentry.utils.d.ts +2 -0
- package/package.json +3 -2
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as Sentry from '@sentry/browser';
|
|
2
2
|
import { DoneInvokeEvent } from 'xstate';
|
|
3
|
+
import { Breadcrumb } from '@sentry/types';
|
|
3
4
|
export declare const SentryHub: Sentry.Hub;
|
|
4
5
|
export declare const SentryTrackingFn: (event: DoneInvokeEvent<any>, context: any, name: string, level: 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug') => void;
|
|
6
|
+
export declare const SentryBreadcrumb: ({ type, level, event_id, category, message, data }: Breadcrumb) => void;
|
package/dist/esm/index.js
CHANGED
|
@@ -32046,6 +32046,16 @@ const SentryTrackingFn = (event, context, name, level) => {
|
|
|
32046
32046
|
SentryHub.captureMessage(name, level);
|
|
32047
32047
|
});
|
|
32048
32048
|
};
|
|
32049
|
+
const SentryBreadcrumb = ({ type, level, event_id, category, message, data }) => {
|
|
32050
|
+
SentryHub.addBreadcrumb({
|
|
32051
|
+
type,
|
|
32052
|
+
level,
|
|
32053
|
+
event_id,
|
|
32054
|
+
category,
|
|
32055
|
+
message,
|
|
32056
|
+
data,
|
|
32057
|
+
});
|
|
32058
|
+
};
|
|
32049
32059
|
|
|
32050
32060
|
const PlayIcon = ({ playing }) => (React__default.createElement("div", { className: "myinterview-widget-icons__play-button" },
|
|
32051
32061
|
React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%", fill: "currentColor", viewBox: "0 0 50 50" },
|
|
@@ -43208,6 +43218,7 @@ var STATES$3;
|
|
|
43208
43218
|
})(STATES$3 || (STATES$3 = {}));
|
|
43209
43219
|
var ACTIONS$3;
|
|
43210
43220
|
(function (ACTIONS) {
|
|
43221
|
+
ACTIONS["COLLECT_BREADCRUMB"] = "collectBreadcrumb";
|
|
43211
43222
|
ACTIONS["INIT_WEB_WORKER"] = "initWebWorker";
|
|
43212
43223
|
ACTIONS["CONSOLE_LOG"] = "consoleLog";
|
|
43213
43224
|
ACTIONS["SET_MEDIA_STREAM"] = "setMediaStream";
|
|
@@ -43369,7 +43380,7 @@ const microphoneMachine = createMachine({
|
|
|
43369
43380
|
},
|
|
43370
43381
|
},
|
|
43371
43382
|
[STATES$3.NOT_RECEIVING_DATA]: {
|
|
43372
|
-
entry: [
|
|
43383
|
+
entry: [ACTIONS$3.COLLECT_BREADCRUMB,
|
|
43373
43384
|
sendParent((context, event) => ({
|
|
43374
43385
|
data: recorderErrors.NoSoundError,
|
|
43375
43386
|
type: EVENTS$5.RECORDER_DEVICE_ERROR,
|
|
@@ -43400,6 +43411,22 @@ const microphoneMachine = createMachine({
|
|
|
43400
43411
|
},
|
|
43401
43412
|
}, {
|
|
43402
43413
|
actions: {
|
|
43414
|
+
[ACTIONS$3.COLLECT_BREADCRUMB]: (context) => {
|
|
43415
|
+
var _a, _b, _c;
|
|
43416
|
+
SentryBreadcrumb({
|
|
43417
|
+
type: 'debug',
|
|
43418
|
+
level: 'warning',
|
|
43419
|
+
category: 'mic',
|
|
43420
|
+
message: 'mic is inactive, this is the status of audioTrack',
|
|
43421
|
+
data: {
|
|
43422
|
+
audioTrack: {
|
|
43423
|
+
enabled: (_a = context === null || context === void 0 ? void 0 : context.mediaStream) === null || _a === void 0 ? void 0 : _a.getAudioTracks()[0].enabled,
|
|
43424
|
+
label: (_b = context === null || context === void 0 ? void 0 : context.mediaStream) === null || _b === void 0 ? void 0 : _b.getAudioTracks()[0].label,
|
|
43425
|
+
muted: (_c = context === null || context === void 0 ? void 0 : context.mediaStream) === null || _c === void 0 ? void 0 : _c.getAudioTracks()[0].muted,
|
|
43426
|
+
},
|
|
43427
|
+
},
|
|
43428
|
+
});
|
|
43429
|
+
},
|
|
43403
43430
|
[ACTIONS$3.INIT_WEB_WORKER]: assign({
|
|
43404
43431
|
webWorker: (context, _event) => (context.mediaStream ? new Builder(Worker$1) : null),
|
|
43405
43432
|
}),
|
|
@@ -43464,6 +43491,14 @@ const microphoneMachine = createMachine({
|
|
|
43464
43491
|
};
|
|
43465
43492
|
}
|
|
43466
43493
|
getVolume(0);
|
|
43494
|
+
ctx.onstatechange = () => {
|
|
43495
|
+
var _a, _b;
|
|
43496
|
+
if (ctx.state === 'suspended') {
|
|
43497
|
+
SentryTrackingFn({ type: 'status === suspended', data: ctx.state }, { label: (_a = context === null || context === void 0 ? void 0 : context.mediaStream) === null || _a === void 0 ? void 0 : _a.getAudioTracks()[0].label,
|
|
43498
|
+
muted: (_b = context === null || context === void 0 ? void 0 : context.mediaStream) === null || _b === void 0 ? void 0 : _b.getAudioTracks()[0].muted,
|
|
43499
|
+
status: ctx.state }, 'mic onstatechange', 'fatal');
|
|
43500
|
+
}
|
|
43501
|
+
};
|
|
43467
43502
|
return () => {
|
|
43468
43503
|
var _a;
|
|
43469
43504
|
mic = null;
|