videomail-client 8.3.1 → 8.3.2
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/package.json +1 -1
- package/prototype/js/videomail-client.js +12 -14
- package/prototype/js/videomail-client.min.js +1 -1
- package/prototype/js/videomail-client.min.js.map +1 -1
- package/src/js/client.js +0 -210
- package/src/js/constants.js +0 -11
- package/src/js/events.js +0 -46
- package/src/js/index.js +0 -15
- package/src/js/options.js +0 -180
- package/src/js/resource.js +0 -206
- package/src/js/util/audioRecorder.js +0 -152
- package/src/js/util/browser.js +0 -319
- package/src/js/util/collectLogger.js +0 -72
- package/src/js/util/eventEmitter.js +0 -72
- package/src/js/util/humanize.js +0 -16
- package/src/js/util/mediaEvents.js +0 -148
- package/src/js/util/pretty.js +0 -70
- package/src/js/util/standardize.js +0 -71
- package/src/js/util/videomailError.js +0 -431
- package/src/js/wrappers/buttons.js +0 -670
- package/src/js/wrappers/container.js +0 -797
- package/src/js/wrappers/dimension.js +0 -149
- package/src/js/wrappers/form.js +0 -319
- package/src/js/wrappers/optionsWrapper.js +0 -81
- package/src/js/wrappers/visuals/inside/recorder/countdown.js +0 -83
- package/src/js/wrappers/visuals/inside/recorder/facingMode.js +0 -53
- package/src/js/wrappers/visuals/inside/recorder/pausedNote.js +0 -59
- package/src/js/wrappers/visuals/inside/recorder/recordNote.js +0 -42
- package/src/js/wrappers/visuals/inside/recorder/recordTimer.js +0 -149
- package/src/js/wrappers/visuals/inside/recorderInsides.js +0 -144
- package/src/js/wrappers/visuals/notifier.js +0 -341
- package/src/js/wrappers/visuals/recorder.js +0 -1492
- package/src/js/wrappers/visuals/replay.js +0 -355
- package/src/js/wrappers/visuals/userMedia.js +0 -541
- package/src/js/wrappers/visuals.js +0 -410
- package/src/styles/css/main.min.css.js +0 -1
- package/src/styles/styl/keyframes/blink.styl +0 -16
- package/src/styles/styl/main.styl +0 -126
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* taken from
|
|
3
|
-
* https://bbc.github.io/tal/jsdoc/events_mediaevent.js.html
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
/*
|
|
8
|
-
* The user agent begins looking for media data, as part of
|
|
9
|
-
* the resource selection algorithm.
|
|
10
|
-
*/
|
|
11
|
-
"loadstart",
|
|
12
|
-
|
|
13
|
-
/*
|
|
14
|
-
* The user agent is intentionally not currently fetching media data,
|
|
15
|
-
* but does not have the entire media resource downloaded. networkState equals NETWORK_IDLE
|
|
16
|
-
*/
|
|
17
|
-
"suspend",
|
|
18
|
-
|
|
19
|
-
/*
|
|
20
|
-
* Playback has begun. Fired after the play() method has returned,
|
|
21
|
-
* or when the autoplay attribute has caused playback to begin.
|
|
22
|
-
* paused is newly false.
|
|
23
|
-
* 'play', commented out since it has special treatment
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
* The user agent has just determined the duration and dimensions of the
|
|
28
|
-
* media resource and the timed tracks are ready.
|
|
29
|
-
* readyState is newly equal to HAVE_METADATA or greater for the first time.
|
|
30
|
-
* 'loadedmetadata', commented out since it has special treatment
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
// The user agent is fetching media data.
|
|
34
|
-
"progress",
|
|
35
|
-
|
|
36
|
-
/*
|
|
37
|
-
* The user agent is intentionally not currently fetching media data,
|
|
38
|
-
* but does not have the entire media resource downloaded.
|
|
39
|
-
* 'suspend', // commented out, we are already listening to it in code
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/*
|
|
43
|
-
* Event The user agent stops fetching the media data before it is completely downloaded,
|
|
44
|
-
* but not due to an error. error is an object with the code MEDIA_ERR_ABORTED.
|
|
45
|
-
*/
|
|
46
|
-
"abort",
|
|
47
|
-
|
|
48
|
-
/*
|
|
49
|
-
* A media element whose networkState was previously not in the NETWORK_EMPTY
|
|
50
|
-
* state has just switched to that state (either because of a fatal error
|
|
51
|
-
* during load that's about to be reported, or because the load() method was
|
|
52
|
-
* invoked while the resource selection algorithm was already running).
|
|
53
|
-
*/
|
|
54
|
-
"emptied",
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
* The user agent is trying to fetch media data, but data is
|
|
58
|
-
* unexpectedly not forthcoming
|
|
59
|
-
*/
|
|
60
|
-
"stalled",
|
|
61
|
-
|
|
62
|
-
/*
|
|
63
|
-
* Playback has been paused. Fired after the pause() method has returned.
|
|
64
|
-
* paused is newly true.
|
|
65
|
-
*/
|
|
66
|
-
"pause",
|
|
67
|
-
|
|
68
|
-
/*
|
|
69
|
-
* The user agent can render the media data at the current playback position
|
|
70
|
-
* for the first time.
|
|
71
|
-
* readyState newly increased to HAVE_CURRENT_DATA or greater for the first time.
|
|
72
|
-
*/
|
|
73
|
-
"loadeddata",
|
|
74
|
-
|
|
75
|
-
/*
|
|
76
|
-
* Playback has stopped because the next frame is not available, but the user
|
|
77
|
-
* agent expects that frame to become available in due course.
|
|
78
|
-
* readyState is newly equal to or less than HAVE_CURRENT_DATA,
|
|
79
|
-
* and paused is false. Either seeking is true, or the current playback
|
|
80
|
-
* position is not contained in any of the ranges in buffered.
|
|
81
|
-
* It is possible for playback to stop for two other reasons without
|
|
82
|
-
* paused being false, but those two reasons do not fire this event:
|
|
83
|
-
* maybe playback ended, or playback stopped due to errors.
|
|
84
|
-
*/
|
|
85
|
-
"waiting",
|
|
86
|
-
|
|
87
|
-
/*
|
|
88
|
-
* Playback has started. readyState is newly equal to or greater than
|
|
89
|
-
* HAVE_FUTURE_DATA, paused is false, seeking is false,
|
|
90
|
-
* or the current playback position is contained in one of the ranges in buffered.
|
|
91
|
-
*/
|
|
92
|
-
"playing",
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
* The user agent can resume playback of the media data,
|
|
96
|
-
* but estimates that if playback were to be started now, the media resource
|
|
97
|
-
* could not be rendered at the current playback rate up to its end without
|
|
98
|
-
* having to stop for further buffering of content.
|
|
99
|
-
* readyState newly increased to HAVE_FUTURE_DATA or greater.
|
|
100
|
-
*/
|
|
101
|
-
"canplay",
|
|
102
|
-
|
|
103
|
-
/*
|
|
104
|
-
* The user agent estimates that if playback were to be started now,
|
|
105
|
-
* the media resource could be rendered at the current playback rate
|
|
106
|
-
* all the way to its end without having to stop for further buffering.
|
|
107
|
-
* readyState is newly equal to HAVE_ENOUGH_DATA.
|
|
108
|
-
*/
|
|
109
|
-
"canplaythrough",
|
|
110
|
-
|
|
111
|
-
/*
|
|
112
|
-
* The seeking IDL attribute changed to true and the seek operation is
|
|
113
|
-
* taking long enough that the user agent has time to fire the event.
|
|
114
|
-
*/
|
|
115
|
-
"seeking",
|
|
116
|
-
|
|
117
|
-
// The seeking IDL attribute changed to false.
|
|
118
|
-
"seeked",
|
|
119
|
-
|
|
120
|
-
/*
|
|
121
|
-
* Playback has stopped because the end of the media resource was reached.
|
|
122
|
-
* currentTime equals the end of the media resource; ended is true.
|
|
123
|
-
*/
|
|
124
|
-
"ended",
|
|
125
|
-
|
|
126
|
-
/*
|
|
127
|
-
* Either the defaultPlaybackRate or the playbackRate attribute
|
|
128
|
-
* has just been updated.
|
|
129
|
-
*/
|
|
130
|
-
"ratechange",
|
|
131
|
-
|
|
132
|
-
// The duration attribute has just been updated.
|
|
133
|
-
"durationchange",
|
|
134
|
-
|
|
135
|
-
/*
|
|
136
|
-
* Either the volume attribute or the muted attribute has changed.
|
|
137
|
-
* Fired after the relevant attribute's setter has returned.
|
|
138
|
-
*/
|
|
139
|
-
"volumechange",
|
|
140
|
-
|
|
141
|
-
// commented out, happen too often
|
|
142
|
-
|
|
143
|
-
/*
|
|
144
|
-
* The current playback position changed as part of normal playback or in
|
|
145
|
-
* an especially interesting way, for example discontinuously.
|
|
146
|
-
* 'timeupdate'
|
|
147
|
-
*/
|
|
148
|
-
];
|
package/src/js/util/pretty.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import stringify from "safe-json-stringify";
|
|
2
|
-
|
|
3
|
-
const DASH = "- ";
|
|
4
|
-
const SEPARATOR = `<br/>${DASH}`;
|
|
5
|
-
|
|
6
|
-
function arrayToString(array) {
|
|
7
|
-
if (array && array.length > 0) {
|
|
8
|
-
const lines = [];
|
|
9
|
-
|
|
10
|
-
array.forEach(function (element) {
|
|
11
|
-
if (element) {
|
|
12
|
-
lines.push(stringify(element));
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
return DASH + lines.join(SEPARATOR);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function objectToString(object, options) {
|
|
21
|
-
const propertyNames = Object.getOwnPropertyNames(object);
|
|
22
|
-
const excludes = (options && options.excludes) || [];
|
|
23
|
-
const lines = [];
|
|
24
|
-
let sLines;
|
|
25
|
-
|
|
26
|
-
// always ignore these
|
|
27
|
-
excludes.push("stack");
|
|
28
|
-
|
|
29
|
-
if (propertyNames && propertyNames.length > 0) {
|
|
30
|
-
let exclude = false;
|
|
31
|
-
|
|
32
|
-
propertyNames.forEach(function (name) {
|
|
33
|
-
if (excludes) {
|
|
34
|
-
exclude = excludes.indexOf(name) >= 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (!exclude && object[name]) {
|
|
38
|
-
/*
|
|
39
|
-
* this to cover this problem:
|
|
40
|
-
* https://github.com/binarykitchen/videomail-client/issues/157
|
|
41
|
-
*/
|
|
42
|
-
lines.push(stringify(object[name]));
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (lines.length === 1) {
|
|
48
|
-
sLines = lines.join();
|
|
49
|
-
} else if (lines.length > 1) {
|
|
50
|
-
sLines = DASH + lines.join(SEPARATOR);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return sLines;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default function (anything, options) {
|
|
57
|
-
if (anything === null) {
|
|
58
|
-
return "null";
|
|
59
|
-
} else if (typeof anything === "undefined") {
|
|
60
|
-
return "undefined";
|
|
61
|
-
} else if (typeof anything === "string") {
|
|
62
|
-
return anything;
|
|
63
|
-
} else if (Array.isArray(anything)) {
|
|
64
|
-
return arrayToString(anything);
|
|
65
|
-
} else if (typeof anything === "object") {
|
|
66
|
-
return objectToString(anything, options);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return anything.toString();
|
|
70
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import "classlist.js";
|
|
2
|
-
|
|
3
|
-
// https://github.com/julienetie/request-frame
|
|
4
|
-
import requestFrame from "request-frame";
|
|
5
|
-
|
|
6
|
-
// use those default params for unit tests
|
|
7
|
-
export default function (window = {}, navigator = {}) {
|
|
8
|
-
// https://github.com/julienetie/request-frame/issues/6
|
|
9
|
-
if (!window.screen) {
|
|
10
|
-
window.screen = {};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
requestFrame("native");
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
* avoids warning "navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia",
|
|
17
|
-
* see https://github.com/binarykitchen/videomail-client/issues/79
|
|
18
|
-
*/
|
|
19
|
-
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
|
20
|
-
// do not shim
|
|
21
|
-
} else {
|
|
22
|
-
navigator.getUserMedia_ =
|
|
23
|
-
navigator.getUserMedia ||
|
|
24
|
-
navigator.webkitGetUserMedia ||
|
|
25
|
-
navigator.mozGetUserMedia ||
|
|
26
|
-
navigator.msGetUserMedia;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (!window.AudioContext && window.webkitAudioContext) {
|
|
30
|
-
window.AudioContext = window.webkitAudioContext;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (!window.URL) {
|
|
34
|
-
window.URL = window.webkitURL || window.mozURL || window.msURL;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (!navigator.connection) {
|
|
38
|
-
navigator.connection = navigator.mozConnection || navigator.webkitConnection;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const methods = [
|
|
42
|
-
"debug",
|
|
43
|
-
"groupCollapsed",
|
|
44
|
-
"groupEnd",
|
|
45
|
-
"error",
|
|
46
|
-
"exception",
|
|
47
|
-
"info",
|
|
48
|
-
"log",
|
|
49
|
-
"trace",
|
|
50
|
-
"warn",
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
let console = {};
|
|
54
|
-
|
|
55
|
-
if (window.console) {
|
|
56
|
-
console = window.console;
|
|
57
|
-
} else {
|
|
58
|
-
window.console = function () {};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
let method;
|
|
62
|
-
let { length } = methods;
|
|
63
|
-
|
|
64
|
-
while (length--) {
|
|
65
|
-
method = methods[length];
|
|
66
|
-
|
|
67
|
-
if (!console[method]) {
|
|
68
|
-
console[method] = function () {};
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|