@xiping/react-components 1.0.43 → 1.0.49

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.
Files changed (255) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +1 -0
  2. package/dist/cjs/_virtual/delegate.js +1 -0
  3. package/dist/cjs/_virtual/download.js +1 -0
  4. package/dist/cjs/_virtual/download2.js +1 -0
  5. package/dist/cjs/_virtual/index.js +1 -0
  6. package/dist/cjs/_virtual/index2.js +1 -0
  7. package/dist/cjs/components/shimmer-button/ShimmerButton.js +1 -1
  8. package/dist/cjs/components/shiny-button/ShinyButton.js +1 -1
  9. package/dist/cjs/components/sparkles-text/SparklesText.js +1 -1
  10. package/dist/cjs/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
  11. package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +3 -0
  12. package/dist/cjs/components/subtitle-player/index.d.ts +2 -0
  13. package/dist/cjs/components/txt-editor/TxtEditor.d.ts +5 -4
  14. package/dist/cjs/components/txt-editor/TxtEditor.js +32 -1
  15. package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
  16. package/dist/cjs/components/txt-reader/index.module.css.js +1 -1
  17. package/dist/cjs/components/variable-proximity/index.d.ts +10 -0
  18. package/dist/cjs/components/variable-proximity/index.js +1 -1
  19. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
  20. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -0
  21. package/dist/cjs/components/video-subtitle-player/index.d.ts +3 -0
  22. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
  23. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -0
  24. package/dist/cjs/index.d.ts +2 -1
  25. package/dist/cjs/index.js +1 -1
  26. package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +1 -0
  27. package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +1 -0
  28. package/dist/cjs/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +3 -0
  29. package/dist/cjs/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +1 -0
  30. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +2 -0
  31. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +1 -0
  32. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +1 -0
  33. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +1 -0
  34. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +1 -0
  35. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +1 -0
  36. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +1 -0
  37. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +1 -0
  38. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +1 -0
  39. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +1 -0
  40. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +1 -0
  41. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1 -0
  42. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +1 -0
  43. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +1 -0
  44. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +1 -0
  45. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +1 -0
  46. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +1 -0
  47. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +1 -0
  48. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +5 -0
  49. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +15 -0
  50. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +4 -0
  51. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +4 -0
  52. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +4 -0
  53. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +4 -0
  54. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +5 -0
  55. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +8 -0
  56. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +4 -0
  57. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +4 -0
  58. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +4 -0
  59. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +4 -0
  60. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +4 -0
  61. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +12 -0
  62. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +7 -0
  63. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +5 -0
  64. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +5 -0
  65. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +5 -0
  66. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +1 -0
  67. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +3 -0
  68. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +1 -0
  69. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +4 -0
  70. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +1 -0
  71. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +9 -0
  72. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +5 -0
  73. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +1 -0
  74. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +5 -0
  75. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +2 -0
  76. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +1 -0
  77. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +6 -0
  78. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +1 -0
  79. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +2 -0
  80. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +5 -0
  81. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +1 -0
  82. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +1 -0
  83. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +4 -0
  84. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +1 -0
  85. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +13 -0
  86. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +4 -0
  87. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +19 -0
  88. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +1 -0
  89. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +1 -0
  90. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +8 -0
  91. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +5 -0
  92. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +7 -0
  93. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +1 -0
  94. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +2 -0
  95. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +7 -0
  96. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +1 -0
  97. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +4 -0
  98. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +1 -0
  99. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +11 -0
  100. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +3 -0
  101. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +3 -0
  102. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +6 -0
  103. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +6 -0
  104. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +4 -0
  105. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +1 -0
  106. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +1 -0
  107. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +6 -0
  108. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +1 -0
  109. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +11 -0
  110. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +1 -0
  111. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +1 -0
  112. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +1 -0
  113. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +1 -0
  114. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +1 -0
  115. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +1 -0
  116. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +1 -0
  117. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +1 -0
  118. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +1 -0
  119. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +1 -0
  120. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +1 -0
  121. package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +1 -0
  122. package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +1 -0
  123. package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -0
  124. package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -0
  125. package/dist/cjs/react-components.css +1 -1
  126. package/dist/es/_virtual/_commonjsHelpers.js +6 -0
  127. package/dist/es/_virtual/delegate.js +7 -0
  128. package/dist/es/_virtual/download.js +7 -0
  129. package/dist/es/_virtual/download2.js +4 -0
  130. package/dist/es/_virtual/index.js +8 -0
  131. package/dist/es/_virtual/index2.js +4 -0
  132. package/dist/es/components/shimmer-button/ShimmerButton.js +29 -62
  133. package/dist/es/components/shiny-button/ShinyButton.js +15 -17
  134. package/dist/es/components/sparkles-text/SparklesText.js +30 -29
  135. package/dist/es/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
  136. package/dist/es/components/subtitle-player/SubtitlePlayer.js +301 -0
  137. package/dist/es/components/subtitle-player/index.d.ts +2 -0
  138. package/dist/es/components/txt-editor/TxtEditor.d.ts +5 -4
  139. package/dist/es/components/txt-editor/TxtEditor.js +105 -43
  140. package/dist/es/components/txt-reader/TxtReader.js +48 -55
  141. package/dist/es/components/txt-reader/index.module.css.js +6 -2
  142. package/dist/es/components/variable-proximity/index.d.ts +10 -0
  143. package/dist/es/components/variable-proximity/index.js +166 -94
  144. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
  145. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +125 -0
  146. package/dist/es/components/video-subtitle-player/index.d.ts +3 -0
  147. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
  148. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +57 -0
  149. package/dist/es/index.d.ts +2 -1
  150. package/dist/es/index.js +60 -56
  151. package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +21 -0
  152. package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +29 -0
  153. package/dist/es/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +77 -0
  154. package/dist/es/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +111 -0
  155. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +197 -0
  156. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +7 -0
  157. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +87 -0
  158. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +64 -0
  159. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +67 -0
  160. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +45 -0
  161. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +101 -0
  162. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +79 -0
  163. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +75 -0
  164. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +79 -0
  165. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +466 -0
  166. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1240 -0
  167. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +207 -0
  168. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +130 -0
  169. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +366 -0
  170. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +204 -0
  171. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +14 -0
  172. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +81 -0
  173. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +10 -0
  174. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +20 -0
  175. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +9 -0
  176. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +9 -0
  177. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +9 -0
  178. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +9 -0
  179. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +10 -0
  180. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +13 -0
  181. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +9 -0
  182. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +9 -0
  183. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +9 -0
  184. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +9 -0
  185. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +9 -0
  186. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +17 -0
  187. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +12 -0
  188. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +10 -0
  189. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +10 -0
  190. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +10 -0
  191. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +35 -0
  192. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +12 -0
  193. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +79 -0
  194. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +193 -0
  195. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +141 -0
  196. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +171 -0
  197. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +105 -0
  198. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +110 -0
  199. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +83 -0
  200. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +232 -0
  201. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +42 -0
  202. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +68 -0
  203. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +116 -0
  204. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +68 -0
  205. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +150 -0
  206. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +96 -0
  207. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +299 -0
  208. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +46 -0
  209. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +171 -0
  210. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +169 -0
  211. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +55 -0
  212. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +448 -0
  213. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +138 -0
  214. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +122 -0
  215. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +216 -0
  216. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +102 -0
  217. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +78 -0
  218. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +100 -0
  219. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +119 -0
  220. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +431 -0
  221. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +215 -0
  222. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +93 -0
  223. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +175 -0
  224. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +292 -0
  225. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +86 -0
  226. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +92 -0
  227. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +106 -0
  228. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +134 -0
  229. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +222 -0
  230. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +152 -0
  231. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +134 -0
  232. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +164 -0
  233. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +146 -0
  234. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +206 -0
  235. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +53 -0
  236. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +61 -0
  237. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +13 -0
  238. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +34 -0
  239. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +83 -0
  240. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +34 -0
  241. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +271 -0
  242. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +111 -0
  243. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +517 -0
  244. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +25 -0
  245. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +4 -0
  246. package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +19 -0
  247. package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +14 -0
  248. package/dist/es/packages/subtitle/lib/src/json-converter.js +27 -0
  249. package/dist/es/packages/subtitle/lib/src/parser.js +56 -0
  250. package/dist/es/react-components.css +1 -1
  251. package/package.json +23 -21
  252. package/dist/cjs/components/qr-code/index.d.ts +0 -103
  253. package/dist/cjs/components/qr-code/index.js +0 -1
  254. package/dist/es/components/qr-code/index.d.ts +0 -103
  255. package/dist/es/components/qr-code/index.js +0 -49
@@ -0,0 +1,1240 @@
1
+ import { defineProperty as b, inherits as he, createSuper as de, classCallCheck as ge, assertThisInitialized as A, possibleConstructorReturn as ve, createClass as me, get as R, getPrototypeOf as L, objectSpread2 as U } from "./_virtual/_rollupPluginBabelHelpers.js";
2
+ import pe from "./mediaProxy.js";
3
+ import l, { checkIsCurrentVideo as ye } from "./utils/util.js";
4
+ import k from "./utils/sniffer.js";
5
+ import _e from "./utils/database.js";
6
+ import Ee from "./error.js";
7
+ import { CANPLAY as x, USER_ACTION as $, FULLSCREEN_CHANGE as D, READY as Te, ERROR as Pe, LOADED_DATA as j, PLAY as K, URL_NULL as Se, COMPLETE as Ce, AUTOPLAY_STARTED as B, AUTOPLAY_PREVENTED as Ae, SEEKED as G, DEFINITION_CHANGE as ke, AFTER_DEFINITION_CHANGE as X, RESET as Ne, DESTROY as Re, REPLAY as Le, CSS_FULLSCREEN_CHANGE as q, PLAYER_FOCUS as Fe, PLAYER_BLUR as Ie, DURATION_CHANGE as Oe, LOADING as De, PLAYNEXT as be, VIDEO_RESIZE as we } from "./events.js";
8
+ import * as Ze from "./events.js";
9
+ import { PLATER_ID as I, FULLSCREEN_EVENTS as Q, GET_FULLSCREEN_API as Z, EXIT_FULLSCREEN_API as J } from "./constant.js";
10
+ import { POSITIONS as W } from "./plugin/plugin.js";
11
+ import { default as vt } from "./plugin/plugin.js";
12
+ import ee from "./plugin/basePlugin.js";
13
+ import E from "./plugin/pluginsManager.js";
14
+ import n from "./stateClassMap.js";
15
+ import te from "./defaultConfig.js";
16
+ import { usePreset as Ue } from "./plugin/preset.js";
17
+ import xe, { runHooks as w, delHooksDescriptor as He, hook as ie, useHooks as se, removeHooks as re, usePluginHooks as ne, removePluginHooks as oe } from "./plugin/hooksDescriptor.js";
18
+ import Be from "./plugins/controls/index.js";
19
+ import S, { bindDebug as Ge } from "./utils/debug.js";
20
+ import H from "./lang/i18n.js";
21
+ import We from "./version.js";
22
+ import { STATES as g, STATE_ARRAY as ae } from "./state.js";
23
+ import { InstManager as ze, checkPlayerRoot as Ye } from "./instManager.js";
24
+ var Ve = ["play", "pause", "replay", "retry"], le = 0, ue = 0, F = null, z = /* @__PURE__ */ (function(ce) {
25
+ he(m, ce);
26
+ var fe = de(m);
27
+ function m(s) {
28
+ var e;
29
+ ge(this, m);
30
+ var t = l.deepMerge(te(), s);
31
+ e = fe.call(this, t), b(A(e), "canPlayFunc", function() {
32
+ if (e.config) {
33
+ var h = e.config, v = h.autoplay, p = h.defaultPlaybackRate;
34
+ S.logInfo("player", "canPlayFunc, startTime", e.__startTime), e._seekToStartTime(), e.playbackRate = p, (v || e._useAutoplay) && e.mediaPlay(), e.off(x, e.canPlayFunc), e.removeClass(n.ENTER);
35
+ }
36
+ }), b(A(e), "onFullscreenChange", function(h, v) {
37
+ var p = function() {
38
+ l.setTimeout(A(e), function() {
39
+ e.resize();
40
+ }, 100);
41
+ }, T = l.getFullScreenEl();
42
+ e._fullActionFrom ? e._fullActionFrom = "" : e.emit($, {
43
+ eventType: "system",
44
+ action: "switch_fullscreen",
45
+ pluginName: "player",
46
+ currentTime: e.currentTime,
47
+ duration: e.duration,
48
+ props: [{
49
+ prop: "fullscreen",
50
+ from: !0,
51
+ to: !1
52
+ }]
53
+ });
54
+ var C = ye(T, e.playerId, I);
55
+ if (v || T && (T === e._fullscreenEl || C))
56
+ p(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, T, n.FULLSCREEN), e.emit(D, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
57
+ else if (e.fullscreen) {
58
+ p();
59
+ var P = A(e), y = P._fullScreenOffset, _ = P.config;
60
+ if (_.needFullscreenScroll ? (window.scrollTo(y.left, y.top), l.setTimeout(A(e), function() {
61
+ e.fullscreen = !1, e._fullScreenOffset = null;
62
+ }, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
63
+ e.removeClass(n.FULLSCREEN);
64
+ else {
65
+ var N = e._fullscreenEl;
66
+ !N && (e.root.contains(h.target) || h.target === e.root) && (N = h.target), e.recoverFullStyle(e.root, N, n.FULLSCREEN);
67
+ }
68
+ e._fullscreenEl = null, e.emit(D, !1);
69
+ }
70
+ }), b(A(e), "_onWebkitbeginfullscreen", function(h) {
71
+ e._fullscreenEl = e.media, e.onFullscreenChange(h, !0);
72
+ }), b(A(e), "_onWebkitendfullscreen", function(h) {
73
+ e.onFullscreenChange(h, !1);
74
+ }), xe(A(e), Ve), e.config = t, e._pluginInfoId = l.generateSessionId(), Ge(A(e));
75
+ var i = e.constructor.defaultPreset;
76
+ if (e.config.presets.length) {
77
+ var r = e.config.presets.indexOf("default");
78
+ r >= 0 && i && (e.config.presets[r] = i);
79
+ } else i && e.config.presets.push(i);
80
+ e.userTimer = null, e.waitTimer = null, e.handleSource = !0, e._state = g.INITIAL, e.isAd = !1, e.isError = !1, e._hasStart = !1, e.isSeeking = !1, e.isCanplay = !1, e._useAutoplay = !1, e.__startTime = -1, e.rotateDeg = 0, e.isActive = !1, e.fullscreen = !1, e.cssfullscreen = !1, e.isRotateFullscreen = !1, e._fullscreenEl = null, e.timeSegments = [], e._cssfullscreenEl = null, e.curDefinition = null, e._orgCss = "", e._fullScreenOffset = null, e._videoHeight = 0, e._videoWidth = 0, e.videoPos = {
81
+ pi: 1,
82
+ scale: 0,
83
+ rotate: -1,
84
+ x: 0,
85
+ y: 0,
86
+ h: -1,
87
+ w: -1,
88
+ vy: 0,
89
+ vx: 0
90
+ }, e.sizeInfo = {
91
+ width: 0,
92
+ height: 0,
93
+ left: 0,
94
+ top: 0
95
+ }, e._accPlayed = {
96
+ t: 0,
97
+ acc: 0,
98
+ loopAcc: 0
99
+ }, e._offsetInfo = {
100
+ currentTime: -1,
101
+ duration: 0
102
+ }, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = H.init(e._pluginInfoId), k.os.isAndroid && k.osVersion > 0 && k.osVersion < 6 && (e.config.autoplay = !1), e.database = new _e(), e.isUserActive = !1, e._onceSeekCanplay = null, e._isPauseBeforeSeek = 0, e.innerStates = {
103
+ isActiveLocked: !1
104
+ }, e.instManager = F;
105
+ var o = e._initDOM();
106
+ if (!o)
107
+ return console.error(new Error("can't find the dom which id is ".concat(e.config.id, " or this.config.el does not exist"))), ve(e);
108
+ var a = e.config, f = a.definition, u = f === void 0 ? {} : f, c = a.url;
109
+ if (!c && u.list && u.list.length > 0) {
110
+ var d = u.list.find(function(h) {
111
+ return h.definition && h.definition === u.defaultDefinition;
112
+ });
113
+ d || (u.defaultDefinition = u.list[0].definition, d = u.list[0]), e.config.url = d.url, e.curDefinition = d;
114
+ }
115
+ return e._bindEvents(), e._registerPresets(), e._registerPlugins(), E.onPluginsReady(A(e)), e.getInitDefinition(), e.setState(g.READY), l.setTimeout(A(e), function() {
116
+ e.emit(Te);
117
+ }, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < g.ATTACHED) && e.start(), e;
118
+ }
119
+ return me(m, [{
120
+ key: "_initDOM",
121
+ value: function() {
122
+ var e, t = this;
123
+ if (this.root = this.config.id ? document.getElementById(this.config.id) : null, !this.root) {
124
+ var i = this.config.el;
125
+ if (i && i.nodeType === 1)
126
+ this.root = i;
127
+ else
128
+ return this.emit(Pe, new Ee("use", this.config.vid, {
129
+ line: 32,
130
+ handle: "Constructor",
131
+ msg: "container id can't be empty"
132
+ })), console.error("this.confg.id or this.config.el can't be empty"), !1;
133
+ }
134
+ var r = Ye(this.root);
135
+ if (r && (S.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"), r.destroy()), this.root.setAttribute(I, this.playerId), this.media.setAttribute(I, this.playerId), (e = F) === null || e === void 0 || e.add(this), E.init(this), this._initBaseDoms(), this.config.controls) {
136
+ var o = this.config.controls.root || null, a = E.register(this, Be, {
137
+ root: o
138
+ });
139
+ this.controls = a;
140
+ }
141
+ var f = this.config.isMobileSimulateMode === "mobile" ? "mobile" : k.device;
142
+ if (this.addClass("".concat(n.DEFAULT, " ").concat(n.INACTIVE, " xgplayer-").concat(f, " ").concat(this.config.controls ? "" : n.NO_CONTROLS)), this.config.autoplay ? this.addClass(n.ENTER) : this.addClass(n.NO_START), this.config.fluid) {
143
+ var u = this.config, c = u.width, d = u.height;
144
+ (typeof c != "number" || typeof d != "number") && (c = 600, d = 337.5);
145
+ var h = {
146
+ width: "100%",
147
+ height: "0",
148
+ "max-width": "100%",
149
+ "padding-top": "".concat(d * 100 / c, "%")
150
+ };
151
+ Object.keys(h).forEach(function(y) {
152
+ t.root.style[y] = h[y];
153
+ });
154
+ } else
155
+ ["width", "height"].forEach(function(y) {
156
+ t.config[y] && (typeof t.config[y] != "number" ? t.root.style[y] = t.config[y] : t.root.style[y] = "".concat(t.config[y], "px"));
157
+ });
158
+ var v = this.root.getBoundingClientRect(), p = v.width, T = v.height, C = v.left, P = v.top;
159
+ return this.sizeInfo.width = p, this.sizeInfo.height = T, this.sizeInfo.left = C, this.sizeInfo.top = P, !0;
160
+ }
161
+ }, {
162
+ key: "_initBaseDoms",
163
+ value: function() {
164
+ this.topBar = null, this.leftBar = null, this.rightBar = null, this.config.marginControls && (this.innerContainer = l.createDom("xg-video-container", "", {
165
+ "data-index": -1
166
+ }, "xg-video-container"), this.root.appendChild(this.innerContainer));
167
+ }
168
+ }, {
169
+ key: "_bindEvents",
170
+ value: function() {
171
+ var e = this;
172
+ ["focus", "blur"].forEach(function(t) {
173
+ e.on(t, e["on" + t.charAt(0).toUpperCase() + t.slice(1)]);
174
+ }), Q.forEach(function(t) {
175
+ document && document.addEventListener(t, e.onFullscreenChange);
176
+ }), k.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(j, this.resize), this.playFunc = function() {
177
+ e.config.closeFocusVideoFocus || e.media.focus();
178
+ }, this.once(K, this.playFunc);
179
+ }
180
+ }, {
181
+ key: "_unbindEvents",
182
+ value: function() {
183
+ var e = this;
184
+ this.root.removeEventListener("mousemove", this.mousemoveFunc), Q.forEach(function(t) {
185
+ document.removeEventListener(t, e.onFullscreenChange);
186
+ }), this.playFunc && this.off(K, this.playFunc), this.off(x, this.canPlayFunc), this.media.removeEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.removeEventListener("webkitendfullscreen", this._onWebkitendfullscreen);
187
+ }
188
+ }, {
189
+ key: "_clearUserTimer",
190
+ value: function() {
191
+ this.userTimer && (l.clearTimeout(this, this.userTimer), this.userTimer = null);
192
+ }
193
+ }, {
194
+ key: "_startInit",
195
+ value: function(e) {
196
+ var t = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
197
+ if (this.media && !((!e || e === "" || l.typeOf(e) === "Array" && e.length === 0) && (e = "", this.emit(Se), S.logWarn("config.url is null, please get url and run player._startInit(url)"), this.config.nullUrlStart))) {
198
+ l.isNotNull(i.playSessionId) && (this._playSessionId = i.playSessionId), this.handleSource && (this._detachSourceEvents(this.media), l.typeOf(e) === "Array" && e.length > 0 ? this._attachSourceEvents(this.media, e) : !this.media.src || this.media.src !== e ? this.media.src = e : e || this.media.removeAttribute("src")), l.typeOf(this.config.volume) === "Number" && (this.volume = this.config.volume);
199
+ var r = this.innerContainer ? this.innerContainer : this.root;
200
+ this.media instanceof window.Element && !r.contains(this.media) && r.insertBefore(this.media, r.firstChild);
201
+ var o = this.media.readyState;
202
+ S.logInfo("_startInit readyState", o), this.config.autoplay && (!l.isMSE(this.media) && this.load(), (k.os.isIpad || k.os.isPhone) && this.mediaPlay());
203
+ var a = this.config.startTime;
204
+ this.__startTime = a > 0 ? a : -1, this.config.startTime = 0, o >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(x, this.canPlayFunc), (!this.hasStart || this.state < g.ATTACHED) && E.afterInit(this), this.hasStart = !0, this.setState(g.ATTACHED), l.setTimeout(this, function() {
205
+ t.emit(Ce);
206
+ }, 0);
207
+ }
208
+ }
209
+ }, {
210
+ key: "_registerPlugins",
211
+ value: function() {
212
+ var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
213
+ this._loadingPlugins = [];
214
+ var i = this.config.ignores || [], r = this.config.plugins || [], o = this.config.i18n || [];
215
+ t && H.extend(o, this.__i18n);
216
+ var a = i.join("||").toLowerCase().split("||"), f = this.plugins;
217
+ r.forEach(function(u) {
218
+ try {
219
+ var c = u.plugin ? u.plugin.pluginName : u.pluginName;
220
+ if (c && a.indexOf(c.toLowerCase()) > -1)
221
+ return null;
222
+ if (!t && f[c.toLowerCase()])
223
+ return;
224
+ if (u.lazy && u.loader) {
225
+ var d = E.lazyRegister(e, u);
226
+ u.forceBeforeInit && (d.then(function() {
227
+ e._loadingPlugins.splice(e._loadingPlugins.indexOf(d), 1);
228
+ }).catch(function(h) {
229
+ S.logError("_registerPlugins:loadingPlugin", h), e._loadingPlugins.splice(e._loadingPlugins.indexOf(d), 1);
230
+ }), e._loadingPlugins.push(d));
231
+ return;
232
+ }
233
+ return e.registerPlugin(u);
234
+ } catch (h) {
235
+ S.logError("_registerPlugins:", h);
236
+ }
237
+ });
238
+ }
239
+ }, {
240
+ key: "_registerPresets",
241
+ value: function() {
242
+ var e = this;
243
+ this.config.presets.forEach(function(t) {
244
+ Ue(e, t);
245
+ });
246
+ }
247
+ }, {
248
+ key: "_getRootByPosition",
249
+ value: function(e) {
250
+ var t = null;
251
+ switch (e) {
252
+ case W.ROOT_RIGHT:
253
+ this.rightBar || (this.rightBar = l.createPositionBar("xg-right-bar", this.root)), t = this.rightBar;
254
+ break;
255
+ case W.ROOT_LEFT:
256
+ this.leftBar || (this.leftBar = l.createPositionBar("xg-left-bar", this.root)), t = this.leftBar;
257
+ break;
258
+ case W.ROOT_TOP:
259
+ this.topBar || (this.topBar = l.createPositionBar("xg-top-bar", this.root), this.config.topBarAutoHide && l.addClass(this.topBar, n.TOP_BAR_AUTOHIDE)), t = this.topBar;
260
+ break;
261
+ default:
262
+ t = this.innerContainer || this.root;
263
+ break;
264
+ }
265
+ return t;
266
+ }
267
+ }, {
268
+ key: "registerPlugin",
269
+ value: function(e, t) {
270
+ var i = E.formatPluginInfo(e, t), r = i.PLUFGIN, o = i.options, a = this.config.plugins, f = E.checkPluginIfExits(r.pluginName, a);
271
+ !f && a.push(r);
272
+ var u = E.getRootByConfig(r.pluginName, this.config);
273
+ u.root && (o.root = u.root), u.position && (o.position = u.position);
274
+ var c = o.position ? o.position : o.config && o.config.position || r.defaultConfig && r.defaultConfig.position;
275
+ if (!o.root && typeof c == "string" && c.indexOf("controls") > -1) {
276
+ var d;
277
+ return (d = this.controls) === null || d === void 0 ? void 0 : d.registerPlugin(r, o, r.pluginName);
278
+ }
279
+ return o.root || (o.root = this._getRootByPosition(c)), E.register(this, r, o);
280
+ }
281
+ }, {
282
+ key: "deregister",
283
+ value: function(e) {
284
+ typeof e == "string" ? E.unRegister(this, e) : e instanceof ee && E.unRegister(this, e.pluginName);
285
+ }
286
+ }, {
287
+ key: "unRegisterPlugin",
288
+ value: function(e) {
289
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
290
+ this.deregister(e), t && this.removePluginFromConfig(e);
291
+ }
292
+ }, {
293
+ key: "removePluginFromConfig",
294
+ value: function(e) {
295
+ var t;
296
+ if (typeof e == "string" ? t = e : e instanceof ee && (t = e.pluginName), !!t)
297
+ for (var i = this.config.plugins.length - 1; i > -1; i--) {
298
+ var r = this.config.plugins[i];
299
+ if (r.pluginName.toLowerCase() === t.toLowerCase()) {
300
+ this.config.plugins.splice(i, 1);
301
+ break;
302
+ }
303
+ }
304
+ }
305
+ }, {
306
+ key: "plugins",
307
+ get: function() {
308
+ return E.getPlugins(this);
309
+ }
310
+ }, {
311
+ key: "getPlugin",
312
+ value: function(e) {
313
+ var t = E.findPlugin(this, e);
314
+ return t && t.pluginName ? t : null;
315
+ }
316
+ }, {
317
+ key: "addClass",
318
+ value: function(e) {
319
+ this.root && (l.hasClass(this.root, e) || l.addClass(this.root, e));
320
+ }
321
+ }, {
322
+ key: "removeClass",
323
+ value: function(e) {
324
+ this.root && l.removeClass(this.root, e);
325
+ }
326
+ }, {
327
+ key: "hasClass",
328
+ value: function(e) {
329
+ if (this.root)
330
+ return l.hasClass(this.root, e);
331
+ }
332
+ }, {
333
+ key: "setAttribute",
334
+ value: function(e, t) {
335
+ this.root && this.root.setAttribute(e, t);
336
+ }
337
+ }, {
338
+ key: "removeAttribute",
339
+ value: function(e, t) {
340
+ this.root && this.root.removeAttribute(e, t);
341
+ }
342
+ }, {
343
+ key: "start",
344
+ value: function(e) {
345
+ var t = this;
346
+ if (!(this.state > g.ATTACHING)) {
347
+ var i = this._playSessionId;
348
+ return l.isNotNull(i) && (this._playSessionId = void 0), !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(g.ATTACHING), this._registerPlugins(!1), E.beforeInit(this).then(function() {
349
+ if (t.config) {
350
+ e || (e = t.url || t.config.url);
351
+ var r = t.preProcessUrl(e), o = t._startInit(r.url, {
352
+ playSessionId: i
353
+ });
354
+ return o;
355
+ }
356
+ }).catch(function(r) {
357
+ throw r.fileName = "player", r.lineNumber = "236", S.logError("start:beforeInit:", r), r;
358
+ });
359
+ }
360
+ }
361
+ }, {
362
+ key: "switchURL",
363
+ value: function(e, t) {
364
+ var i = this, r = e;
365
+ l.typeOf(e) === "Object" && (r = e.url), r = this.preProcessUrl(r).url;
366
+ var o = this.currentTime;
367
+ this.__startTime = o;
368
+ var a = this.paused && !this.isError;
369
+ return this.src = r, new Promise(function(f, u) {
370
+ var c = function(v) {
371
+ i.off("timeupdate", d), i.off("canplay", d), u(v);
372
+ }, d = function() {
373
+ i._seekToStartTime(), a && i.pause(), i.off("error", c), f(!0);
374
+ };
375
+ if (i.once("error", c), !r) {
376
+ i.errorHandler("error", {
377
+ code: 6,
378
+ message: "empty_src"
379
+ });
380
+ return;
381
+ }
382
+ k.os.isAndroid ? i.once("timeupdate", d) : i.once("canplay", d), i.play();
383
+ });
384
+ }
385
+ }, {
386
+ key: "videoPlay",
387
+ value: function() {
388
+ this.mediaPlay();
389
+ }
390
+ }, {
391
+ key: "mediaPlay",
392
+ value: function() {
393
+ var e = this;
394
+ if (!this.hasStart && this.state < g.ATTACHED) {
395
+ this.removeClass(n.NO_START), this.addClass(n.ENTER), this.start(), this._useAutoplay = !0;
396
+ return;
397
+ }
398
+ this.state < g.RUNNING && (this.removeClass(n.NO_START), !this.isCanplay && this.addClass(n.ENTER));
399
+ var t = R(L(m.prototype), "play", this).call(this);
400
+ return t !== void 0 && t && t.then ? t.then(function() {
401
+ e.removeClass(n.NOT_ALLOW_AUTOPLAY), e.addClass(n.PLAYING), e.state < g.RUNNING && (S.logInfo(">>>>playPromise.then"), e.setState(g.RUNNING), e.emit(B));
402
+ }).catch(function(i) {
403
+ if (S.logWarn(">>>>playPromise.catch", i.name), e.media && e.media.error) {
404
+ e.onError(), e.removeClass(n.ENTER);
405
+ return;
406
+ }
407
+ i.name === "NotAllowedError" && (e._errorTimer = l.setTimeout(e, function() {
408
+ e._errorTimer = null, e.emit(Ae), e.addClass(n.NOT_ALLOW_AUTOPLAY), e.removeClass(n.ENTER), e.pause(), e.setState(g.NOTALLOW);
409
+ }, 0));
410
+ }) : (S.logWarn("video.play not return promise"), this.state < g.RUNNING && (this.setState(g.RUNNING), this.removeClass(n.NOT_ALLOW_AUTOPLAY), this.removeClass(n.NO_START), this.removeClass(n.ENTER), this.addClass(n.PLAYING), this.emit(B))), t;
411
+ }
412
+ }, {
413
+ key: "mediaPause",
414
+ value: function() {
415
+ R(L(m.prototype), "pause", this).call(this);
416
+ }
417
+ }, {
418
+ key: "videoPause",
419
+ value: function() {
420
+ R(L(m.prototype), "pause", this).call(this);
421
+ }
422
+ }, {
423
+ key: "play",
424
+ value: function() {
425
+ var e = this;
426
+ return this.removeClass(n.PAUSED), w(this, "play", function() {
427
+ return e.mediaPlay();
428
+ });
429
+ }
430
+ }, {
431
+ key: "pause",
432
+ value: function() {
433
+ var e = this;
434
+ w(this, "pause", function() {
435
+ R(L(m.prototype), "pause", e).call(e);
436
+ });
437
+ }
438
+ }, {
439
+ key: "seek",
440
+ value: function(e, t) {
441
+ var i = this;
442
+ if (!(!this.media || Number.isNaN(Number(e)) || !this.hasStart)) {
443
+ var r = this.config, o = r.isSeekedPlay, a = r.seekedStatus, f = t || (o ? "play" : a);
444
+ e = e < 0 ? 0 : e > this.duration ? parseInt(this.duration, 10) : e, !this._isPauseBeforeSeek && (this._isPauseBeforeSeek = this.paused ? 2 : 1), this._onceSeekCanplay && this.off(G, this._onceSeekCanplay), this._onceSeekCanplay = function() {
445
+ switch (i.removeClass(n.ENTER), i.isSeeking = !1, f) {
446
+ case "play":
447
+ i.play();
448
+ break;
449
+ case "pause":
450
+ i.pause();
451
+ break;
452
+ default:
453
+ i._isPauseBeforeSeek > 1 || i.paused ? i.pause() : i.play();
454
+ }
455
+ i._isPauseBeforeSeek = 0, i._onceSeekCanplay = null;
456
+ }, this.once(G, this._onceSeekCanplay), this.state < g.RUNNING ? (this.removeClass(n.NO_START), this.currentTime = e, this.play()) : this.currentTime = e;
457
+ }
458
+ }
459
+ }, {
460
+ key: "getInitDefinition",
461
+ value: function() {
462
+ var e = this, t = this.config, i = t.definition, r = t.url;
463
+ !r && i && i.list && i.list.length > 0 && i.defaultDefinition && i.list.map(function(o) {
464
+ o.definition === i.defaultDefinition && (e.config.url = o.url, e.curDefinition = o);
465
+ });
466
+ }
467
+ }, {
468
+ key: "changeDefinition",
469
+ value: function(e, t) {
470
+ var i = this, r = this.config.definition;
471
+ if (Array.isArray(r?.list) && r.list.forEach(function(a) {
472
+ e?.definition === a.definition && (i.curDefinition = a);
473
+ }), e != null && e.bitrate && typeof e.bitrate != "number" && (e.bitrate = parseInt(e.bitrate, 10) || 0), this.emit(ke, {
474
+ from: t,
475
+ to: e
476
+ }), !this.hasStart) {
477
+ this.config.url = e.url;
478
+ return;
479
+ }
480
+ var o = this.switchURL(e.url, U({
481
+ seamless: r.seamless !== !1 && typeof MediaSource < "u" && typeof MediaSource.isTypeSupported == "function"
482
+ }, e));
483
+ o && o.then ? o.then(function() {
484
+ i.emit(X, {
485
+ from: t,
486
+ to: e
487
+ });
488
+ }) : this.emit(X, {
489
+ from: t,
490
+ to: e
491
+ });
492
+ }
493
+ }, {
494
+ key: "reload",
495
+ value: function() {
496
+ this.load(), this.reloadFunc = function() {
497
+ this.play();
498
+ }, this.once(j, this.reloadFunc);
499
+ }
500
+ }, {
501
+ key: "resetState",
502
+ value: function() {
503
+ var e = this, t = n.NOT_ALLOW_AUTOPLAY, i = n.PLAYING, r = n.NO_START, o = n.PAUSED, a = n.REPLAY, f = n.ENTER, u = n.ENDED, c = n.ERROR, d = n.LOADING, h = [t, i, r, o, a, f, u, c, d];
504
+ this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0, h.forEach(function(v) {
505
+ e.removeClass(v);
506
+ }), this.addClass(n.NO_START), this.emit(Ne);
507
+ }
508
+ }, {
509
+ key: "reset",
510
+ value: function() {
511
+ var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], i = arguments.length > 1 ? arguments[1] : void 0;
512
+ this.resetState();
513
+ var r = this.plugins;
514
+ if (r && (t.map(function(a) {
515
+ e.deregister(a);
516
+ }), i)) {
517
+ var o = te();
518
+ Object.keys(this.config).forEach(function(a) {
519
+ e.config[a] !== "undefined" && (a === "plugins" || a === "presets" || a === "el" || a === "id") && (e.config[a] = o[a]);
520
+ });
521
+ }
522
+ }
523
+ }, {
524
+ key: "destroy",
525
+ value: function() {
526
+ var e, t = this, i = this.innerContainer, r = this.root, o = this.media;
527
+ if (!(!r || !o)) {
528
+ if (this.hasStart = !1, this._useAutoplay = !1, r.removeAttribute(I), o.removeAttribute(I), this.updateAcc("destroy"), this._unbindEvents(), this._detachSourceEvents(this.media), l.clearAllTimers(this), this.emit(Re), (e = F) === null || e === void 0 || e.remove(this), E.destroy(this), He(this), R(L(m.prototype), "destroy", this).call(this), this.fullscreen && this._fullscreenEl === this.root && this.exitFullscreen(), i)
529
+ for (var a = i.children, f = 0; f < a.length; f++)
530
+ i.removeChild(a[f]);
531
+ !i && o instanceof window.Node && r.contains(o) && !this.config.remainMediaAfterDestroy && r.removeChild(o), ["topBar", "leftBar", "rightBar", "innerContainer"].map(function(c) {
532
+ t[c] && r.removeChild(t[c]), t[c] = null;
533
+ });
534
+ var u = r.className.split(" ");
535
+ u.length > 0 ? r.className = u.filter(function(c) {
536
+ return c.indexOf("xgplayer") < 0;
537
+ }).join(" ") : r.className = "", this.removeAttribute("data-xgfill"), ["isSeeking", "isCanplay", "isActive", "cssfullscreen", "fullscreen"].forEach(function(c) {
538
+ t[c] = !1;
539
+ });
540
+ }
541
+ }
542
+ }, {
543
+ key: "replay",
544
+ value: function() {
545
+ var e = this;
546
+ this.removeClass(n.ENDED), this.currentTime = 0, this.isSeeking = !1, w(this, "replay", function() {
547
+ e.once(G, function() {
548
+ var t = e.mediaPlay();
549
+ t && t.catch && t.catch(function(i) {
550
+ console.log(i);
551
+ });
552
+ }), e.emit(Le), e.onPlay();
553
+ });
554
+ }
555
+ }, {
556
+ key: "retry",
557
+ value: function() {
558
+ var e = this;
559
+ this.removeClass(n.ERROR), this.addClass(n.LOADING), w(this, "retry", function() {
560
+ var t = e.currentTime, i = e.config.url, r = l.isMSE(e.media) ? {
561
+ url: i
562
+ } : e.preProcessUrl(i);
563
+ e.src = r.url, !e.config.isLive && (e.currentTime = t), e.once(x, function() {
564
+ e.mediaPlay();
565
+ });
566
+ });
567
+ }
568
+ }, {
569
+ key: "changeFullStyle",
570
+ value: function(e, t, i, r) {
571
+ e && (r || (r = n.PARENT_FULLSCREEN), this._orgCss || (this._orgCss = l.filterStyleFromText(e)), l.addClass(e, i), t && t !== e && !this._orgPCss && (this._orgPCss = l.filterStyleFromText(t), l.addClass(t, r), t.setAttribute(I, this.playerId)));
572
+ }
573
+ }, {
574
+ key: "recoverFullStyle",
575
+ value: function(e, t, i, r) {
576
+ r || (r = n.PARENT_FULLSCREEN), this._orgCss && (l.setStyleFromCsstext(e, this._orgCss), this._orgCss = ""), l.removeClass(e, i), t && t !== e && this._orgPCss && (l.setStyleFromCsstext(t, this._orgPCss), this._orgPCss = "", l.removeClass(t, r), t.removeAttribute(I));
577
+ }
578
+ }, {
579
+ key: "getFullscreen",
580
+ value: function() {
581
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget, t = this.root, i = this.media;
582
+ (e === "video" || e === "media") && (e = this[e]), e || (e = t), this._fullScreenOffset = {
583
+ top: l.scrollTop(),
584
+ left: l.scrollLeft()
585
+ }, this._fullscreenEl = e, this._fullActionFrom = "get";
586
+ var r = l.getFullScreenEl();
587
+ if (r === this._fullscreenEl)
588
+ return this.onFullscreenChange(), Promise.resolve();
589
+ try {
590
+ for (var o = 0; o < Z.length; o++) {
591
+ var a = Z[o];
592
+ if (e[a]) {
593
+ var f = a === "webkitRequestFullscreen" ? e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT) : e[a]();
594
+ return f && f.then ? f : Promise.resolve();
595
+ }
596
+ }
597
+ return i.fullscreenEnabled || i.webkitSupportsFullscreen ? (i.webkitEnterFullscreen(), Promise.resolve()) : Promise.reject(new Error("call getFullscreen fail"));
598
+ } catch {
599
+ return Promise.reject(new Error("call getFullscreen fail"));
600
+ }
601
+ }
602
+ }, {
603
+ key: "exitFullscreen",
604
+ value: function(e) {
605
+ if (this.isRotateFullscreen && this.exitRotateFullscreen(), !(!this._fullscreenEl && !l.getFullScreenEl())) {
606
+ this.root;
607
+ var t = this.media;
608
+ this._fullActionFrom = "exit";
609
+ try {
610
+ for (var i = 0; i < J.length; i++) {
611
+ var r = J[i];
612
+ if (document[r]) {
613
+ var o = document[r]();
614
+ return o && o.then ? o : Promise.resolve();
615
+ }
616
+ }
617
+ return t && t.webkitSupportsFullscreen ? (t.webkitExitFullScreen(), Promise.resolve()) : Promise.reject(new Error("call exitFullscreen fail"));
618
+ } catch {
619
+ return Promise.reject(new Error("call exitFullscreen fail"));
620
+ }
621
+ }
622
+ }
623
+ }, {
624
+ key: "getCssFullscreen",
625
+ value: function() {
626
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
627
+ this.isRotateFullscreen ? this.exitRotateFullscreen() : this.fullscreen && this.exitFullscreen();
628
+ var t = e ? "".concat(n.INNER_FULLSCREEN, " ").concat(n.CSS_FULLSCREEN) : n.CSS_FULLSCREEN;
629
+ this.changeFullStyle(this.root, e, t);
630
+ var i = this.config.fullscreen, r = i === void 0 ? {} : i, o = r.useCssFullscreen === !0 || typeof r.useCssFullscreen == "function" && r.useCssFullscreen();
631
+ o && (this.fullscreen = !0, this.emit(D, !0)), this._cssfullscreenEl = e, this.cssfullscreen = !0, this.emit(q, !0);
632
+ }
633
+ }, {
634
+ key: "exitCssFullscreen",
635
+ value: function() {
636
+ var e = this._cssfullscreenEl ? "".concat(n.INNER_FULLSCREEN, " ").concat(n.CSS_FULLSCREEN) : n.CSS_FULLSCREEN;
637
+ if (!this.fullscreen)
638
+ this.recoverFullStyle(this.root, this._cssfullscreenEl, e);
639
+ else {
640
+ var t = this.config.fullscreen, i = t === void 0 ? {} : t, r = i.useCssFullscreen === !0 || typeof i.useCssFullscreen == "function" && i.useCssFullscreen();
641
+ r ? (this.recoverFullStyle(this.root, this._cssfullscreenEl, e), this.fullscreen = !1, this.emit(D, !1)) : this.removeClass(e);
642
+ }
643
+ this._cssfullscreenEl = null, this.cssfullscreen = !1, this.emit(q, !1);
644
+ }
645
+ }, {
646
+ key: "getRotateFullscreen",
647
+ value: function() {
648
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
649
+ this.cssfullscreen && this.exitCssFullscreen(e);
650
+ var t = e ? "".concat(n.INNER_FULLSCREEN, " ").concat(n.ROTATE_FULLSCREEN) : n.ROTATE_FULLSCREEN;
651
+ this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, t, n.PARENT_ROTATE_FULLSCREEN), this.isRotateFullscreen = !0, this.fullscreen = !0, this.setRotateDeg(90), this._rootStyle = this.root.getAttribute("style");
652
+ var i = Math.abs(window.orientation) === 90 || Math.abs(screen.orientation.angle) === 90;
653
+ this.root.style.width = i ? "".concat(window.innerWidth, "px") : "".concat(window.innerHeight, "px"), this.emit(D, !0);
654
+ }
655
+ }, {
656
+ key: "exitRotateFullscreen",
657
+ value: function(e) {
658
+ var t = this._fullscreenEl !== this.root ? "".concat(n.INNER_FULLSCREEN, " ").concat(n.ROTATE_FULLSCREEN) : n.ROTATE_FULLSCREEN;
659
+ this.recoverFullStyle(this.root, this._fullscreenEl, t, n.PARENT_ROTATE_FULLSCREEN), this.isRotateFullscreen = !1, this.fullscreen = !1, this.setRotateDeg(0), this.emit(D, !1), this._rootStyle && (this.root.style.style = this._rootStyle, this._rootStyle = !1);
660
+ }
661
+ }, {
662
+ key: "setRotateDeg",
663
+ value: function(e) {
664
+ window.orientation === 90 || window.orientation === -90 ? this.rotateDeg = 0 : this.rotateDeg = e;
665
+ }
666
+ }, {
667
+ key: "focus",
668
+ value: function() {
669
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
670
+ autoHide: !this.config.closeDelayBlur,
671
+ delay: this.config.inactive
672
+ };
673
+ if (this.isActive) {
674
+ this.onFocus(e);
675
+ return;
676
+ }
677
+ this.emit(Fe, U({
678
+ paused: this.paused,
679
+ ended: this.ended
680
+ }, e));
681
+ }
682
+ }, {
683
+ key: "blur",
684
+ value: function() {
685
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
686
+ ignorePaused: !1
687
+ };
688
+ if (!this.isActive) {
689
+ this.onBlur(e);
690
+ return;
691
+ }
692
+ this._clearUserTimer(), this.emit(Ie, U({
693
+ paused: this.paused,
694
+ ended: this.ended
695
+ }, e));
696
+ }
697
+ }, {
698
+ key: "onFocus",
699
+ value: function() {
700
+ var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
701
+ autoHide: !0,
702
+ delay: 3e3
703
+ }, i = this.innerStates;
704
+ if (this.isActive = !0, this.removeClass(n.INACTIVE), this._clearUserTimer(), t.isLock !== void 0 && (i.isActiveLocked = t.isLock), t.autoHide === !1 || t.isLock === !0 || i.isActiveLocked) {
705
+ this._clearUserTimer();
706
+ return;
707
+ }
708
+ var r = t && t.delay ? t.delay : this.config.inactive;
709
+ this.userTimer = l.setTimeout(this, function() {
710
+ e.userTimer = null, e.blur();
711
+ }, r);
712
+ }
713
+ }, {
714
+ key: "onBlur",
715
+ value: function() {
716
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.ignorePaused, i = t === void 0 ? !1 : t;
717
+ if (!this.innerStates.isActiveLocked) {
718
+ var r = this.config.closePauseVideoFocus;
719
+ this.isActive = !1, (i || r || !this.paused && !this.ended) && this.addClass(n.INACTIVE);
720
+ }
721
+ }
722
+ }, {
723
+ key: "onEmptied",
724
+ value: function() {
725
+ this.updateAcc("emptied");
726
+ }
727
+ }, {
728
+ key: "onCanplay",
729
+ value: function() {
730
+ this.removeClass(n.ENTER), this.removeClass(n.ERROR), this.removeClass(n.LOADING), this.isCanplay = !0, this.waitTimer && l.clearTimeout(this, this.waitTimer);
731
+ }
732
+ }, {
733
+ key: "onLoadeddata",
734
+ value: function() {
735
+ var e = this;
736
+ this.isError = !1, this.isSeeking = !1, this.__startTime > 0 && (this.duration > 0 ? this._seekToStartTime() : this.once(Oe, function() {
737
+ e._seekToStartTime();
738
+ }));
739
+ }
740
+ }, {
741
+ key: "onLoadstart",
742
+ value: function() {
743
+ this.removeClass(n.ERROR), this.isCanplay = !1;
744
+ }
745
+ }, {
746
+ key: "onPlay",
747
+ value: function() {
748
+ this.state === g.ENDED && this.setState(g.RUNNING), this.removeClass(n.PAUSED), this.ended && this.removeClass(n.ENDED), !this.config.closePlayVideoFocus && this.focus();
749
+ }
750
+ }, {
751
+ key: "onPause",
752
+ value: function() {
753
+ this.addClass(n.PAUSED), this.updateAcc("pause"), this.config.closePauseVideoFocus || (this._clearUserTimer(), this.focus());
754
+ }
755
+ }, {
756
+ key: "onEnded",
757
+ value: function() {
758
+ this.updateAcc("ended"), this.addClass(n.ENDED), this.setState(g.ENDED);
759
+ }
760
+ }, {
761
+ key: "onError",
762
+ value: function() {
763
+ this.isError = !0, this.updateAcc("error"), this.removeClass(n.NOT_ALLOW_AUTOPLAY), this.removeClass(n.NO_START), this.removeClass(n.ENTER), this.removeClass(n.LOADING), this.addClass(n.ERROR);
764
+ }
765
+ }, {
766
+ key: "onSeeking",
767
+ value: function() {
768
+ this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(n.SEEKING);
769
+ }
770
+ }, {
771
+ key: "onSeeked",
772
+ value: function() {
773
+ this.isSeeking = !1, this.waitTimer && l.clearTimeout(this, this.waitTimer), this.removeClass(n.LOADING), this.removeClass(n.SEEKING);
774
+ }
775
+ }, {
776
+ key: "onWaiting",
777
+ value: function() {
778
+ var e = this;
779
+ this.waitTimer && l.clearTimeout(this, this.waitTimer), this.updateAcc("waiting"), this.waitTimer = l.setTimeout(this, function() {
780
+ e.addClass(n.LOADING), e.emit(De), l.clearTimeout(e, e.waitTimer), e.waitTimer = null;
781
+ }, this.config.minWaitDelay);
782
+ }
783
+ }, {
784
+ key: "onPlaying",
785
+ value: function() {
786
+ var e = this;
787
+ this.isError = !1;
788
+ var t = n.NO_START, i = n.PAUSED, r = n.ENDED, o = n.ERROR, a = n.REPLAY, f = n.LOADING, u = [t, i, r, o, a, f];
789
+ u.forEach(function(c) {
790
+ e.removeClass(c);
791
+ }), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
792
+ }
793
+ }, {
794
+ key: "onTimeupdate",
795
+ value: function() {
796
+ !this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(n.LOADING)) && this.media.readyState > 2 && (this.removeClass(n.LOADING), l.clearTimeout(this, this.waitTimer), this.waitTimer = null), !this.paused && this.state === g.NOTALLOW && this.duration && (this.setState(g.RUNNING), this.emit(B)), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
797
+ }
798
+ }, {
799
+ key: "onVolumechange",
800
+ value: function() {
801
+ l.typeOf(this.config.volume) === "Number" && (this.config.volume = this.volume);
802
+ }
803
+ }, {
804
+ key: "onRatechange",
805
+ value: function() {
806
+ this.config.defaultPlaybackRate = this.playbackRate;
807
+ }
808
+ }, {
809
+ key: "emitUserAction",
810
+ value: function(e, t, i) {
811
+ if (!(!this.media || !t || !e)) {
812
+ var r = l.typeOf(e) === "String" ? e : e.type || "";
813
+ i.props && l.typeOf(i.props) !== "Array" && (i.props = [i.props]), this.emit($, U({
814
+ eventType: r,
815
+ action: t,
816
+ currentTime: this.currentTime,
817
+ duration: this.duration,
818
+ ended: this.ended,
819
+ event: e
820
+ }, i));
821
+ }
822
+ }
823
+ }, {
824
+ key: "updateAcc",
825
+ value: function(e) {
826
+ if (this._accPlayed.t) {
827
+ var t = (/* @__PURE__ */ new Date()).getTime() - this._accPlayed.t;
828
+ this._accPlayed.acc += t, this._accPlayed.t = 0, (e === "ended" || this.ended) && (this._accPlayed.loopAcc = this._accPlayed.acc);
829
+ }
830
+ }
831
+ }, {
832
+ key: "checkBuffer",
833
+ value: function(e) {
834
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
835
+ startDiff: 0,
836
+ endDiff: 0
837
+ }, i = t || {}, r = i.startDiff, o = r === void 0 ? 0 : r, a = i.endDiff, f = a === void 0 ? 0 : a, u = this.media.buffered;
838
+ if (!u || u.length === 0 || !this.duration)
839
+ return !0;
840
+ for (var c = e || this.media.currentTime || 0.2, d = u.length, h = 0; h < d; h++)
841
+ if (u.start(h) + o <= c && u.end(h) - f > c)
842
+ return !0;
843
+ return !1;
844
+ }
845
+ }, {
846
+ key: "resizePosition",
847
+ value: function() {
848
+ var e = this, t = this.videoPos, i = t.vy, r = t.vx, o = t.h, a = t.w, f = this.videoPos.rotate;
849
+ if (!(f < 0 && o < 0 && a < 0)) {
850
+ var u = this.videoPos._pi;
851
+ if (!u && this.media.videoHeight && (u = this.media.videoWidth / this.media.videoHeight * 100), !!u) {
852
+ this.videoPos.pi = u, f = f < 0 ? 0 : f;
853
+ var c = {
854
+ rotate: f
855
+ }, d = 0, h = 0, v = 1, p = Math.abs(f / 90), T = this.root, C = this.innerContainer, P = T.offsetWidth, y = C ? C.offsetHeight : T.offsetHeight, _ = {}, N = y, O = P;
856
+ if (p % 2 === 0)
857
+ v = o > 0 ? 100 / o : a > 0 ? 100 / a : 1, c.scale = v, d = i > 0 ? (100 - o) / 2 - i : 0, c.y = p === 2 ? 0 - d : d, h = r > 0 ? (100 - a) / 2 - r : 0, c.x = p === 2 ? 0 - h : h, _.width = "".concat(O, "px"), _.height = "".concat(N, "px"), _.maxWidth = "", _.maxHeight = "";
858
+ else if (p % 2 === 1) {
859
+ O = y, N = P;
860
+ var Y = y - P;
861
+ h = -Y / 2 / O * 100, c.x = p === 3 ? h + i / 2 : h - i / 2, d = Y / 2 / N * 100, c.y = p === 3 ? d + r / 2 : d - r / 2, c.scale = v, _.width = "".concat(O, "px"), _.maxWidth = "".concat(O, "px"), _.height = "".concat(N, "px"), _.maxHeight = "".concat(N, "px");
862
+ }
863
+ var V = l.getTransformStyle(c, this.media.style.transform || this.media.style.webkitTransform);
864
+ _.transform = V, _.webkitTransform = V, Object.keys(_).map(function(M) {
865
+ e.media.style[M] = _[M];
866
+ });
867
+ }
868
+ }
869
+ }
870
+ }, {
871
+ key: "position",
872
+ value: function() {
873
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
874
+ h: 0,
875
+ y: 0,
876
+ x: 0,
877
+ w: 0
878
+ };
879
+ if (!(!this.media || !e || !e.h)) {
880
+ var t = this.videoPos;
881
+ t.h = e.h * 100 || 0, t.w = e.w * 100 || 0, t.vx = e.x * 100 || 0, t.vy = e.y * 100 || 0, this.resizePosition();
882
+ }
883
+ }
884
+ }, {
885
+ key: "setConfig",
886
+ value: function(e) {
887
+ var t = this;
888
+ e && Object.keys(e).map(function(i) {
889
+ if (i !== "plugins") {
890
+ t.config[i] = e[i];
891
+ var r = t.plugins[i.toLowerCase()];
892
+ r && l.typeOf(r.setConfig) === "Function" && r.setConfig(e[i]);
893
+ }
894
+ });
895
+ }
896
+ }, {
897
+ key: "playNext",
898
+ value: function(e) {
899
+ var t = this;
900
+ this.resetState(), this.setConfig(e), this._currentTime = 0, this._duration = 0, w(this, "playnext", function() {
901
+ t.start(), t.emit(be, e);
902
+ });
903
+ }
904
+ }, {
905
+ key: "resize",
906
+ value: function() {
907
+ var e = this;
908
+ if (!(!this.media || !this.root)) {
909
+ var t = this.root.getBoundingClientRect();
910
+ this.sizeInfo.width = t.width, this.sizeInfo.height = t.height, this.sizeInfo.left = t.left, this.sizeInfo.top = t.top;
911
+ var i = this.media, r = i.videoWidth, o = i.videoHeight, a = this.config, f = a.fitVideoSize, u = a.videoFillMode;
912
+ if ((u === "fill" || u === "cover" || u === "contain") && this.setAttribute("data-xgfill", u), !(!o || !r)) {
913
+ this._videoHeight = o, this._videoWidth = r;
914
+ var c = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, d = t.width, h = t.height - c, v = parseInt(r / o * 1e3, 10), p = parseInt(d / h * 1e3, 10), T = d, C = h, P = {};
915
+ f === "auto" && p > v || f === "fixWidth" ? (C = d / v * 1e3, this.config.fluid ? P.paddingTop = "".concat(C * 100 / T, "%") : P.height = "".concat(C + c, "px")) : (f === "auto" && p < v || f === "fixHeight") && (T = v * h / 1e3, P.width = "".concat(T, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(P).forEach(function(_) {
916
+ e.root.style[_] = P[_];
917
+ }), (u === "fillHeight" && p < v || u === "fillWidth" && p > v) && this.setAttribute("data-xgfill", "cover");
918
+ var y = {
919
+ videoScale: v,
920
+ vWidth: T,
921
+ vHeight: C,
922
+ cWidth: T,
923
+ cHeight: C + c
924
+ };
925
+ this.resizePosition(), this.emit(we, y);
926
+ }
927
+ }
928
+ }
929
+ }, {
930
+ key: "updateObjectPosition",
931
+ value: function() {
932
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
933
+ if (this.media.updateObjectPosition) {
934
+ this.media.updateObjectPosition(e, t);
935
+ return;
936
+ }
937
+ this.media.style.objectPosition = "".concat(e * 100, "% ").concat(t * 100, "%");
938
+ }
939
+ }, {
940
+ key: "setState",
941
+ value: function(e) {
942
+ S.logInfo("setState", "state from:".concat(ae[this.state], " to:").concat(ae[e])), this._state = e;
943
+ }
944
+ }, {
945
+ key: "preProcessUrl",
946
+ value: function(e, t) {
947
+ var i = this.config, r = i.preProcessUrl, o = i.preProcessUrlOptions, a = Object.assign({}, o, t);
948
+ return !l.isBlob(e) && typeof r == "function" ? r(e, a) : {
949
+ url: e
950
+ };
951
+ }
952
+ }, {
953
+ key: "_seekToStartTime",
954
+ value: function() {
955
+ this.__startTime > 0 && this.duration > 0 && (this.currentTime = this.__startTime > this.duration ? this.duration : this.__startTime, this.__startTime = -1);
956
+ }
957
+ }, {
958
+ key: "state",
959
+ get: function() {
960
+ return this._state;
961
+ }
962
+ }, {
963
+ key: "isFullscreen",
964
+ get: function() {
965
+ return this.fullscreen;
966
+ }
967
+ }, {
968
+ key: "isCssfullScreen",
969
+ get: function() {
970
+ return this.cssfullscreen;
971
+ }
972
+ }, {
973
+ key: "hasStart",
974
+ get: function() {
975
+ return this._hasStart;
976
+ },
977
+ set: function(e) {
978
+ typeof e == "boolean" && (this._hasStart = e, e === !1 && this.setState(g.READY), this.emit("hasstart"));
979
+ }
980
+ }, {
981
+ key: "isPlaying",
982
+ get: function() {
983
+ return this._state === g.RUNNING || this._state === g.ENDED;
984
+ },
985
+ set: function(e) {
986
+ e ? this.setState(g.RUNNING) : this._state >= g.RUNNING && this.setState(g.ATTACHED);
987
+ }
988
+ }, {
989
+ key: "definitionList",
990
+ get: function() {
991
+ return !this.config || !this.config.definition ? [] : this.config.definition.list || [];
992
+ },
993
+ set: function(e) {
994
+ var t = this, i = this.config.definition, r = null, o = null;
995
+ i.list = e, this.emit("resourceReady", e), e.forEach(function(a) {
996
+ var f;
997
+ ((f = t.curDefinition) === null || f === void 0 ? void 0 : f.definition) === a.definition && (r = a), i.defaultDefinition === a.definition && (o = a);
998
+ }), !o && e.length > 0 && (o = e[0]), r ? this.changeDefinition(r) : o && this.changeDefinition(o);
999
+ }
1000
+ }, {
1001
+ key: "videoFrameInfo",
1002
+ get: function() {
1003
+ var e = {
1004
+ total: 0,
1005
+ dropped: 0,
1006
+ corrupted: 0,
1007
+ droppedRate: 0,
1008
+ droppedDuration: 0
1009
+ };
1010
+ if (!this.media || !this.media.getVideoPlaybackQuality)
1011
+ return e;
1012
+ var t = this.media.getVideoPlaybackQuality();
1013
+ return e.dropped = t.droppedVideoFrames || 0, e.total = t.totalVideoFrames || 0, e.corrupted = t.corruptedVideoFrames || 0, e.total > 0 && (e.droppedRate = e.dropped / e.total * 100, e.droppedDuration = parseInt(this.cumulateTime / e.total * e.dropped, 0)), e;
1014
+ }
1015
+ }, {
1016
+ key: "lang",
1017
+ get: function() {
1018
+ return this.config.lang;
1019
+ },
1020
+ set: function(e) {
1021
+ var t = H.langKeys.filter(function(i) {
1022
+ return i === e;
1023
+ });
1024
+ if (t.length === 0 && e !== "zh") {
1025
+ console.error("Sorry, set lang fail, because the language [".concat(e, "] is not supported now, list of all supported languages is [").concat(H.langKeys.join(), "] "));
1026
+ return;
1027
+ }
1028
+ this.config.lang = e, E.setLang(e, this);
1029
+ }
1030
+ }, {
1031
+ key: "i18n",
1032
+ get: function() {
1033
+ var e = this.config.lang;
1034
+ return e === "zh" && (e = "zh-cn"), this.__i18n.lang[e] || this.__i18n.lang.en;
1035
+ }
1036
+ }, {
1037
+ key: "i18nKeys",
1038
+ get: function() {
1039
+ return this.__i18n.textKeys || {};
1040
+ }
1041
+ }, {
1042
+ key: "version",
1043
+ get: function() {
1044
+ return We;
1045
+ }
1046
+ }, {
1047
+ key: "playerId",
1048
+ get: function() {
1049
+ return this._pluginInfoId;
1050
+ }
1051
+ }, {
1052
+ key: "url",
1053
+ get: function() {
1054
+ return this.__url || this.config.url;
1055
+ },
1056
+ set: function(e) {
1057
+ this.__url = e;
1058
+ }
1059
+ }, {
1060
+ key: "poster",
1061
+ get: function() {
1062
+ return this.plugins.poster ? this.plugins.poster.config.poster : this.config.poster;
1063
+ },
1064
+ set: function(e) {
1065
+ this.plugins.poster && this.plugins.poster.update(e);
1066
+ }
1067
+ }, {
1068
+ key: "readyState",
1069
+ get: function() {
1070
+ return R(L(m.prototype), "readyState", this);
1071
+ }
1072
+ }, {
1073
+ key: "error",
1074
+ get: function() {
1075
+ var e = R(L(m.prototype), "error", this);
1076
+ return this.i18n[e] || e;
1077
+ }
1078
+ }, {
1079
+ key: "networkState",
1080
+ get: function() {
1081
+ return R(L(m.prototype), "networkState", this);
1082
+ }
1083
+ }, {
1084
+ key: "fullscreenChanging",
1085
+ get: function() {
1086
+ return this._fullScreenOffset !== null;
1087
+ }
1088
+ }, {
1089
+ key: "cumulateTime",
1090
+ get: function() {
1091
+ var e = this._accPlayed, t = e.acc, i = e.t;
1092
+ return i ? (/* @__PURE__ */ new Date()).getTime() - i + t : t;
1093
+ }
1094
+ }, {
1095
+ key: "zoom",
1096
+ get: function() {
1097
+ return this.config.zoom;
1098
+ },
1099
+ set: function(e) {
1100
+ this.config.zoom = e;
1101
+ }
1102
+ }, {
1103
+ key: "videoRotateDeg",
1104
+ get: function() {
1105
+ return this.videoPos.rotate;
1106
+ },
1107
+ set: function(e) {
1108
+ e = l.convertDeg(e), !(e % 90 !== 0 || e === this.videoPos.rotate) && (this.videoPos.rotate = e, this.resizePosition());
1109
+ }
1110
+ }, {
1111
+ key: "avgSpeed",
1112
+ get: function() {
1113
+ return ue;
1114
+ },
1115
+ set: function(e) {
1116
+ ue = e;
1117
+ }
1118
+ }, {
1119
+ key: "realTimeSpeed",
1120
+ get: function() {
1121
+ return le;
1122
+ },
1123
+ set: function(e) {
1124
+ le = e;
1125
+ }
1126
+ }, {
1127
+ key: "offsetCurrentTime",
1128
+ get: function() {
1129
+ return this._offsetInfo.currentTime || 0;
1130
+ },
1131
+ set: function(e) {
1132
+ this._offsetInfo.currentTime = e;
1133
+ }
1134
+ }, {
1135
+ key: "offsetDuration",
1136
+ get: function() {
1137
+ return this._offsetInfo.duration || 0;
1138
+ },
1139
+ set: function(e) {
1140
+ this._offsetInfo.duration = e || 0;
1141
+ }
1142
+ }, {
1143
+ key: "hook",
1144
+ value: function(e, t) {
1145
+ return ie.call.apply(ie, [this].concat(Array.prototype.slice.call(arguments)));
1146
+ }
1147
+ }, {
1148
+ key: "useHooks",
1149
+ value: function(e, t) {
1150
+ return se.call.apply(se, [this].concat(Array.prototype.slice.call(arguments)));
1151
+ }
1152
+ }, {
1153
+ key: "removeHooks",
1154
+ value: function(e, t) {
1155
+ return re.call.apply(re, [this].concat(Array.prototype.slice.call(arguments)));
1156
+ }
1157
+ }, {
1158
+ key: "usePluginHooks",
1159
+ value: function(e, t, i) {
1160
+ for (var r = arguments.length, o = new Array(r > 3 ? r - 3 : 0), a = 3; a < r; a++)
1161
+ o[a - 3] = arguments[a];
1162
+ return ne.call.apply(ne, [this].concat(Array.prototype.slice.call(arguments)));
1163
+ }
1164
+ }, {
1165
+ key: "removePluginHooks",
1166
+ value: function(e, t, i) {
1167
+ for (var r = arguments.length, o = new Array(r > 3 ? r - 3 : 0), a = 3; a < r; a++)
1168
+ o[a - 3] = arguments[a];
1169
+ return oe.call.apply(oe, [this].concat(Array.prototype.slice.call(arguments)));
1170
+ }
1171
+ }, {
1172
+ key: "setUserActive",
1173
+ value: function(e, t) {
1174
+ var i;
1175
+ typeof t == "boolean" && t !== this.muted && (this.addInnerOP("volumechange"), l.typeOf(t) === Boolean && (this.muted = t)), (i = F) === null || i === void 0 || i.setActive(this.playerId, e);
1176
+ }
1177
+ }], [{
1178
+ key: "debugger",
1179
+ get: function() {
1180
+ return S.config.debug;
1181
+ },
1182
+ set: function(e) {
1183
+ S.config.debug = e;
1184
+ }
1185
+ }, {
1186
+ key: "instManager",
1187
+ get: function() {
1188
+ return F;
1189
+ },
1190
+ set: function(e) {
1191
+ F = e;
1192
+ }
1193
+ }, {
1194
+ key: "getCurrentUserActivePlayerId",
1195
+ value: function() {
1196
+ var e;
1197
+ return (e = F) === null || e === void 0 ? void 0 : e.getActiveId();
1198
+ }
1199
+ }, {
1200
+ key: "setCurrentUserActive",
1201
+ value: function(e, t) {
1202
+ var i;
1203
+ (i = F) === null || i === void 0 || i.setActive(e, t);
1204
+ }
1205
+ }, {
1206
+ key: "isHevcSupported",
1207
+ value: function() {
1208
+ return k.isHevcSupported();
1209
+ }
1210
+ }, {
1211
+ key: "probeConfigSupported",
1212
+ value: function(e) {
1213
+ return k.probeConfigSupported(e);
1214
+ }
1215
+ }, {
1216
+ key: "install",
1217
+ value: function(e, t) {
1218
+ m.plugins || (m.plugins = {}), m.plugins[e] || (m.plugins[e] = t);
1219
+ }
1220
+ }, {
1221
+ key: "use",
1222
+ value: function(e, t) {
1223
+ m.plugins || (m.plugins = {}), m.plugins[e] = t;
1224
+ }
1225
+ }]), m;
1226
+ })(pe);
1227
+ b(z, "defaultPreset", null);
1228
+ b(z, "XgVideoProxy", null);
1229
+ z.instManager = ze.getInstance();
1230
+ export {
1231
+ ee as BasePlugin,
1232
+ Ee as Errors,
1233
+ Ze as Events,
1234
+ H as I18N,
1235
+ vt as Plugin,
1236
+ n as STATE_CLASS,
1237
+ k as Sniffer,
1238
+ l as Util,
1239
+ z as default
1240
+ };