@conecli/cone-render 0.8.20-shop.146 → 0.8.20-shop.148

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.
@@ -1 +1 @@
1
- const MediaError = {
2
1
  MEDIA_ERR_ABORTED: 1,
3
2
  MEDIA_ERR_NETWORK: 2,
4
3
  MEDIA_ERR_DECODE: 3,
5
4
  MEDIA_ERR_SRC_NOT_SUPPORTED: 4,
6
5
  [MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED',
7
6
  [MediaError.MEDIA_ERR_NETWORK]: 'MEDIA_ERR_NETWORK',
8
7
  [MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE',
9
8
  [MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED',
10
9
  if (!error) {
11
10
  return ''
12
11
  }
13
12
  const message = error.message
14
13
  let s = ''
15
14
  if (MediaError && error instanceof MediaError) {
16
15
  s += codeMap[error.code] || 'UNKNOWN'
17
16
  }
18
17
  if (message?.length > 0) {
19
18
  s += ` ${message}`
20
19
  }
21
20
  return `${error.constructor.name} ${error.code}: ${s}`
21
+ const MediaError = {
22
22
  MEDIA_ERR_ABORTED: 1,
23
23
  MEDIA_ERR_NETWORK: 2,
24
24
  MEDIA_ERR_DECODE: 3,
25
25
  MEDIA_ERR_SRC_NOT_SUPPORTED: 4,
26
26
  [MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED',
27
27
  [MediaError.MEDIA_ERR_NETWORK]: 'MEDIA_ERR_NETWORK',
28
28
  [MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE',
29
29
  [MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED',
30
30
  if (!error) {
31
31
  return ''
32
32
  }
33
33
  const message = error.message
34
34
  let s = ''
35
35
  if (error?.code) {
36
36
  s += codeMap[error.code] || 'UNKNOWN'
37
37
  }
38
38
  if (message?.length > 0) {
39
39
  s += ` ${message}`
40
40
  }
41
41
  return `${error.constructor.name} ${error.code}: ${s}`