stormcloud-video-player 0.8.14 → 0.8.15

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.
package/lib/index.js CHANGED
@@ -2728,6 +2728,7 @@ function supportsFeature(feature) {
2728
2728
  // src/utils/ctvVastSignals.ts
2729
2729
  var AIRY_ANDROID_APP_ID = "com.freeairytv.android";
2730
2730
  var AIRY_APP_NAME = "AiryTV Movies & TV";
2731
+ var AIRY_DEFAULT_CONTENT_URL = "https://live.airy.tv";
2731
2732
  var CTV_SESSION_STORAGE_KEY = "stormcloud.ctv.sid";
2732
2733
  var DEVICE_ID_STORAGE_KEYS = [
2733
2734
  "rdid",
@@ -2745,8 +2746,9 @@ function resolveCtvVastSignals() {
2745
2746
  var bridgeSignals = readNativeBridgeSignals();
2746
2747
  var deviceId = bridgeSignals.deviceId || readStoredDeviceId();
2747
2748
  var deviceIdType = bridgeSignals.deviceIdType || readStoredString("deviceIdType") || inferDeviceIdType();
2749
+ var contentUrl = bridgeSignals.contentUrl || readStoredString("contentUrl") || AIRY_DEFAULT_CONTENT_URL;
2748
2750
  return _object_spread_props(_object_spread({
2749
- contentUrl: "https://".concat(AIRY_ANDROID_APP_ID, ".example.com"),
2751
+ contentUrl: contentUrl,
2750
2752
  appId: AIRY_ANDROID_APP_ID,
2751
2753
  appName: AIRY_APP_NAME,
2752
2754
  sessionId: getOrCreateCtvSessionId()
@@ -2797,6 +2799,12 @@ function readNativeBridgeSignals() {
2797
2799
  try {
2798
2800
  for(var _iterator = candidates[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2799
2801
  var source = _step.value;
2802
+ var contentUrl = readBridgeValue(source, [
2803
+ "contentUrl",
2804
+ "url",
2805
+ "videoUrl",
2806
+ "canonicalUrl"
2807
+ ]) || void 0;
2800
2808
  var deviceId = readBridgeValue(source, [
2801
2809
  "rdid",
2802
2810
  "ifa",
@@ -2804,7 +2812,7 @@ function readNativeBridgeSignals() {
2804
2812
  "adId",
2805
2813
  "deviceId"
2806
2814
  ]) || void 0;
2807
- if (!deviceId) continue;
2815
+ if (!contentUrl && !deviceId) continue;
2808
2816
  var deviceIdType = readBridgeValue(source, [
2809
2817
  "idtype",
2810
2818
  "deviceIdType",
@@ -2816,11 +2824,13 @@ function readNativeBridgeSignals() {
2816
2824
  "limitedAdTracking",
2817
2825
  "lat"
2818
2826
  ]);
2819
- return _object_spread({
2827
+ return _object_spread({}, contentUrl ? {
2828
+ contentUrl: contentUrl
2829
+ } : {}, deviceId ? {
2820
2830
  deviceId: deviceId
2821
- }, deviceIdType ? {
2831
+ } : {}, deviceId && deviceIdType ? {
2822
2832
  deviceIdType: deviceIdType
2823
- } : {}, limitAdTracking != null ? {
2833
+ } : {}, deviceId && limitAdTracking != null ? {
2824
2834
  limitAdTracking: limitAdTracking
2825
2835
  } : {});
2826
2836
  }