@vindral/web-sdk 4.1.4 → 4.1.5-10-g4a74bcc5

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.
@@ -27,7 +27,17 @@ var l = (e, t, n) => new Promise((r, s) => {
27
27
  }, i = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(a, c);
28
28
  i((n = n.apply(e, t)).next());
29
29
  });
30
- const y = (e) => {
30
+ function f(e, t) {
31
+ if (!e)
32
+ throw new Error(t);
33
+ }
34
+ const P = (e) => {
35
+ try {
36
+ return JSON.parse(e);
37
+ } catch (t) {
38
+ return;
39
+ }
40
+ }, y = (e) => {
31
41
  switch (e) {
32
42
  case "h264":
33
43
  case "av1":
@@ -42,17 +52,18 @@ const y = (e) => {
42
52
  throw new Error("Unknown codec");
43
53
  }
44
54
  };
45
- function f(e, t) {
46
- if (!e)
47
- throw new Error(t);
55
+ function U(e) {
56
+ if (e.startsWith("opus"))
57
+ return "opus";
58
+ if (e.startsWith("mp4a"))
59
+ return "aac";
60
+ if (e.startsWith("avc1"))
61
+ return "h264";
62
+ if (e.startsWith("av01"))
63
+ return "av1";
64
+ if (e.startsWith("webvtt"))
65
+ return "webvtt";
48
66
  }
49
- const P = (e) => {
50
- try {
51
- return JSON.parse(e);
52
- } catch (t) {
53
- return;
54
- }
55
- };
56
67
  function J(e) {
57
68
  return !(typeof e.edges[0] == "string" || e.channels[0] && !("catalog" in e.channels[0]));
58
69
  }
@@ -95,18 +106,6 @@ function j(e) {
95
106
  });
96
107
  }).sort((t, n) => t.bitRate - n.bitRate);
97
108
  }
98
- function U(e) {
99
- if (e.startsWith("opus"))
100
- return "opus";
101
- if (e.startsWith("mp4a"))
102
- return "aac";
103
- if (e.startsWith("avc1"))
104
- return "h264";
105
- if (e.startsWith("av01"))
106
- return "av1";
107
- if (e.startsWith("webvtt"))
108
- return "webvtt";
109
- }
110
109
  const L = (e) => e ? {
111
110
  Authorization: `Bearer ${e}`
112
111
  } : void 0, G = (e, t) => {