@volcengine/veplayer 2.1.0-rc.1 → 2.1.0-rc.2

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.
@@ -2794,14 +2794,16 @@ const generateUrlWithSessionId = (url) => {
2794
2794
  }
2795
2795
  try {
2796
2796
  const urlObject = new URL(url);
2797
- if ((_a = urlObject == null ? void 0 : urlObject.searchParams) == null ? void 0 : _a.get("_session_id")) {
2798
- return url;
2797
+ if (!((_a = urlObject == null ? void 0 : urlObject.searchParams) == null ? void 0 : _a.get("_session_id"))) {
2798
+ (_b = urlObject == null ? void 0 : urlObject.searchParams) == null ? void 0 : _b.append("_session_id", generateSessionId());
2799
2799
  }
2800
- (_b = urlObject == null ? void 0 : urlObject.searchParams) == null ? void 0 : _b.append("_session_id", generateSessionId());
2801
- return urlObject.toString();
2800
+ url = urlObject.toString();
2802
2801
  } catch (error2) {
2803
- return url;
2804
2802
  }
2803
+ if (withoutProtocol) {
2804
+ return url == null ? void 0 : url.replace(location.protocol, "");
2805
+ }
2806
+ return url;
2805
2807
  };
2806
2808
  const hashCode = (str) => {
2807
2809
  str += "";