stormcloud-video-player 0.8.50 → 0.8.51

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,4 @@
1
- import { a as StormcloudVideoPlayerConfig } from '../types-cTqIKw_D.cjs';
1
+ import { S as StormcloudVideoPlayerConfig } from '../types-iDjS8f_7.cjs';
2
2
 
3
3
  declare class StormcloudVideoPlayer {
4
4
  private readonly video;
@@ -1,4 +1,4 @@
1
- import { S as Scte35Marker } from '../types-cTqIKw_D.cjs';
1
+ import { a as Scte35Marker } from '../types-iDjS8f_7.cjs';
2
2
 
3
3
  type Scte35CueSource = "manifest" | "id3" | "ts";
4
4
  type Scte35CueReadiness = "early" | "playback";
@@ -400,6 +400,179 @@ module.exports = __toCommonJS(HlsPlayer_exports);
400
400
  var import_react = require("react");
401
401
  // src/sdk/hlsAdPlayer.ts
402
402
  var import_hls = __toESM(require("hls.js"), 1);
403
+ // src/utils/browserCompat.ts
404
+ function getChromeVersion(ua) {
405
+ var match = ua.match(/Chrome\/(\d+)/);
406
+ return match && match[1] ? parseInt(match[1], 10) : 0;
407
+ }
408
+ function getWebKitVersion(ua) {
409
+ var match = ua.match(/AppleWebKit\/(\d+)/);
410
+ return match && match[1] ? parseInt(match[1], 10) : 0;
411
+ }
412
+ function getPlatform() {
413
+ var _navigator_userAgentData;
414
+ if ("userAgentData" in navigator && ((_navigator_userAgentData = navigator.userAgentData) === null || _navigator_userAgentData === void 0 ? void 0 : _navigator_userAgentData.platform)) {
415
+ return navigator.userAgentData.platform;
416
+ }
417
+ var ua = navigator.userAgent;
418
+ if (/Mac|iPhone|iPad|iPod/i.test(ua)) {
419
+ return /iPhone|iPad|iPod/i.test(ua) ? "iPhone" : "MacIntel";
420
+ }
421
+ if (/Win/i.test(ua)) {
422
+ return "Win32";
423
+ }
424
+ if (/Linux/i.test(ua)) {
425
+ return /Android/i.test(ua) ? "Linux armv8l" : "Linux x86_64";
426
+ }
427
+ if (/CrOS/i.test(ua)) {
428
+ return "CrOS";
429
+ }
430
+ return navigator.platform || "Unknown";
431
+ }
432
+ function detectBrowser() {
433
+ var ua = navigator.userAgent;
434
+ var platform = getPlatform();
435
+ var name = "Unknown";
436
+ var version = "0";
437
+ var majorVersion = 0;
438
+ var isSmartTV = false;
439
+ var isLegacyTV = false;
440
+ var supportsModernJS = true;
441
+ var webOSVersion;
442
+ var tizenVersion;
443
+ var chromeVersionNum;
444
+ var chromeVersion = getChromeVersion(ua);
445
+ var webkitVersion = getWebKitVersion(ua);
446
+ chromeVersionNum = chromeVersion > 0 ? chromeVersion : void 0;
447
+ if (/Web0S|webOS|LG Browser|LGSTB/i.test(ua)) {
448
+ name = "LG WebOS";
449
+ isSmartTV = true;
450
+ var match = ua.match(/Web0S[/\s]*([\d.]+)/i) || ua.match(/webOS[/\s]*([\d.]+)/i);
451
+ if (!match || !match[1]) {
452
+ match = ua.match(/webOSTV[/\s-]*([\d.]+)/i) || ua.match(/webOS\.TV[/\s-]*([\d.]+)/i);
453
+ }
454
+ if (match && match[1]) {
455
+ version = match[1];
456
+ var parts = version.split(".");
457
+ majorVersion = parts[0] ? parseInt(parts[0], 10) : 0;
458
+ webOSVersion = majorVersion;
459
+ } else if (chromeVersion > 0) {
460
+ if (chromeVersion >= 79) {
461
+ webOSVersion = 6;
462
+ version = "6.0";
463
+ majorVersion = 6;
464
+ } else if (chromeVersion >= 68) {
465
+ webOSVersion = 5;
466
+ version = "5.0";
467
+ majorVersion = 5;
468
+ } else if (chromeVersion >= 53) {
469
+ webOSVersion = 4;
470
+ version = "4.0";
471
+ majorVersion = 4;
472
+ } else if (chromeVersion >= 38) {
473
+ webOSVersion = 3;
474
+ version = "3.0";
475
+ majorVersion = 3;
476
+ } else {
477
+ webOSVersion = 2;
478
+ version = "2.0";
479
+ majorVersion = 2;
480
+ }
481
+ } else {
482
+ version = "Unknown";
483
+ webOSVersion = void 0;
484
+ }
485
+ isLegacyTV = webOSVersion !== void 0 && webOSVersion < 3;
486
+ } else if (/Tizen/i.test(ua)) {
487
+ name = "Samsung Tizen";
488
+ isSmartTV = true;
489
+ var match1 = ua.match(/Tizen[/\s]*([\d.]+)/i);
490
+ version = match1 && match1[1] ? match1[1] : "Unknown";
491
+ if (version !== "Unknown") {
492
+ var parts1 = version.split(".");
493
+ majorVersion = parts1[0] ? parseInt(parts1[0], 10) : 0;
494
+ tizenVersion = majorVersion;
495
+ }
496
+ isLegacyTV = tizenVersion !== void 0 && tizenVersion < 3;
497
+ } else if (/SMART-TV|SmartTV/i.test(ua)) {
498
+ name = "Smart TV";
499
+ isSmartTV = true;
500
+ isLegacyTV = chromeVersion > 0 && chromeVersion < 53;
501
+ } else if (/NetCast/i.test(ua)) {
502
+ name = "LG NetCast";
503
+ isSmartTV = true;
504
+ isLegacyTV = true;
505
+ } else if (/BRAVIA/i.test(ua)) {
506
+ name = "Sony BRAVIA";
507
+ isSmartTV = true;
508
+ isLegacyTV = chromeVersion > 0 && chromeVersion < 53;
509
+ } else {
510
+ if (chromeVersion > 0) {
511
+ name = "Chrome";
512
+ version = chromeVersion.toString();
513
+ majorVersion = chromeVersion;
514
+ if (chromeVersion < 50) {
515
+ supportsModernJS = false;
516
+ }
517
+ }
518
+ if (webkitVersion > 0 && webkitVersion < 600) {
519
+ supportsModernJS = false;
520
+ }
521
+ }
522
+ if (typeof Promise === "undefined" || typeof Map === "undefined" || typeof Set === "undefined") {
523
+ supportsModernJS = false;
524
+ }
525
+ if (typeof URLSearchParams === "undefined") {
526
+ supportsModernJS = false;
527
+ }
528
+ return {
529
+ name: name,
530
+ version: version,
531
+ majorVersion: majorVersion,
532
+ isSmartTV: isSmartTV,
533
+ isLegacyTV: isLegacyTV,
534
+ platform: platform,
535
+ supportsModernJS: supportsModernJS,
536
+ webOSVersion: webOSVersion,
537
+ tizenVersion: tizenVersion,
538
+ chromeVersion: chromeVersionNum
539
+ };
540
+ }
541
+ function requiresMediaPipelineResetAfterAds() {
542
+ var _browser_tizenVersion;
543
+ var browser = detectBrowser();
544
+ return browser.name === "Samsung Tizen" && ((_browser_tizenVersion = browser.tizenVersion) !== null && _browser_tizenVersion !== void 0 ? _browser_tizenVersion : 0) >= 5;
545
+ }
546
+ function getBrowserConfigOverrides() {
547
+ var browser = detectBrowser();
548
+ var overrides = {};
549
+ if (browser.isSmartTV) {
550
+ overrides.allowNativeHls = true;
551
+ overrides.pauseContentDuringAds = true;
552
+ }
553
+ return overrides;
554
+ }
555
+ function logBrowserInfo() {
556
+ var debug = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
557
+ if (!debug) return;
558
+ var browser = detectBrowser();
559
+ console.log("[StormcloudVideoPlayer] Browser Compatibility Info:", _object_spread_props(_object_spread({
560
+ browser: "".concat(browser.name, " ").concat(browser.version),
561
+ platform: browser.platform,
562
+ isSmartTV: browser.isSmartTV,
563
+ isLegacyTV: browser.isLegacyTV,
564
+ supportsModernJS: browser.supportsModernJS
565
+ }, browser.webOSVersion !== void 0 ? {
566
+ webOSVersion: browser.webOSVersion
567
+ } : {}, browser.tizenVersion !== void 0 ? {
568
+ tizenVersion: browser.tizenVersion
569
+ } : {}, browser.chromeVersion !== void 0 ? {
570
+ chromeVersion: browser.chromeVersion
571
+ } : {}), {
572
+ userAgent: navigator.userAgent
573
+ }));
574
+ }
575
+ // src/sdk/hlsAdPlayer.ts
403
576
  var MAX_VAST_WRAPPER_DEPTH = 5;
404
577
  function createHlsAdPlayer(contentVideo, options) {
405
578
  var _contentVideo_AD_VIDEO_PROP, _contentVideo_AD_CONTAINER_PROP;
@@ -432,6 +605,7 @@ function createHlsAdPlayer(contentVideo, options) {
432
605
  var lastAdProgressPosition = 0;
433
606
  var sawDecodedVideoFrame = false;
434
607
  var videoFrameCallbackHandle;
608
+ var pendingPlayPromise;
435
609
  var trackingFired = {
436
610
  impression: false,
437
611
  start: false,
@@ -1235,6 +1409,60 @@ function createHlsAdPlayer(contentVideo, options) {
1235
1409
  complete: false
1236
1410
  };
1237
1411
  }
1412
+ function isRvfcSupported(video) {
1413
+ return typeof video.requestVideoFrameCallback === "function";
1414
+ }
1415
+ function settlePendingPlay() {
1416
+ pendingPlayPromise = void 0;
1417
+ }
1418
+ function startAdPlayback(context) {
1419
+ if (!adVideoElement) return;
1420
+ var playPromise = adVideoElement.play();
1421
+ pendingPlayPromise = playPromise;
1422
+ playPromise.catch(function(error) {
1423
+ if (pendingPlayPromise !== playPromise) {
1424
+ return;
1425
+ }
1426
+ console.error("[HlsAdPlayer] Error starting ".concat(context, ":"), error);
1427
+ handleAdError();
1428
+ }).finally(function() {
1429
+ if (pendingPlayPromise === playPromise) {
1430
+ pendingPlayPromise = void 0;
1431
+ }
1432
+ });
1433
+ }
1434
+ function prepareVideoElementForNewSource() {
1435
+ settlePendingPlay();
1436
+ if (adHls) {
1437
+ adHls.destroy();
1438
+ adHls = void 0;
1439
+ }
1440
+ if (!adVideoElement) return;
1441
+ try {
1442
+ adVideoElement.pause();
1443
+ adVideoElement.removeAttribute("src");
1444
+ adVideoElement.load();
1445
+ } catch (error) {
1446
+ console.warn("[HlsAdPlayer] Error preparing ad video for new source:", error);
1447
+ }
1448
+ }
1449
+ function recreateAdVideoElement() {
1450
+ console.log("[HlsAdPlayer] Recreating ad video element (single-decoder platform)");
1451
+ teardownAdEventListeners();
1452
+ prepareVideoElementForNewSource();
1453
+ if (adVideoElement) {
1454
+ try {
1455
+ adVideoElement.remove();
1456
+ } catch (error) {
1457
+ console.warn("[HlsAdPlayer] Error removing ad video element:", error);
1458
+ }
1459
+ }
1460
+ adVideoElement = createAdVideoElement();
1461
+ adContainerEl === null || adContainerEl === void 0 ? void 0 : adContainerEl.appendChild(adVideoElement);
1462
+ contentVideo[AD_VIDEO_PROP] = adVideoElement;
1463
+ adVideoElement.volume = Math.max(0, Math.min(1, originalVolume));
1464
+ adVideoElement.muted = originalMutedState;
1465
+ }
1238
1466
  function loadCurrentAdMedia() {
1239
1467
  if (!adVideoElement || !currentAd) {
1240
1468
  throw new Error("No ad video element or ad to load");
@@ -1257,10 +1485,7 @@ function createHlsAdPlayer(contentVideo, options) {
1257
1485
  adHls.attachMedia(adVideoElement);
1258
1486
  adHls.on(import_hls.default.Events.MANIFEST_PARSED, function() {
1259
1487
  console.log("[HlsAdPlayer] HLS manifest parsed, starting playback");
1260
- adVideoElement.play().catch(function(error) {
1261
- console.error("[HlsAdPlayer] Error starting ad playback:", error);
1262
- handleAdError();
1263
- });
1488
+ startAdPlayback("HLS ad playback");
1264
1489
  });
1265
1490
  adHls.on(import_hls.default.Events.ERROR, function(_event, data) {
1266
1491
  console.error("[HlsAdPlayer] HLS error:", data);
@@ -1270,10 +1495,7 @@ function createHlsAdPlayer(contentVideo, options) {
1270
1495
  });
1271
1496
  } else if (isHlsAd && adVideoElement.canPlayType("application/vnd.apple.mpegurl")) {
1272
1497
  adVideoElement.src = mediaFile.url;
1273
- adVideoElement.play().catch(function(error) {
1274
- console.error("[HlsAdPlayer] Error starting ad playback:", error);
1275
- handleAdError();
1276
- });
1498
+ startAdPlayback("native HLS ad playback");
1277
1499
  } else if (!isHlsAd && isProgressiveMediaFile(mediaFile)) {
1278
1500
  if (adHls) {
1279
1501
  adHls.destroy();
@@ -1281,10 +1503,7 @@ function createHlsAdPlayer(contentVideo, options) {
1281
1503
  }
1282
1504
  adVideoElement.src = mediaFile.url;
1283
1505
  adVideoElement.load();
1284
- adVideoElement.play().catch(function(error) {
1285
- console.error("[HlsAdPlayer] Error starting progressive ad playback:", error);
1286
- handleAdError();
1287
- });
1506
+ startAdPlayback("progressive ad playback");
1288
1507
  } else {
1289
1508
  throw new Error("Unsupported ad media file type: ".concat(mediaFile.type));
1290
1509
  }
@@ -1301,6 +1520,13 @@ function createHlsAdPlayer(contentVideo, options) {
1301
1520
  trackingFired.impression = true;
1302
1521
  console.log("[HlsAdPlayer] Advancing to next pod ad (".concat(podIndex + 1, "/").concat(podAds.length, "): ").concat(currentAd.title, ", duration: ").concat(currentAd.duration, "s"));
1303
1522
  }
1523
+ clearStallWatchdog();
1524
+ if (requiresMediaPipelineResetAfterAds()) {
1525
+ recreateAdVideoElement();
1526
+ setupAdEventListeners();
1527
+ } else {
1528
+ prepareVideoElementForNewSource();
1529
+ }
1304
1530
  try {
1305
1531
  loadCurrentAdMedia();
1306
1532
  emit("pod_ad_started", {
@@ -1412,9 +1638,16 @@ function createHlsAdPlayer(contentVideo, options) {
1412
1638
  if (decodedFrames !== void 0 && decodedFrames > 0) {
1413
1639
  sawDecodedVideoFrame = true;
1414
1640
  markFrameCounterReliable();
1415
- } else if (decodedFrames === 0 && adVideoElement.currentTime >= BLACKFRAME_MIN_PLAYBACK_S && isFrameCounterReliable()) {
1416
- handleVideoDecodeFailure();
1417
- return;
1641
+ } else if (adVideoElement.currentTime >= BLACKFRAME_MIN_PLAYBACK_S) {
1642
+ var timeAdvancing = adVideoElement.currentTime > lastAdProgressPosition + 0.05;
1643
+ if (isRvfcSupported(adVideoElement) && timeAdvancing) {
1644
+ handleVideoDecodeFailure();
1645
+ return;
1646
+ }
1647
+ if (decodedFrames === 0 && timeAdvancing && isFrameCounterReliable()) {
1648
+ handleVideoDecodeFailure();
1649
+ return;
1650
+ }
1418
1651
  }
1419
1652
  }
1420
1653
  if (adVideoElement.currentTime > lastAdProgressPosition + 0.05) {
@@ -1431,19 +1664,7 @@ function createHlsAdPlayer(contentVideo, options) {
1431
1664
  }, STALL_CHECK_INTERVAL_MS);
1432
1665
  }
1433
1666
  function releaseAdDecoder() {
1434
- if (adHls) {
1435
- adHls.destroy();
1436
- adHls = void 0;
1437
- }
1438
- if (adVideoElement) {
1439
- try {
1440
- adVideoElement.pause();
1441
- adVideoElement.removeAttribute("src");
1442
- adVideoElement.load();
1443
- } catch (error) {
1444
- console.warn("[HlsAdPlayer] Error releasing ad decoder:", error);
1445
- }
1446
- }
1667
+ prepareVideoElementForNewSource();
1447
1668
  if (adContainerEl) {
1448
1669
  adContainerEl.style.display = "none";
1449
1670
  adContainerEl.style.pointerEvents = "none";
@@ -4014,178 +4235,6 @@ function fetchConsentSignals() {
4014
4235
  return signals;
4015
4236
  });
4016
4237
  }
4017
- // src/utils/browserCompat.ts
4018
- function getChromeVersion(ua) {
4019
- var match = ua.match(/Chrome\/(\d+)/);
4020
- return match && match[1] ? parseInt(match[1], 10) : 0;
4021
- }
4022
- function getWebKitVersion(ua) {
4023
- var match = ua.match(/AppleWebKit\/(\d+)/);
4024
- return match && match[1] ? parseInt(match[1], 10) : 0;
4025
- }
4026
- function getPlatform() {
4027
- var _navigator_userAgentData;
4028
- if ("userAgentData" in navigator && ((_navigator_userAgentData = navigator.userAgentData) === null || _navigator_userAgentData === void 0 ? void 0 : _navigator_userAgentData.platform)) {
4029
- return navigator.userAgentData.platform;
4030
- }
4031
- var ua = navigator.userAgent;
4032
- if (/Mac|iPhone|iPad|iPod/i.test(ua)) {
4033
- return /iPhone|iPad|iPod/i.test(ua) ? "iPhone" : "MacIntel";
4034
- }
4035
- if (/Win/i.test(ua)) {
4036
- return "Win32";
4037
- }
4038
- if (/Linux/i.test(ua)) {
4039
- return /Android/i.test(ua) ? "Linux armv8l" : "Linux x86_64";
4040
- }
4041
- if (/CrOS/i.test(ua)) {
4042
- return "CrOS";
4043
- }
4044
- return navigator.platform || "Unknown";
4045
- }
4046
- function detectBrowser() {
4047
- var ua = navigator.userAgent;
4048
- var platform = getPlatform();
4049
- var name = "Unknown";
4050
- var version = "0";
4051
- var majorVersion = 0;
4052
- var isSmartTV = false;
4053
- var isLegacyTV = false;
4054
- var supportsModernJS = true;
4055
- var webOSVersion;
4056
- var tizenVersion;
4057
- var chromeVersionNum;
4058
- var chromeVersion = getChromeVersion(ua);
4059
- var webkitVersion = getWebKitVersion(ua);
4060
- chromeVersionNum = chromeVersion > 0 ? chromeVersion : void 0;
4061
- if (/Web0S|webOS|LG Browser|LGSTB/i.test(ua)) {
4062
- name = "LG WebOS";
4063
- isSmartTV = true;
4064
- var match = ua.match(/Web0S[/\s]*([\d.]+)/i) || ua.match(/webOS[/\s]*([\d.]+)/i);
4065
- if (!match || !match[1]) {
4066
- match = ua.match(/webOSTV[/\s-]*([\d.]+)/i) || ua.match(/webOS\.TV[/\s-]*([\d.]+)/i);
4067
- }
4068
- if (match && match[1]) {
4069
- version = match[1];
4070
- var parts = version.split(".");
4071
- majorVersion = parts[0] ? parseInt(parts[0], 10) : 0;
4072
- webOSVersion = majorVersion;
4073
- } else if (chromeVersion > 0) {
4074
- if (chromeVersion >= 79) {
4075
- webOSVersion = 6;
4076
- version = "6.0";
4077
- majorVersion = 6;
4078
- } else if (chromeVersion >= 68) {
4079
- webOSVersion = 5;
4080
- version = "5.0";
4081
- majorVersion = 5;
4082
- } else if (chromeVersion >= 53) {
4083
- webOSVersion = 4;
4084
- version = "4.0";
4085
- majorVersion = 4;
4086
- } else if (chromeVersion >= 38) {
4087
- webOSVersion = 3;
4088
- version = "3.0";
4089
- majorVersion = 3;
4090
- } else {
4091
- webOSVersion = 2;
4092
- version = "2.0";
4093
- majorVersion = 2;
4094
- }
4095
- } else {
4096
- version = "Unknown";
4097
- webOSVersion = void 0;
4098
- }
4099
- isLegacyTV = webOSVersion !== void 0 && webOSVersion < 3;
4100
- } else if (/Tizen/i.test(ua)) {
4101
- name = "Samsung Tizen";
4102
- isSmartTV = true;
4103
- var match1 = ua.match(/Tizen[/\s]*([\d.]+)/i);
4104
- version = match1 && match1[1] ? match1[1] : "Unknown";
4105
- if (version !== "Unknown") {
4106
- var parts1 = version.split(".");
4107
- majorVersion = parts1[0] ? parseInt(parts1[0], 10) : 0;
4108
- tizenVersion = majorVersion;
4109
- }
4110
- isLegacyTV = tizenVersion !== void 0 && tizenVersion < 3;
4111
- } else if (/SMART-TV|SmartTV/i.test(ua)) {
4112
- name = "Smart TV";
4113
- isSmartTV = true;
4114
- isLegacyTV = chromeVersion > 0 && chromeVersion < 53;
4115
- } else if (/NetCast/i.test(ua)) {
4116
- name = "LG NetCast";
4117
- isSmartTV = true;
4118
- isLegacyTV = true;
4119
- } else if (/BRAVIA/i.test(ua)) {
4120
- name = "Sony BRAVIA";
4121
- isSmartTV = true;
4122
- isLegacyTV = chromeVersion > 0 && chromeVersion < 53;
4123
- } else {
4124
- if (chromeVersion > 0) {
4125
- name = "Chrome";
4126
- version = chromeVersion.toString();
4127
- majorVersion = chromeVersion;
4128
- if (chromeVersion < 50) {
4129
- supportsModernJS = false;
4130
- }
4131
- }
4132
- if (webkitVersion > 0 && webkitVersion < 600) {
4133
- supportsModernJS = false;
4134
- }
4135
- }
4136
- if (typeof Promise === "undefined" || typeof Map === "undefined" || typeof Set === "undefined") {
4137
- supportsModernJS = false;
4138
- }
4139
- if (typeof URLSearchParams === "undefined") {
4140
- supportsModernJS = false;
4141
- }
4142
- return {
4143
- name: name,
4144
- version: version,
4145
- majorVersion: majorVersion,
4146
- isSmartTV: isSmartTV,
4147
- isLegacyTV: isLegacyTV,
4148
- platform: platform,
4149
- supportsModernJS: supportsModernJS,
4150
- webOSVersion: webOSVersion,
4151
- tizenVersion: tizenVersion,
4152
- chromeVersion: chromeVersionNum
4153
- };
4154
- }
4155
- function requiresMediaPipelineResetAfterAds() {
4156
- var _browser_tizenVersion;
4157
- var browser = detectBrowser();
4158
- return browser.name === "Samsung Tizen" && ((_browser_tizenVersion = browser.tizenVersion) !== null && _browser_tizenVersion !== void 0 ? _browser_tizenVersion : 0) >= 5;
4159
- }
4160
- function getBrowserConfigOverrides() {
4161
- var browser = detectBrowser();
4162
- var overrides = {};
4163
- if (browser.isSmartTV) {
4164
- overrides.allowNativeHls = true;
4165
- overrides.pauseContentDuringAds = true;
4166
- }
4167
- return overrides;
4168
- }
4169
- function logBrowserInfo() {
4170
- var debug = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
4171
- if (!debug) return;
4172
- var browser = detectBrowser();
4173
- console.log("[StormcloudVideoPlayer] Browser Compatibility Info:", _object_spread_props(_object_spread({
4174
- browser: "".concat(browser.name, " ").concat(browser.version),
4175
- platform: browser.platform,
4176
- isSmartTV: browser.isSmartTV,
4177
- isLegacyTV: browser.isLegacyTV,
4178
- supportsModernJS: browser.supportsModernJS
4179
- }, browser.webOSVersion !== void 0 ? {
4180
- webOSVersion: browser.webOSVersion
4181
- } : {}, browser.tizenVersion !== void 0 ? {
4182
- tizenVersion: browser.tizenVersion
4183
- } : {}, browser.chromeVersion !== void 0 ? {
4184
- chromeVersion: browser.chromeVersion
4185
- } : {}), {
4186
- userAgent: navigator.userAgent
4187
- }));
4188
- }
4189
4238
  // src/player/Scte35Parser.ts
4190
4239
  function parseCueOutDuration(value) {
4191
4240
  var num = parseFloat(value.trim());