obi-sdk 0.1.3 → 0.1.4

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,4 +1,5 @@
1
- import { S as SDKState, z } from "./obi-widget-9c0306f4.js";
1
+ import { m as mitt } from "./mitt-3c1f932d.js";
2
+ import { S as SDKState, z } from "./obi-widget-0d63936f.js";
2
3
  function _mergeNamespaces(n, m) {
3
4
  m.forEach(function(e2) {
4
5
  e2 && typeof e2 !== "string" && !Array.isArray(e2) && Object.keys(e2).forEach(function(k) {
@@ -11798,7 +11799,7 @@ function requireParser() {
11798
11799
  var grammar2 = requireGrammar();
11799
11800
  var validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);
11800
11801
  exports.parse = function(sdp2) {
11801
- var session2 = {}, media = [], location = session2;
11802
+ var session = {}, media = [], location = session;
11802
11803
  sdp2.split(/(\r\n|\r|\n)/).filter(validLine).forEach(function(l) {
11803
11804
  var type = l[0];
11804
11805
  var content = l.slice(2);
@@ -11816,8 +11817,8 @@ function requireParser() {
11816
11817
  }
11817
11818
  }
11818
11819
  });
11819
- session2.media = media;
11820
- return session2;
11820
+ session.media = media;
11821
+ return session;
11821
11822
  };
11822
11823
  var paramReducer = function(acc, expr) {
11823
11824
  var s = expr.split(/=(.+)/, 2);
@@ -11921,15 +11922,15 @@ function requireWriter() {
11921
11922
  };
11922
11923
  var defaultOuterOrder = ["v", "o", "s", "i", "u", "e", "p", "c", "b", "t", "r", "z", "a"];
11923
11924
  var defaultInnerOrder = ["i", "c", "b", "a"];
11924
- writer = function(session2, opts) {
11925
+ writer = function(session, opts) {
11925
11926
  opts = opts || {};
11926
- if (session2.version == null) {
11927
- session2.version = 0;
11927
+ if (session.version == null) {
11928
+ session.version = 0;
11928
11929
  }
11929
- if (session2.name == null) {
11930
- session2.name = " ";
11930
+ if (session.name == null) {
11931
+ session.name = " ";
11931
11932
  }
11932
- session2.media.forEach(function(mLine) {
11933
+ session.media.forEach(function(mLine) {
11933
11934
  if (mLine.payloads == null) {
11934
11935
  mLine.payloads = "";
11935
11936
  }
@@ -11939,16 +11940,16 @@ function requireWriter() {
11939
11940
  var sdp2 = [];
11940
11941
  outerOrder.forEach(function(type) {
11941
11942
  grammar2[type].forEach(function(obj) {
11942
- if (obj.name in session2 && session2[obj.name] != null) {
11943
- sdp2.push(makeLine(type, obj, session2));
11944
- } else if (obj.push in session2 && session2[obj.push] != null) {
11945
- session2[obj.push].forEach(function(el) {
11943
+ if (obj.name in session && session[obj.name] != null) {
11944
+ sdp2.push(makeLine(type, obj, session));
11945
+ } else if (obj.push in session && session[obj.push] != null) {
11946
+ session[obj.push].forEach(function(el) {
11946
11947
  sdp2.push(makeLine(type, obj, el));
11947
11948
  });
11948
11949
  }
11949
11950
  });
11950
11951
  });
11951
- session2.media.forEach(function(mLine) {
11952
+ session.media.forEach(function(mLine) {
11952
11953
  sdp2.push(makeLine("m", grammar2.m[0], mLine));
11953
11954
  innerOrder.forEach(function(type) {
11954
11955
  grammar2[type].forEach(function(obj) {
@@ -21851,22 +21852,6 @@ class ConnectionCheck extends eventsExports.EventEmitter {
21851
21852
  });
21852
21853
  }
21853
21854
  }
21854
- function mitt(n) {
21855
- return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e2) {
21856
- var i = n.get(t);
21857
- i ? i.push(e2) : n.set(t, [e2]);
21858
- }, off: function(t, e2) {
21859
- var i = n.get(t);
21860
- i && (e2 ? i.splice(i.indexOf(e2) >>> 0, 1) : n.set(t, []));
21861
- }, emit: function(t, e2) {
21862
- var i = n.get(t);
21863
- i && i.slice().map(function(n2) {
21864
- n2(e2);
21865
- }), (i = n.get("*")) && i.slice().map(function(n2) {
21866
- n2(t, e2);
21867
- });
21868
- } };
21869
- }
21870
21855
  class ObiSession {
21871
21856
  constructor(options = {}) {
21872
21857
  this.currentState = SDKState.READY;
@@ -22156,13 +22141,7 @@ class ObiSession {
22156
22141
  }
22157
22142
  }
22158
22143
  }
22159
- const session = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22160
- __proto__: null,
22161
- ObiSession
22162
- }, Symbol.toStringTag, { value: "Module" }));
22163
22144
  export {
22164
- ObiSession as O,
22165
- mitt as m,
22166
- session as s
22145
+ ObiSession
22167
22146
  };
22168
- //# sourceMappingURL=session-37970ed1.js.map
22147
+ //# sourceMappingURL=session-88fd0dca.js.map