videomail-client 8.1.0 → 8.2.0
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/.eslintrc.js +38 -6
- package/TODO.md +13 -13
- package/gulpfile.js +141 -134
- package/package.json +14 -11
- package/prettier.config.js +8 -0
- package/prototype/bad_browser.html +4 -4
- package/prototype/bad_ios.html +5 -5
- package/prototype/contact_form.html +29 -29
- package/prototype/correct_existing_videomail.html +67 -67
- package/prototype/correct_non_existing_videomail.html +17 -17
- package/prototype/direct_submit.html +10 -10
- package/prototype/entertain.html +11 -11
- package/prototype/experimental_audio.html +8 -8
- package/prototype/facing_mode_button.html +5 -5
- package/prototype/form_without_email.html +17 -17
- package/prototype/high_quality.html +5 -5
- package/prototype/index.html +33 -33
- package/prototype/invalid_site_name.html +4 -4
- package/prototype/js/videomail-client.js +1466 -2660
- package/prototype/js/videomail-client.min.js +14 -14
- package/prototype/js/videomail-client.min.js.map +1 -1
- package/prototype/player_only.html +61 -61
- package/prototype/predefined.html +9 -9
- package/prototype/simple.html +3 -3
- package/prototype/simple_jpegs.html +5 -5
- package/prototype/user_media_on_record.html +5 -5
- package/prototype/videomail_optional_form.html +14 -14
- package/prototype/with_cc_and_bcc.html +14 -14
- package/src/js/client.js +108 -106
- package/src/js/constants.js +6 -6
- package/src/js/events.js +3 -3
- package/src/js/index.js +6 -6
- package/src/js/options.js +85 -71
- package/src/js/resource.js +80 -78
- package/src/js/util/audioRecorder.js +63 -57
- package/src/js/util/browser.js +159 -185
- package/src/js/util/collectLogger.js +35 -35
- package/src/js/util/eventEmitter.js +32 -29
- package/src/js/util/humanize.js +9 -9
- package/src/js/util/mediaEvents.js +134 -94
- package/src/js/util/pretty.js +32 -30
- package/src/js/util/standardize.js +29 -27
- package/src/js/util/videomailError.js +217 -218
- package/src/js/wrappers/buttons.js +269 -261
- package/src/js/wrappers/container.js +356 -334
- package/src/js/wrappers/dimension.js +63 -58
- package/src/js/wrappers/form.js +136 -128
- package/src/js/wrappers/optionsWrapper.js +40 -38
- package/src/js/wrappers/visuals/inside/recorder/countdown.js +40 -40
- package/src/js/wrappers/visuals/inside/recorder/facingMode.js +25 -25
- package/src/js/wrappers/visuals/inside/recorder/pausedNote.js +28 -28
- package/src/js/wrappers/visuals/inside/recorder/recordNote.js +21 -21
- package/src/js/wrappers/visuals/inside/recorder/recordTimer.js +62 -64
- package/src/js/wrappers/visuals/inside/recorderInsides.js +68 -68
- package/src/js/wrappers/visuals/notifier.js +145 -138
- package/src/js/wrappers/visuals/recorder.js +734 -685
- package/src/js/wrappers/visuals/replay.js +164 -152
- package/src/js/wrappers/visuals/userMedia.js +245 -237
- package/src/js/wrappers/visuals.js +198 -190
- package/test/core/client.test.js +35 -35
- package/test/core/resource.test.js +9 -9
- package/test/util/audioRecorder.test.js +9 -9
- package/test/util/browser.test.js +108 -98
- package/test/util/collectLogger.test.js +9 -9
- package/test/util/eventEmitter.test.js +9 -9
- package/test/util/humanize.test.js +14 -14
- package/test/util/pretty.test.js +67 -67
- package/test/util/videomailError.test.js +195 -195
- package/test/wrappers/buttons.test.js +10 -10
- package/test/wrappers/container.test.js +11 -11
- package/test/wrappers/form.test.js +9 -9
- package/test/wrappers/notifier.test.js +9 -9
- package/test/wrappers/recorder.test.js +11 -11
- package/test/wrappers/replay.test.js +10 -10
- package/test/wrappers/userMedia.test.js +9 -9
- package/test/wrappers/visuals.test.js +11 -11
- package/.prettierrc.js +0 -13
- package/test/util/standardize.test.js +0 -15
package/.eslintrc.js
CHANGED
|
@@ -1,13 +1,45 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
parser:
|
|
3
|
-
extends: [
|
|
2
|
+
parser: "@babel/eslint-parser",
|
|
3
|
+
extends: ["eslint:recommended", "plugin:import/recommended", "prettier"],
|
|
4
4
|
env: {
|
|
5
5
|
browser: true,
|
|
6
6
|
node: true,
|
|
7
|
-
es6: true
|
|
7
|
+
es6: true,
|
|
8
|
+
},
|
|
9
|
+
settings: {
|
|
10
|
+
"import/resolver": {
|
|
11
|
+
node: true,
|
|
12
|
+
},
|
|
8
13
|
},
|
|
9
14
|
rules: {
|
|
10
15
|
// Turns on errors for missing imports which is great
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
"import/no-unresolved": "error",
|
|
17
|
+
|
|
18
|
+
// TODO Fix later
|
|
19
|
+
"sort-imports": "off",
|
|
20
|
+
"sort-keys": "off",
|
|
21
|
+
"no-warning-comments": "off",
|
|
22
|
+
"prefer-arrow-callback": "off",
|
|
23
|
+
"func-names": "off",
|
|
24
|
+
"no-magic-numbers": "off",
|
|
25
|
+
"id-length": "off",
|
|
26
|
+
"no-empty-function": "off",
|
|
27
|
+
"no-shadow": "off",
|
|
28
|
+
"max-lines": "off",
|
|
29
|
+
"max-statements": "off",
|
|
30
|
+
"max-lines-per-function": "off",
|
|
31
|
+
"no-undefined": "off",
|
|
32
|
+
"one-var": "off",
|
|
33
|
+
"no-inline-comments": "off",
|
|
34
|
+
"line-comment-position": "off",
|
|
35
|
+
"capitalized-comments": "off",
|
|
36
|
+
"func-style": "off",
|
|
37
|
+
"prefer-destructuring": "off",
|
|
38
|
+
"init-declarations": "off",
|
|
39
|
+
"no-invalid-this": "off",
|
|
40
|
+
"no-multi-assign": "off",
|
|
41
|
+
"max-params": "off",
|
|
42
|
+
"no-plusplus": "off",
|
|
43
|
+
"no-ternary": "off",
|
|
44
|
+
},
|
|
45
|
+
};
|
package/TODO.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
### TODOs
|
|
2
2
|
| Filename | line # | TODO
|
|
3
3
|
|:------|:------:|:------
|
|
4
|
-
| src/js/util/audioRecorder.js |
|
|
5
|
-
| src/js/util/eventEmitter.js |
|
|
6
|
-
| src/js/util/eventEmitter.js |
|
|
4
|
+
| src/js/util/audioRecorder.js | 13 | code needs rewrite
|
|
5
|
+
| src/js/util/eventEmitter.js | 7 | MAKE EVENT EMITTING IN DESPOT NOT GLOBAL BUT BY CONTAINER ID INSTEAD
|
|
6
|
+
| src/js/util/eventEmitter.js | 45 | have this emitted through a configuration because it is pretty noisy
|
|
7
7
|
| src/js/util/humanize.js | 4 | get rid of this class and use those imports directly
|
|
8
|
-
| src/js/wrappers/container.js |
|
|
9
|
-
| src/js/wrappers/container.js |
|
|
8
|
+
| src/js/wrappers/container.js | 307 | figure out how to fire dom's onload event again
|
|
9
|
+
| src/js/wrappers/container.js | 308 | or how to run all the scripts over again
|
|
10
10
|
| src/js/wrappers/optionsWrapper.js | 27 | fix this, it's not really an option
|
|
11
|
-
| src/js/wrappers/visuals/recorder.js |
|
|
12
|
-
| src/js/wrappers/visuals/recorder.js |
|
|
13
|
-
| src/js/wrappers/visuals/recorder.js |
|
|
14
|
-
| src/js/wrappers/visuals/recorder.js |
|
|
15
|
-
| src/js/wrappers/visuals/userMedia.js |
|
|
16
|
-
| gulpfile.js |
|
|
17
|
-
| gulpfile.js |
|
|
18
|
-
| gulpfile.js |
|
|
11
|
+
| src/js/wrappers/visuals/recorder.js | 608 | in https://github.com/binarykitchen/videomail-client/issues/142
|
|
12
|
+
| src/js/wrappers/visuals/recorder.js | 654 | retry with navigator.getUserMedia_() maybe?
|
|
13
|
+
| src/js/wrappers/visuals/recorder.js | 802 | commented out because for some reasons server does
|
|
14
|
+
| src/js/wrappers/visuals/recorder.js | 807 | consider removing this later or have it for debug=1 only?
|
|
15
|
+
| src/js/wrappers/visuals/userMedia.js | 312 | consider removing that if it's not the case anymore (for better performance)
|
|
16
|
+
| gulpfile.js | 2 | write this in ES6 once i have figured out how to
|
|
17
|
+
| gulpfile.js | 61 | fix this, so that it also works when not minified, this
|
|
18
|
+
| gulpfile.js | 67 | location is bad, should be in a temp folder or so
|
package/gulpfile.js
CHANGED
|
@@ -1,245 +1,252 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const
|
|
1
|
+
/*
|
|
2
|
+
* todo write this in ES6 once i have figured out how to
|
|
3
|
+
* transpile it with babelify itself
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const gulp = require("gulp");
|
|
9
|
+
const plugins = require("gulp-load-plugins")();
|
|
10
|
+
const nib = require("nib");
|
|
11
|
+
const browserify = require("browserify");
|
|
12
|
+
const source = require("vinyl-source-stream");
|
|
13
|
+
const buffer = require("vinyl-buffer");
|
|
14
|
+
const Router = require("router");
|
|
15
|
+
const bodyParser = require("body-parser");
|
|
16
|
+
const send = require("connect-send-json");
|
|
17
|
+
const del = require("del");
|
|
18
|
+
const minimist = require("minimist");
|
|
19
|
+
const watchify = require("watchify");
|
|
20
|
+
const babelify = require("babelify");
|
|
21
|
+
const tapeRun = require("tape-run");
|
|
22
|
+
const glob = require("glob");
|
|
23
|
+
const log = require("fancy-log");
|
|
24
|
+
const autoprefixer = require("autoprefixer");
|
|
25
|
+
const cssnano = require("cssnano");
|
|
26
|
+
|
|
27
|
+
const packageJson = require("./package.json");
|
|
26
28
|
|
|
27
29
|
const defaultOptions = {
|
|
28
30
|
minify: true,
|
|
29
31
|
importance: null,
|
|
30
32
|
write: false,
|
|
31
|
-
version: null
|
|
32
|
-
}
|
|
33
|
+
version: null,
|
|
34
|
+
};
|
|
33
35
|
|
|
34
|
-
const options = minimist(process.argv.slice(2), { default: defaultOptions })
|
|
36
|
+
const options = minimist(process.argv.slice(2), { default: defaultOptions });
|
|
35
37
|
|
|
36
|
-
log.info(
|
|
38
|
+
log.info("Options:", options);
|
|
37
39
|
|
|
38
40
|
function cleanJs(cb) {
|
|
39
|
-
del.sync([
|
|
40
|
-
cb()
|
|
41
|
+
del.sync(["prototype/js/*.js", "prototype/js/*.js.map"]);
|
|
42
|
+
cb();
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
function stylus() {
|
|
44
|
-
const postCssPlugins = [autoprefixer(), cssnano()]
|
|
46
|
+
const postCssPlugins = [autoprefixer(), cssnano()];
|
|
45
47
|
|
|
46
48
|
return (
|
|
47
49
|
gulp
|
|
48
|
-
.src(
|
|
50
|
+
.src("src/styles/styl/main.styl")
|
|
49
51
|
.pipe(plugins.plumber()) // with the plumber the gulp task won't crash on errors
|
|
50
52
|
.pipe(
|
|
51
53
|
plugins.stylus({
|
|
52
54
|
use: [nib()],
|
|
53
|
-
errors: true
|
|
54
|
-
})
|
|
55
|
+
errors: true,
|
|
56
|
+
}),
|
|
55
57
|
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
/*
|
|
59
|
+
* always minify otherwise it gets broken with line-breaks
|
|
60
|
+
* when surrounded with `'s when injected
|
|
61
|
+
* todo: fix this, so that it also works when not minified, this
|
|
62
|
+
* for faster builds during development
|
|
63
|
+
*/
|
|
60
64
|
.pipe(plugins.postcss(postCssPlugins))
|
|
61
|
-
.pipe(plugins.rename({ suffix:
|
|
65
|
+
.pipe(plugins.rename({ suffix: ".min", extname: ".css.js" }))
|
|
62
66
|
.pipe(plugins.injectString.wrap("module.exports='", "'"))
|
|
63
67
|
// todo: location is bad, should be in a temp folder or so
|
|
64
|
-
.pipe(gulp.dest(
|
|
68
|
+
.pipe(gulp.dest("src/styles/css"))
|
|
65
69
|
.pipe(plugins.connect.reload())
|
|
66
|
-
)
|
|
70
|
+
);
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
function todo() {
|
|
70
74
|
return gulp
|
|
71
|
-
.src([
|
|
75
|
+
.src(["src/**/*.{js, styl}", "gulpfile.js", "prototype/*.html"], { base: "./" })
|
|
72
76
|
.pipe(
|
|
73
77
|
plugins.todo({
|
|
74
|
-
fileName:
|
|
75
|
-
})
|
|
78
|
+
fileName: "TODO.md",
|
|
79
|
+
}),
|
|
76
80
|
)
|
|
77
|
-
.pipe(gulp.dest(
|
|
81
|
+
.pipe(gulp.dest("./"));
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
const cache = {}
|
|
81
|
-
const packageCache = {}
|
|
84
|
+
const cache = {};
|
|
85
|
+
const packageCache = {};
|
|
82
86
|
|
|
83
87
|
function bundle(done, watching) {
|
|
84
|
-
const entry = path.join(__dirname, packageJson.module)
|
|
88
|
+
const entry = path.join(__dirname, packageJson.module);
|
|
85
89
|
const bundler = browserify({
|
|
86
90
|
entries: [entry],
|
|
87
|
-
cache
|
|
88
|
-
standalone:
|
|
89
|
-
packageCache
|
|
91
|
+
cache,
|
|
92
|
+
standalone: "VideomailClient",
|
|
93
|
+
packageCache,
|
|
90
94
|
plugin: watching ? [watchify] : null,
|
|
91
|
-
debug: !options.minify // enables inline source maps
|
|
95
|
+
debug: !options.minify, // enables inline source maps
|
|
92
96
|
})
|
|
93
|
-
.on(
|
|
94
|
-
pump()
|
|
95
|
-
log(
|
|
97
|
+
.on("update", () => {
|
|
98
|
+
pump();
|
|
99
|
+
log("Re-bundling ...");
|
|
96
100
|
})
|
|
97
|
-
.on(
|
|
98
|
-
.require(entry, { expose:
|
|
99
|
-
.transform(babelify)
|
|
101
|
+
.on("log", log)
|
|
102
|
+
.require(entry, { expose: "videomail-client" })
|
|
103
|
+
.transform(babelify);
|
|
100
104
|
|
|
101
105
|
function pump() {
|
|
102
106
|
return bundler
|
|
103
107
|
.bundle()
|
|
104
|
-
.on(
|
|
105
|
-
console.error(err.toString())
|
|
106
|
-
this.emit(
|
|
108
|
+
.on("error", function (err) {
|
|
109
|
+
console.error(err.toString());
|
|
110
|
+
this.emit("end");
|
|
107
111
|
})
|
|
108
|
-
.on(
|
|
109
|
-
.pipe(source(
|
|
112
|
+
.on("end", done)
|
|
113
|
+
.pipe(source("./src/")) // gives streaming vinyl file object
|
|
110
114
|
.pipe(buffer()) // required because the next steps do not support streams
|
|
111
|
-
.pipe(plugins.concat(
|
|
115
|
+
.pipe(plugins.concat("videomail-client.js"))
|
|
112
116
|
.pipe(plugins.derequire())
|
|
113
|
-
.pipe(gulp.dest(
|
|
117
|
+
.pipe(gulp.dest("prototype/js"))
|
|
114
118
|
.pipe(plugins.plumber())
|
|
115
|
-
.pipe(plugins.if(options.minify, plugins.rename({ suffix:
|
|
119
|
+
.pipe(plugins.if(options.minify, plugins.rename({ suffix: ".min" })))
|
|
116
120
|
.pipe(plugins.if(options.minify, plugins.sourcemaps.init()))
|
|
117
121
|
.pipe(plugins.if(options.minify, plugins.bytediff.start()))
|
|
118
122
|
.pipe(plugins.if(options.minify, plugins.terser()))
|
|
119
123
|
.pipe(plugins.if(options.minify, plugins.bytediff.stop()))
|
|
120
|
-
.pipe(plugins.if(options.minify, plugins.sourcemaps.write(
|
|
121
|
-
.pipe(plugins.if(options.minify, gulp.dest(
|
|
122
|
-
.pipe(plugins.connect.reload())
|
|
124
|
+
.pipe(plugins.if(options.minify, plugins.sourcemaps.write("/")))
|
|
125
|
+
.pipe(plugins.if(options.minify, gulp.dest("prototype/js")))
|
|
126
|
+
.pipe(plugins.connect.reload());
|
|
123
127
|
}
|
|
124
128
|
|
|
125
|
-
return pump()
|
|
129
|
+
return pump();
|
|
126
130
|
}
|
|
127
131
|
|
|
128
132
|
function bundleWithWatchify(done) {
|
|
129
|
-
bundle(done, true)
|
|
133
|
+
bundle(done, true);
|
|
130
134
|
}
|
|
131
135
|
|
|
132
136
|
function middleware() {
|
|
133
|
-
const router = new Router()
|
|
137
|
+
const router = new Router();
|
|
134
138
|
|
|
135
|
-
router.use(bodyParser.json())
|
|
136
|
-
router.use(send.json())
|
|
139
|
+
router.use(bodyParser.json());
|
|
140
|
+
router.use(send.json());
|
|
137
141
|
|
|
138
142
|
// does not work, see bug https://github.com/AveVlad/gulp-connect/issues/170
|
|
139
|
-
router.post(
|
|
140
|
-
log.info(
|
|
143
|
+
router.post("/contact", function (req, res) {
|
|
144
|
+
log.info("Videomail data received (with meta data):", req.body);
|
|
141
145
|
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
/*
|
|
147
|
+
* At this stage, a backend could store the videomail_key in req.body
|
|
148
|
+
* into a database for replay functionality
|
|
149
|
+
*/
|
|
144
150
|
|
|
145
151
|
// Just an example to see that the backend can do anything with the data
|
|
146
152
|
res.json({
|
|
147
|
-
status:
|
|
148
|
-
})
|
|
149
|
-
})
|
|
153
|
+
status: `Inserted on ${new Date().toISOString()}`,
|
|
154
|
+
});
|
|
155
|
+
});
|
|
150
156
|
|
|
151
|
-
return [router]
|
|
157
|
+
return [router];
|
|
152
158
|
}
|
|
153
159
|
|
|
154
160
|
const connectOptions = {
|
|
155
|
-
root: [
|
|
161
|
+
root: ["prototype"],
|
|
156
162
|
port: 8080,
|
|
157
163
|
debug: true,
|
|
158
164
|
livereload: false, // disabled since it's broken unfortunately, see https://github.com/intesso/connect-livereload/issues/79
|
|
159
|
-
middleware
|
|
160
|
-
}
|
|
165
|
+
middleware,
|
|
166
|
+
};
|
|
161
167
|
|
|
162
168
|
function connectHttp(done) {
|
|
163
|
-
plugins.connect.server(connectOptions)
|
|
164
|
-
done()
|
|
169
|
+
plugins.connect.server(connectOptions);
|
|
170
|
+
done();
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
function connectHttps(done) {
|
|
168
|
-
const SSL_CERTS_PATH = path.join(__dirname,
|
|
169
|
-
|
|
170
|
-
plugins.connect.server(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
done()
|
|
174
|
+
const SSL_CERTS_PATH = path.join(__dirname, "env", "dev");
|
|
175
|
+
|
|
176
|
+
plugins.connect.server({
|
|
177
|
+
...connectOptions,
|
|
178
|
+
port: 8443,
|
|
179
|
+
https: {
|
|
180
|
+
key: fs.readFileSync(path.join(SSL_CERTS_PATH, "key.pem")),
|
|
181
|
+
cert: fs.readFileSync(path.join(SSL_CERTS_PATH, "cert.pem")),
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
done();
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
function reload(done) {
|
|
184
|
-
plugins.connect.reload()
|
|
185
|
-
done()
|
|
189
|
+
plugins.connect.reload();
|
|
190
|
+
done();
|
|
186
191
|
}
|
|
187
192
|
|
|
188
193
|
function watch(done) {
|
|
189
|
-
gulp.watch([
|
|
190
|
-
gulp.watch([
|
|
194
|
+
gulp.watch(["src/styles/styl/**/*.styl"], stylus);
|
|
195
|
+
gulp.watch(["prototype/*.html"], reload);
|
|
191
196
|
|
|
192
|
-
done()
|
|
197
|
+
done();
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
exports.test = function (done) {
|
|
196
|
-
const testFiles = glob.sync(
|
|
201
|
+
const testFiles = glob.sync("test/**/*.test.js");
|
|
197
202
|
const bundler = browserify({
|
|
198
|
-
entries: testFiles
|
|
199
|
-
}).transform(babelify)
|
|
203
|
+
entries: testFiles,
|
|
204
|
+
}).transform(babelify);
|
|
200
205
|
|
|
201
206
|
bundler
|
|
202
207
|
.bundle()
|
|
203
|
-
.on(
|
|
204
|
-
console.error(err.toString())
|
|
205
|
-
this.emit(
|
|
206
|
-
done()
|
|
208
|
+
.on("error", function (err) {
|
|
209
|
+
console.error(err.toString());
|
|
210
|
+
this.emit("end");
|
|
211
|
+
done();
|
|
207
212
|
})
|
|
208
213
|
.pipe(tapeRun({ sandbox: false }))
|
|
209
|
-
.on(
|
|
210
|
-
done()
|
|
214
|
+
.on("results", function () {
|
|
215
|
+
done();
|
|
211
216
|
})
|
|
212
|
-
.pipe(process.stdout)
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
.pipe(process.stdout);
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/*
|
|
221
|
+
* get inspired by
|
|
222
|
+
* https://www.npmjs.com/package/gulp-tag-version and
|
|
223
|
+
* https://github.com/nicksrandall/gulp-release-tasks/blob/master/tasks/release.js
|
|
224
|
+
*/
|
|
218
225
|
exports.bumpVersion = function () {
|
|
219
|
-
const bumpOptions = {}
|
|
226
|
+
const bumpOptions = {};
|
|
220
227
|
|
|
221
228
|
if (options.version) {
|
|
222
|
-
bumpOptions.version = options.version
|
|
229
|
+
bumpOptions.version = options.version;
|
|
223
230
|
} else if (options.importance) {
|
|
224
|
-
bumpOptions.type = options.importance
|
|
231
|
+
bumpOptions.type = options.importance;
|
|
225
232
|
}
|
|
226
233
|
|
|
227
|
-
console.log({ bumpOptions })
|
|
234
|
+
console.log({ bumpOptions });
|
|
228
235
|
|
|
229
236
|
return gulp
|
|
230
|
-
.src([
|
|
237
|
+
.src(["./package.json"])
|
|
231
238
|
.pipe(plugins.bump(bumpOptions))
|
|
232
|
-
.pipe(plugins.if(options.write, gulp.dest(
|
|
233
|
-
.on(
|
|
234
|
-
}
|
|
239
|
+
.pipe(plugins.if(options.write, gulp.dest("./")))
|
|
240
|
+
.on("error", log.error);
|
|
241
|
+
};
|
|
235
242
|
|
|
236
|
-
const build = gulp.series(gulp.parallel(gulp.series(stylus, cleanJs, bundle), todo))
|
|
243
|
+
const build = gulp.series(gulp.parallel(gulp.series(stylus, cleanJs, bundle), todo));
|
|
237
244
|
|
|
238
245
|
exports.watch = gulp.series(
|
|
239
246
|
gulp.parallel(gulp.series(stylus, cleanJs, bundleWithWatchify), todo),
|
|
240
247
|
gulp.parallel(connectHttp, connectHttps),
|
|
241
|
-
watch
|
|
242
|
-
)
|
|
248
|
+
watch,
|
|
249
|
+
);
|
|
243
250
|
|
|
244
|
-
exports.build = build
|
|
245
|
-
exports.default = build
|
|
251
|
+
exports.build = build;
|
|
252
|
+
exports.default = build;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"author": "Michael Heuberger <michael.heuberger@binarykitchen.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"prettier:fix": "prettier --write ./src ./test ./prototype/*.html gulpfile.js"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": "
|
|
37
|
-
"npm": "
|
|
36
|
+
"node": "^20.12.2",
|
|
37
|
+
"npm": "^10.5.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
40
40
|
"webcam",
|
|
@@ -45,8 +45,9 @@
|
|
|
45
45
|
"audio",
|
|
46
46
|
"recorder"
|
|
47
47
|
],
|
|
48
|
+
"prettier": "./prettier.config.js",
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@babel/core": "7.
|
|
50
|
+
"@babel/core": "7.25.2",
|
|
50
51
|
"add-eventlistener-with-options": "1.25.5",
|
|
51
52
|
"animitter": "3.0.0",
|
|
52
53
|
"audio-sample": "3.0.1",
|
|
@@ -57,14 +58,16 @@
|
|
|
57
58
|
"create-error": "0.3.1",
|
|
58
59
|
"deepmerge": "4.3.1",
|
|
59
60
|
"defined": "1.0.1",
|
|
60
|
-
"despot": "
|
|
61
|
+
"despot": "2.0.0",
|
|
61
62
|
"document-visibility": "1.0.1",
|
|
62
63
|
"element-closest": "3.0.2",
|
|
63
|
-
"filesize": "10.1.
|
|
64
|
+
"filesize": "10.1.4",
|
|
65
|
+
"format-util": "1.0.5",
|
|
64
66
|
"get-form-data": "3.0.0",
|
|
65
67
|
"hidden": "1.1.1",
|
|
66
68
|
"humanize-duration": "3.32.1",
|
|
67
69
|
"hyperscript": "2.0.2",
|
|
70
|
+
"inherits": "2.0.4",
|
|
68
71
|
"insert-css": "2.0.0",
|
|
69
72
|
"iphone-inline-video": "2.2.2",
|
|
70
73
|
"is-power-of-two": "1.0.0",
|
|
@@ -78,11 +81,11 @@
|
|
|
78
81
|
"websocket-stream": "5.5.2"
|
|
79
82
|
},
|
|
80
83
|
"devDependencies": {
|
|
81
|
-
"@babel/eslint-parser": "7.
|
|
84
|
+
"@babel/eslint-parser": "7.25.1",
|
|
82
85
|
"@babel/plugin-transform-runtime": "7.24.7",
|
|
83
|
-
"@babel/preset-env": "7.
|
|
86
|
+
"@babel/preset-env": "7.25.3",
|
|
84
87
|
"audit-ci": "6.6.1",
|
|
85
|
-
"autoprefixer": "10.4.
|
|
88
|
+
"autoprefixer": "10.4.20",
|
|
86
89
|
"babelify": "10.0.0",
|
|
87
90
|
"body-parser": "1.20.2",
|
|
88
91
|
"browserify": "17.0.0",
|
|
@@ -114,8 +117,8 @@
|
|
|
114
117
|
"gulp-todo": "7.1.1",
|
|
115
118
|
"minimist": "1.2.8",
|
|
116
119
|
"nib": "1.2.0",
|
|
117
|
-
"postcss": "8.4.
|
|
118
|
-
"prettier": "3.3.
|
|
120
|
+
"postcss": "8.4.40",
|
|
121
|
+
"prettier": "3.3.3",
|
|
119
122
|
"router": "1.3.8",
|
|
120
123
|
"tape": "5.8.1",
|
|
121
124
|
"tape-catch": "1.0.6",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
var videomailClient = new VideomailClient({
|
|
13
13
|
verbose: true,
|
|
14
14
|
adjustFormOnBrowserError: true,
|
|
15
|
-
fakeUaString:
|
|
16
|
-
reportErrors: true
|
|
17
|
-
})
|
|
15
|
+
fakeUaString: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)",
|
|
16
|
+
reportErrors: true,
|
|
17
|
+
});
|
|
18
18
|
|
|
19
|
-
videomailClient.show()
|
|
19
|
+
videomailClient.show();
|
|
20
20
|
</script>
|
|
21
21
|
</body>
|
|
22
22
|
</html>
|
package/prototype/bad_ios.html
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
verbose: true,
|
|
14
14
|
adjustFormOnBrowserError: true,
|
|
15
15
|
fakeUaString:
|
|
16
|
-
|
|
16
|
+
"Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25",
|
|
17
17
|
reportErrors: true,
|
|
18
18
|
video: {
|
|
19
19
|
// just to test that this height will get removed so that the whole error
|
|
20
20
|
// message will be shown.
|
|
21
|
-
height: 100
|
|
22
|
-
}
|
|
23
|
-
})
|
|
21
|
+
height: 100,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
24
|
|
|
25
|
-
videomailClient.show()
|
|
25
|
+
videomailClient.show();
|
|
26
26
|
</script>
|
|
27
27
|
</body>
|
|
28
28
|
</html>
|