videomail-client 5.3.0 → 5.5.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.
@@ -569,12 +569,10 @@ const Container = function (options) {
569
569
  invalidInput.value +
570
570
  '"'
571
571
  } else {
572
- whyInvalid = 'Form input(s() are invalid'
572
+ whyInvalid = 'Form input(s) are invalid'
573
573
  }
574
574
  }
575
575
 
576
- // TODO CONTINUE FROM HERE, MAKE VALIDATION CLEVER WHEN AUTOMATIC SO THAT IT REQUIRES AT
577
- // LEAST ONE RECIPIENT AMONG TO/CC/BCC
578
576
  if (valid) {
579
577
  // If CC and/or BCC exist, validate one more time to ensure at least
580
578
  // one recipient is given
@@ -619,8 +617,6 @@ const Container = function (options) {
619
617
  if (!valid) {
620
618
  whyInvalid = 'Please enter at least one recipient.'
621
619
  }
622
-
623
- console.log({ recipients })
624
620
  }
625
621
  } else {
626
622
  valid = visualsValid
@@ -240,7 +240,9 @@ const Replay = function (parentElement, options) {
240
240
  if (!source) {
241
241
  if (src) {
242
242
  source = h('source', {
243
- src: src,
243
+ // Ensures HTML video thumbnail turns up on iOS, see
244
+ // https://muffinman.io/blog/hack-for-ios-safari-to-display-html-video-thumbnail/
245
+ src: src + '#t=0.001',
244
246
  type: 'video/' + type
245
247
  })
246
248
 
@@ -1 +1 @@
1
- module.exports='@-webkit-keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}@keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}.IIV::-webkit-media-controls-play-button,.IIV::-webkit-media-controls-start-playback-button{opacity:0;pointer-events:none;width:5px}.videomail .visuals{position:relative}.videomail .visuals video.replay{height:100%;width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer{height:auto;margin:0}.videomail .countdown,.videomail .facingMode,.videomail .paused,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{position:absolute;z-index:100}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{font-weight:700}.videomail .countdown,.videomail .paused,.videomail noscript{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint{letter-spacing:4px;text-align:center;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.videomail .countdown,.videomail .pausedHeader{font-size:460%;opacity:.9}.videomail .pausedHint{font-size:150%}.videomail .facingMode{background:rgba(30,30,30,.5);border:none;bottom:.6em;color:hsla(0,0%,96%,.9);font-family:monospace;font-size:1.2em;outline:none;padding:.1em .3em;right:.7em;-webkit-transition:all .2s ease;transition:all .2s ease;z-index:10}.videomail .facingMode:hover{background:rgba(50,50,50,.7);cursor:pointer}.videomail .recordNote,.videomail .recordTimer{background:hsla(0,0%,4%,.8);color:#00d814;font-family:monospace;opacity:.9;padding:.3em .4em;right:.7em;-webkit-transition:all 1s ease;transition:all 1s ease}.videomail .recordNote.near,.videomail .recordTimer.near{color:#eb9369}.videomail .recordNote.nigh,.videomail .recordTimer.nigh{color:#ea4b2a}.videomail .recordTimer{top:.7em}.videomail .recordNote{top:3.6em}.videomail .recordNote:before{-webkit-animation:blink 1s infinite;animation:blink 1s infinite;content:"REC"}.videomail .notifier{box-sizing:border-box;height:100%;overflow:hidden}.videomail .radioGroup{display:block}.videomail video{margin-bottom:0}'
1
+ module.exports='@-webkit-keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}@keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}.IIV::-webkit-media-controls-play-button,.IIV::-webkit-media-controls-start-playback-button{opacity:0;pointer-events:none;width:5px}.videomail .visuals{position:relative}.videomail .visuals video.replay{height:100%;width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer{height:auto;margin:0}.videomail .countdown,.videomail .facingMode,.videomail .paused,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{position:absolute;z-index:100}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{font-weight:700}.videomail .countdown,.videomail .paused,.videomail noscript{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint{letter-spacing:4px;text-align:center;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.videomail .countdown,.videomail .pausedHeader{font-size:460%;opacity:.9}.videomail .pausedHint{font-size:150%}.videomail .facingMode{background:rgba(30,30,30,.5);border:none;bottom:.6em;color:hsla(0,0%,96%,.9);font-family:monospace;font-size:1.2em;outline:none;padding:.1em .3em;right:.7em;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;z-index:10}.videomail .facingMode:hover{background:rgba(50,50,50,.7);cursor:pointer}.videomail .recordNote,.videomail .recordTimer{background:hsla(0,0%,4%,.8);color:#00d814;font-family:monospace;opacity:.9;padding:.3em .4em;right:.7em;-webkit-transition:all 1s ease;-o-transition:all 1s ease;transition:all 1s ease}.videomail .recordNote.near,.videomail .recordTimer.near{color:#eb9369}.videomail .recordNote.nigh,.videomail .recordTimer.nigh{color:#ea4b2a}.videomail .recordTimer{top:.7em}.videomail .recordNote{top:3.6em}.videomail .recordNote:before{-webkit-animation:blink 1s infinite;animation:blink 1s infinite;content:"REC"}.videomail .notifier{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;overflow:hidden}.videomail .radioGroup{display:block}.videomail video{margin-bottom:0}'
@@ -4,18 +4,15 @@ import Browser from '../../src/js/util/browser'
4
4
 
5
5
  test('Browser:', { timeout: 2000 }, function (t) {
6
6
  t.test('without arguments', function (tt) {
7
- tt.plan(8)
7
+ tt.plan(7)
8
8
 
9
9
  const browser = new Browser({ debug: function () {} })
10
10
 
11
- let err = browser.checkPlaybackCapabilities()
12
- tt.equal(err.message, 'No HTML5 support for video tag!')
13
-
14
- err = browser.checkBufferTypes()
11
+ let err = browser.checkBufferTypes()
15
12
  tt.equal(err, undefined)
16
13
 
17
14
  const videoType = browser.getVideoType()
18
- tt.equal(videoType, undefined)
15
+ tt.equal(videoType, 'webm')
19
16
 
20
17
  err = browser.getNoAccessIssue()
21
18
  tt.equal(err.message, 'Unable to access webcam')
@@ -27,7 +24,7 @@ test('Browser:', { timeout: 2000 }, function (t) {
27
24
  })
28
25
 
29
26
  t.test('fake old Firefox', function (tt) {
30
- tt.plan(9)
27
+ tt.plan(7)
31
28
 
32
29
  const options = {
33
30
  fakeUaString:
@@ -36,16 +33,10 @@ test('Browser:', { timeout: 2000 }, function (t) {
36
33
  }
37
34
 
38
35
  const browser = new Browser(options)
39
- let err
40
-
41
- err = browser.checkPlaybackCapabilities()
42
- tt.equal(err.message, 'No HTML5 support for video tag!')
43
- tt.ok(err.explanation.indexOf('upgrade Firefox') >= 0)
44
-
45
- err = browser.checkBufferTypes()
36
+ let err = browser.checkBufferTypes()
46
37
  tt.equal(err, undefined)
47
38
 
48
- tt.equal(browser.getVideoType(), undefined)
39
+ tt.equal(browser.getVideoType(), 'webm')
49
40
 
50
41
  err = browser.getNoAccessIssue()
51
42
  tt.equal(err.message, 'Unable to access webcam')
@@ -57,7 +48,7 @@ test('Browser:', { timeout: 2000 }, function (t) {
57
48
  })
58
49
 
59
50
  t.test('fake old Chrome', function (tt) {
60
- tt.plan(9)
51
+ tt.plan(7)
61
52
 
62
53
  const options = {
63
54
  fakeUaString:
@@ -66,16 +57,10 @@ test('Browser:', { timeout: 2000 }, function (t) {
66
57
  }
67
58
 
68
59
  const browser = new Browser(options)
69
- let err
70
-
71
- err = browser.checkPlaybackCapabilities()
72
- tt.equal(err.message, 'No HTML5 support for video tag!')
73
- tt.ok(err.explanation.indexOf('upgrade Chrome') >= 0)
74
-
75
- err = browser.checkBufferTypes()
60
+ let err = browser.checkBufferTypes()
76
61
  tt.equal(err, undefined)
77
62
 
78
- tt.equal(browser.getVideoType(), undefined)
63
+ tt.equal(browser.getVideoType(), 'webm')
79
64
 
80
65
  err = browser.getNoAccessIssue()
81
66
  tt.equal(err.message, 'Unable to access webcam')
@@ -87,7 +72,7 @@ test('Browser:', { timeout: 2000 }, function (t) {
87
72
  })
88
73
 
89
74
  t.test('fake old IE', function (tt) {
90
- tt.plan(11)
75
+ tt.plan(9)
91
76
 
92
77
  const options = {
93
78
  fakeUaString:
@@ -105,16 +90,10 @@ test('Browser:', { timeout: 2000 }, function (t) {
105
90
  err.explanation.indexOf('Instead of Internet Explorer you need to upgrade') >= 0
106
91
  )
107
92
 
108
- err = browser.checkPlaybackCapabilities()
109
- tt.equal(err.message, 'No HTML5 support for video tag!')
110
- tt.ok(
111
- err.explanation.indexOf('Instead of Internet Explorer you need to upgrade') >= 0
112
- )
113
-
114
93
  err = browser.checkBufferTypes()
115
94
  tt.equal(err, undefined)
116
95
 
117
- tt.equal(browser.getVideoType(), undefined)
96
+ tt.equal(browser.getVideoType(), 'webm')
118
97
 
119
98
  err = browser.getNoAccessIssue()
120
99
  tt.equal(err.message, 'Unable to access webcam')
@@ -126,7 +105,7 @@ test('Browser:', { timeout: 2000 }, function (t) {
126
105
  })
127
106
 
128
107
  t.test('fake old Safari', function (tt) {
129
- tt.plan(11)
108
+ tt.plan(7)
130
109
 
131
110
  const options = {
132
111
  fakeUaString:
@@ -136,20 +115,10 @@ test('Browser:', { timeout: 2000 }, function (t) {
136
115
  }
137
116
 
138
117
  const browser = new Browser(options)
139
- let err
140
-
141
- err = browser.checkRecordingCapabilities()
142
- tt.equal(err.message, 'Sorry, your browser is unable to use webcams')
143
- tt.ok(err.explanation.indexOf('Safari below version 11 has no webcam support.') >= 0)
144
-
145
- err = browser.checkPlaybackCapabilities()
146
- tt.equal(err.message, 'No HTML5 support for video tag!')
147
- tt.ok(err.explanation.indexOf('Safari below version 11 has no webcam support.') >= 0)
148
-
149
- err = browser.checkBufferTypes()
118
+ let err = browser.checkBufferTypes()
150
119
  tt.equal(err, undefined)
151
120
 
152
- tt.equal(browser.getVideoType(), undefined)
121
+ tt.equal(browser.getVideoType(), 'webm')
153
122
 
154
123
  err = browser.getNoAccessIssue()
155
124
  tt.equal(err.message, 'Unable to access webcam')