@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.
- package/dist/cjs/_virtual/_commonjsHelpers.js +1 -0
- package/dist/cjs/_virtual/delegate.js +1 -0
- package/dist/cjs/_virtual/download.js +1 -0
- package/dist/cjs/_virtual/download2.js +1 -0
- package/dist/cjs/_virtual/index.js +1 -0
- package/dist/cjs/_virtual/index2.js +1 -0
- package/dist/cjs/components/shimmer-button/ShimmerButton.js +1 -1
- package/dist/cjs/components/shiny-button/ShinyButton.js +1 -1
- package/dist/cjs/components/sparkles-text/SparklesText.js +1 -1
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +3 -0
- package/dist/cjs/components/subtitle-player/index.d.ts +2 -0
- package/dist/cjs/components/txt-editor/TxtEditor.d.ts +5 -4
- package/dist/cjs/components/txt-editor/TxtEditor.js +32 -1
- package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
- package/dist/cjs/components/txt-reader/index.module.css.js +1 -1
- package/dist/cjs/components/variable-proximity/index.d.ts +10 -0
- package/dist/cjs/components/variable-proximity/index.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -0
- package/dist/cjs/components/video-subtitle-player/index.d.ts +3 -0
- package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
- package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -0
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +1 -0
- package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +1 -0
- package/dist/cjs/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +3 -0
- package/dist/cjs/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +2 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +1 -0
- 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
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +1 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +1 -0
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +1 -0
- 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
- 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
- package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -0
- package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -0
- package/dist/cjs/react-components.css +1 -1
- package/dist/es/_virtual/_commonjsHelpers.js +6 -0
- package/dist/es/_virtual/delegate.js +7 -0
- package/dist/es/_virtual/download.js +7 -0
- package/dist/es/_virtual/download2.js +4 -0
- package/dist/es/_virtual/index.js +8 -0
- package/dist/es/_virtual/index2.js +4 -0
- package/dist/es/components/shimmer-button/ShimmerButton.js +29 -62
- package/dist/es/components/shiny-button/ShinyButton.js +15 -17
- package/dist/es/components/sparkles-text/SparklesText.js +30 -29
- package/dist/es/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +301 -0
- package/dist/es/components/subtitle-player/index.d.ts +2 -0
- package/dist/es/components/txt-editor/TxtEditor.d.ts +5 -4
- package/dist/es/components/txt-editor/TxtEditor.js +105 -43
- package/dist/es/components/txt-reader/TxtReader.js +48 -55
- package/dist/es/components/txt-reader/index.module.css.js +6 -2
- package/dist/es/components/variable-proximity/index.d.ts +10 -0
- package/dist/es/components/variable-proximity/index.js +166 -94
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +125 -0
- package/dist/es/components/video-subtitle-player/index.d.ts +3 -0
- package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
- package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +57 -0
- package/dist/es/index.d.ts +2 -1
- package/dist/es/index.js +60 -56
- package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +21 -0
- package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +29 -0
- package/dist/es/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +77 -0
- package/dist/es/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +111 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +197 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +7 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +87 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +64 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +67 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +45 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +101 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +79 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +75 -0
- 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
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +466 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1240 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +207 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +130 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +366 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +204 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +14 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +81 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +61 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +13 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +34 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +83 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +34 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +271 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +111 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +517 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +25 -0
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +4 -0
- 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
- 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
- package/dist/es/packages/subtitle/lib/src/json-converter.js +27 -0
- package/dist/es/packages/subtitle/lib/src/parser.js +56 -0
- package/dist/es/react-components.css +1 -1
- package/package.json +23 -21
- package/dist/cjs/components/qr-code/index.d.ts +0 -103
- package/dist/cjs/components/qr-code/index.js +0 -1
- package/dist/es/components/qr-code/index.d.ts +0 -103
- package/dist/es/components/qr-code/index.js +0 -49
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { inherits as m, createSuper as h, classCallCheck as p, defineProperty as u, assertThisInitialized as s, createClass as y, objectSpread2 as v } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import r from "../../utils/util.js";
|
|
3
|
+
import { LOAD_START as w, LOADED_DATA as F, SEEKING as A, SEEKED as L, DESTROY as E, URL_CHANGE as W, PLAYING as k, CANPLAY as I, WAITING as C, ERROR as D, RESET as R, AUTOPLAY_STARTED as S, TIME_UPDATE as f, XGLOG as x } from "../../events.js";
|
|
4
|
+
import _ from "../../utils/debug.js";
|
|
5
|
+
import O from "../../plugin/plugin.js";
|
|
6
|
+
function n() {
|
|
7
|
+
return (/* @__PURE__ */ new Date()).getTime();
|
|
8
|
+
}
|
|
9
|
+
var g = {
|
|
10
|
+
LOAD_START: "loadstart",
|
|
11
|
+
LOADED_DATA: "loadeddata",
|
|
12
|
+
FIRST_FRAME: "firstFrame",
|
|
13
|
+
WAIT_START: "waitingStart",
|
|
14
|
+
WAIT_END: "waitingEnd",
|
|
15
|
+
SEEK_START: "seekStart",
|
|
16
|
+
SEEK_END: "seekEnd"
|
|
17
|
+
}, Y = /* @__PURE__ */ (function(c) {
|
|
18
|
+
m(d, c);
|
|
19
|
+
var l = h(d);
|
|
20
|
+
function d() {
|
|
21
|
+
var t;
|
|
22
|
+
p(this, d);
|
|
23
|
+
for (var i = arguments.length, e = new Array(i), a = 0; a < i; a++)
|
|
24
|
+
e[a] = arguments[a];
|
|
25
|
+
return t = l.call.apply(l, [this].concat(e)), u(s(t), "_onTimeupdate", function() {
|
|
26
|
+
t._state.isTimeUpdate = !0, t._state.autoplayStart && (_.logInfo("[xgLogger]".concat(t.player.playerId, " _onTimeupdate")), t._sendFF("onTimeupdate"));
|
|
27
|
+
}), u(s(t), "_onAutoplayStart", function() {
|
|
28
|
+
_.logInfo("[xgLogger]".concat(t.player.playerId, " _onAutoplayStart")), t._state.autoplayStart = !0, t.vt && t._sendFF("onAutoplayStart");
|
|
29
|
+
}), u(s(t), "_onReset", function() {
|
|
30
|
+
t._state = {
|
|
31
|
+
autoplayStart: !1,
|
|
32
|
+
isFFLoading: !1,
|
|
33
|
+
isTimeUpdate: !1,
|
|
34
|
+
isFFSend: !1,
|
|
35
|
+
isLs: !1
|
|
36
|
+
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = n(), t.loadedCostTime = 0, t.startCostTime = 0, t._isSeeking = !1, t.seekingStart = 0, t.waitingStart = 0, t.fixedWaitingStart = 0, t._isWaiting = !1, t._waitTimer && r.clearTimeout(s(t), t._waitTimer), t._waittTimer && r.clearTimeout(s(t), t._waittTimer), t._waitTimer = null, t._waittTimer = null, t._waitType = 0;
|
|
37
|
+
}), u(s(t), "_onSeeking", function() {
|
|
38
|
+
t.seekingStart || (t.suspendWaitingStatus("seek"), t.seekingStart = n(), t.emitLog(g.SEEK_START, {
|
|
39
|
+
start: n()
|
|
40
|
+
}));
|
|
41
|
+
}), u(s(t), "_onSeeked", function() {
|
|
42
|
+
t.suspendSeekingStatus("seeked");
|
|
43
|
+
}), u(s(t), "_onWaitingLoadStart", function() {
|
|
44
|
+
t._isWaiting || t.vt || (t._isWaiting = !0, t.waitingStart = n(), t.fixedWaitingStart = n(), t._waitType = 1, t.emitLog(g.WAIT_START, {
|
|
45
|
+
fixedStart: t.fixedWaitingStart,
|
|
46
|
+
start: t.waitingStart,
|
|
47
|
+
type: 1,
|
|
48
|
+
endType: "loadstart"
|
|
49
|
+
}));
|
|
50
|
+
}), u(s(t), "_onWaiting", function() {
|
|
51
|
+
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = n(), t._waitTimer = r.setTimeout(s(t), function() {
|
|
52
|
+
t._isWaiting && (t.waitingStart = n(), r.clearTimeout(s(t), t._waitTimer), t._waitTimer = null, t._startWaitTimeout(), t.emitLog(g.WAIT_START, {
|
|
53
|
+
fixedStart: t.fixedWaitingStart,
|
|
54
|
+
start: t.waitingStart,
|
|
55
|
+
type: t._waitType,
|
|
56
|
+
endType: t._waitType === 2 ? "seek" : "playing"
|
|
57
|
+
}));
|
|
58
|
+
}, 200));
|
|
59
|
+
}), u(s(t), "_onError", function() {
|
|
60
|
+
t.suspendSeekingStatus("error"), t.suspendWaitingStatus("error");
|
|
61
|
+
}), u(s(t), "_onPlaying", function() {
|
|
62
|
+
t._isWaiting && t.suspendWaitingStatus("playing");
|
|
63
|
+
}), t;
|
|
64
|
+
}
|
|
65
|
+
return y(d, [{
|
|
66
|
+
key: "afterCreate",
|
|
67
|
+
value: function() {
|
|
68
|
+
var i = this;
|
|
69
|
+
this._onReset(), this._waitType = "firstFrame", this._initOnceEvents(), this.newPointTime = n(), this.loadedCostTime = 0, this.startCostTime = 0, this.on(w, function() {
|
|
70
|
+
var e = i._state, a = e.autoplayStart, o = e.isFFSend;
|
|
71
|
+
i.startCostTime = n() - i.newPointTime, _.logInfo("[xgLogger]".concat(i.player.playerId, " LOAD_START"), "autoplayStart:".concat(a, " isFFSend:").concat(o, " startCostTime:").concat(i.startCostTime, " newPointTime").concat(i.newPointTime)), !o && (!e.isLs && i.emitLog(g.LOAD_START, {}), e.isLs = !0, e.isTimeUpdate = !1, e.isFFLoading = !0, i.pt = n(), i.vt = 0, i.fvt = 0, i._initOnceEvents(), i._onWaitingLoadStart());
|
|
72
|
+
}), this.on(F, function() {
|
|
73
|
+
i.vt = n(), i.fvt = i.vt - i.pt, i.loadedCostTime = i.vt - i.newPointTime;
|
|
74
|
+
var e = i._state, a = e.isTimeUpdate, o = e.isFFSend, T = e.autoplayStart;
|
|
75
|
+
_.logInfo("[xgLogger]".concat(i.player.playerId, " LOADED_DATA"), "fvt:".concat(i.fvt, " isTimeUpdate:").concat(i._state.isTimeUpdate, " loadedCostTime:").concat(i.loadedCostTime)), (a || T) && i._sendFF("loadedData"), o || i.emitLog(g.LOADED_DATA, {}), i.suspendWaitingStatus("loadeddata");
|
|
76
|
+
}), this.on(A, this._onSeeking), this.on(L, this._onSeeked), this.on(E, function() {
|
|
77
|
+
i.endState("destroy");
|
|
78
|
+
}), this.on(W, function() {
|
|
79
|
+
i.endState("urlChange"), _.logInfo("[xgLogger]".concat(i.player.playerId, " URL_CHANGE")), i._state.isFFSend && i._onReset();
|
|
80
|
+
}), this.on([k, I], this._onPlaying), this.on(C, this._onWaiting), this.on(D, this._onError), this.on(R, function() {
|
|
81
|
+
_.logInfo("[xgLogger]".concat(i.player.playerId, " RESET")), i.endState("reset"), i._initOnceEvents(), i._onReset();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}, {
|
|
85
|
+
key: "_initOnceEvents",
|
|
86
|
+
value: function() {
|
|
87
|
+
this.off(S, this._onAutoplayStart), this.off(f, this._onTimeupdate), this.once(S, this._onAutoplayStart), this.once(f, this._onTimeupdate);
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "_sendFF",
|
|
91
|
+
value: function(i) {
|
|
92
|
+
this.s = n();
|
|
93
|
+
var e = this._state, a = e.isFFLoading, o = e.isFFSend;
|
|
94
|
+
_.logInfo("[xgLogger]".concat(this.player.playerId, " _sendFF"), "".concat(i, " fvt:").concat(this.fvt, " isFFLoading:").concat(a, " !isFFSend:").concat(!o)), this.vt > 0 && a && !o && (_.logInfo("[xgLogger]".concat(this.player.playerId, " emitLog_firstFrame"), i), this._state.isFFLoading = !1, this._state.isFFSend = !0, this.emitLog(g.FIRST_FRAME, {
|
|
95
|
+
fvt: this.fvt,
|
|
96
|
+
costTime: this.fvt,
|
|
97
|
+
vt: this.vt,
|
|
98
|
+
startCostTime: this.startCostTime,
|
|
99
|
+
loadedCostTime: this.loadedCostTime
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "_startWaitTimeout",
|
|
104
|
+
value: function() {
|
|
105
|
+
var i = this;
|
|
106
|
+
this._waittTimer && r.clearTimeout(this, this._waittTimer), this._waittTimer = r.setTimeout(this, function() {
|
|
107
|
+
i.suspendWaitingStatus("timeout"), r.clearTimeout(i, i._waittTimer), i._waittTimer = null;
|
|
108
|
+
}, this.config.waitTimeout);
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "endState",
|
|
112
|
+
value: function(i) {
|
|
113
|
+
this.suspendWaitingStatus(i), this.suspendSeekingStatus(i);
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
key: "suspendSeekingStatus",
|
|
117
|
+
value: function(i) {
|
|
118
|
+
if (this.seekingStart) {
|
|
119
|
+
var e = n(), a = e - this.seekingStart;
|
|
120
|
+
this.seekingStart = 0, this.emitLog(g.SEEK_END, {
|
|
121
|
+
end: e,
|
|
122
|
+
costTime: a,
|
|
123
|
+
endType: i
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "suspendWaitingStatus",
|
|
129
|
+
value: function(i) {
|
|
130
|
+
if (this._waitTimer && (r.clearTimeout(this, this._waitTimer), this._waitTimer = null), this._waittTimer && (r.clearTimeout(this, this._waittTimer), this._waittTimer = null), this._isWaiting = !1, !!this.waitingStart) {
|
|
131
|
+
var e = n(), a = e - this.waitingStart, o = e - this.fixedWaitingStart, T = this.config.waitTimeout;
|
|
132
|
+
this._isWaiting = !1, this.waitingStart = 0, this.fixedWaitingStart = 0, this.emitLog(g.WAIT_END, {
|
|
133
|
+
fixedCostTime: o > T ? T : o,
|
|
134
|
+
costTime: a > T ? T : a,
|
|
135
|
+
type: i === "loadeddata" ? 1 : this._waitType,
|
|
136
|
+
endType: this._waitType === 2 ? "seek" : i
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
key: "emitLog",
|
|
142
|
+
value: function(i, e) {
|
|
143
|
+
var a = this.player;
|
|
144
|
+
this.emit(x, v({
|
|
145
|
+
t: n(),
|
|
146
|
+
host: r.getHostFromUrl(a.currentSrc),
|
|
147
|
+
vtype: a.vtype,
|
|
148
|
+
eventType: i,
|
|
149
|
+
currentTime: this.player.currentTime,
|
|
150
|
+
readyState: a.video.readyState,
|
|
151
|
+
networkState: a.video.networkState
|
|
152
|
+
}, e));
|
|
153
|
+
}
|
|
154
|
+
}], [{
|
|
155
|
+
key: "pluginName",
|
|
156
|
+
get: function() {
|
|
157
|
+
return "xgLogger";
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
key: "defaultConfig",
|
|
161
|
+
get: function() {
|
|
162
|
+
return {
|
|
163
|
+
waitTimeout: 1e4
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}]), d;
|
|
167
|
+
})(O);
|
|
168
|
+
export {
|
|
169
|
+
g as LOG_TYPES,
|
|
170
|
+
Y as default
|
|
171
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { inherits as u, createSuper as y, classCallCheck as v, defineProperty as h, assertThisInitialized as a, createClass as m } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import r from "../../utils/util.js";
|
|
3
|
+
import { PAUSE as w, PLAY as C, MINI_STATE_CHANGE as p } from "../../events.js";
|
|
4
|
+
import M from "../../plugin/plugin.js";
|
|
5
|
+
import { xgIconTips as S } from "../common/iconTools.js";
|
|
6
|
+
import x from "../assets/play.js";
|
|
7
|
+
import b from "../assets/pause.js";
|
|
8
|
+
import f from "./miniScreenIcon.js";
|
|
9
|
+
import k from "../../utils/draggabilly.js";
|
|
10
|
+
var E = /* @__PURE__ */ (function(g) {
|
|
11
|
+
u(o, g);
|
|
12
|
+
var d = y(o);
|
|
13
|
+
function o(n) {
|
|
14
|
+
var i;
|
|
15
|
+
v(this, o), i = d.call(this, n), h(a(i), "onCancelClick", function(l) {
|
|
16
|
+
i.exitMini(), i.isClose = !0;
|
|
17
|
+
}), h(a(i), "onCenterClick", function(l) {
|
|
18
|
+
var t = a(i), c = t.player;
|
|
19
|
+
c.paused ? c.play() : c.pause();
|
|
20
|
+
}), h(a(i), "onScroll", function(l) {
|
|
21
|
+
if (!(!window.scrollY && window.scrollY !== 0 || Math.abs(window.scrollY - i.pos.scrollY) < 50)) {
|
|
22
|
+
var t = parseInt(r.getCss(i.player.root, "height"));
|
|
23
|
+
t += i.config.scrollTop, i.pos.scrollY = window.scrollY, window.scrollY > t + 5 ? !i.isMini && !i.isClose && i.getMini() : window.scrollY <= t && (i.isMini && i.exitMini(), i.isClose = !1);
|
|
24
|
+
}
|
|
25
|
+
}), i.isMini = !1, i.isClose = !1;
|
|
26
|
+
var s = a(i), e = s.config;
|
|
27
|
+
return i.pos = {
|
|
28
|
+
left: e.left < 0 ? window.innerWidth - e.width - 20 : e.left,
|
|
29
|
+
top: e.top < 0 ? window.innerHeight - e.height - 20 : e.top,
|
|
30
|
+
height: i.config.height,
|
|
31
|
+
width: i.config.width,
|
|
32
|
+
scrollY: window.scrollY || 0
|
|
33
|
+
}, i.lastStyle = null, i;
|
|
34
|
+
}
|
|
35
|
+
return m(o, [{
|
|
36
|
+
key: "beforeCreate",
|
|
37
|
+
value: function(i) {
|
|
38
|
+
typeof i.player.config.mini == "boolean" && (i.config.isShowIcon = i.player.config.mini);
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
key: "afterCreate",
|
|
42
|
+
value: function() {
|
|
43
|
+
var i = this;
|
|
44
|
+
this.initIcons(), this.on(w, function() {
|
|
45
|
+
i.setAttr("data-state", "pause");
|
|
46
|
+
}), this.on(C, function() {
|
|
47
|
+
i.setAttr("data-state", "play");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
key: "onPluginsReady",
|
|
52
|
+
value: function() {
|
|
53
|
+
var i = this, s = this.player, e = this.config;
|
|
54
|
+
if (!e.disable) {
|
|
55
|
+
if (this.config.isShowIcon) {
|
|
56
|
+
var l = {
|
|
57
|
+
config: {
|
|
58
|
+
onClick: function() {
|
|
59
|
+
i.getMini();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
s.controls.registerPlugin(f, l, f.pluginName);
|
|
64
|
+
}
|
|
65
|
+
var t = r.checkTouchSupport() ? "touchend" : "click";
|
|
66
|
+
this.bind(".mini-cancel-btn", t, this.onCancelClick), this.bind(".play-icon", t, this.onCenterClick), this.config.disableDrag || (this._draggabilly = new k(this.player.root, {
|
|
67
|
+
handle: this.root
|
|
68
|
+
})), this.config.isScrollSwitch && window.addEventListener("scroll", this.onScroll);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "registerIcons",
|
|
73
|
+
value: function() {
|
|
74
|
+
return {
|
|
75
|
+
play: {
|
|
76
|
+
icon: x,
|
|
77
|
+
class: "xg-icon-play"
|
|
78
|
+
},
|
|
79
|
+
pause: {
|
|
80
|
+
icon: b,
|
|
81
|
+
class: "xg-icon-pause"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
key: "initIcons",
|
|
87
|
+
value: function() {
|
|
88
|
+
var i = this.icons;
|
|
89
|
+
this.appendChild(".play-icon", i.play), this.appendChild(".play-icon", i.pause);
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "getMini",
|
|
93
|
+
value: function() {
|
|
94
|
+
var i = this;
|
|
95
|
+
if (!this.isMini) {
|
|
96
|
+
var s = this.player, e = this.playerConfig, l = this.config.target || this.player.root;
|
|
97
|
+
this.lastStyle = {}, r.addClass(s.root, "xgplayer-mini"), ["width", "height", "top", "left"].map(function(t) {
|
|
98
|
+
i.lastStyle[t] = l.style[t], l.style[t] = "".concat(i.pos[t], "px");
|
|
99
|
+
}), e.fluid && (l.style["padding-top"] = ""), this.emit(p, !0), s.isMini = this.isMini = !0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "exitMini",
|
|
104
|
+
value: function() {
|
|
105
|
+
var i = this;
|
|
106
|
+
if (!this.isMini)
|
|
107
|
+
return !1;
|
|
108
|
+
var s = this.player, e = this.playerConfig, l = this.config.target || this.player.root;
|
|
109
|
+
r.removeClass(s.root, "xgplayer-mini"), this.lastStyle && Object.keys(this.lastStyle).map(function(t) {
|
|
110
|
+
l.style[t] = i.lastStyle[t];
|
|
111
|
+
}), this.lastStyle = null, e.fluid && (s.root.style.width = "100%", s.root.style.height = "0", s.root.style["padding-top"] = "".concat(e.height * 100 / e.width, "%")), this.emit(p, !1), this.isMini = s.isMini = !1;
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "updatePos",
|
|
115
|
+
value: function(i) {
|
|
116
|
+
this.pos = Object.assign(this.pos, i), this.isMini && (this.player.root.style.left = "".concat(this.pos.left, "px"), this.player.root.style.top = "".concat(this.pos.top, "px"), this.player.root.style.width = "".concat(this.pos.width, "px"), this.player.root.style.height = "".concat(this.pos.height, "px"));
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
key: "destroy",
|
|
120
|
+
value: function() {
|
|
121
|
+
window.removeEventListener("scroll", this.onScroll);
|
|
122
|
+
var i = r.checkTouchSupport() ? "touchend" : "click";
|
|
123
|
+
this.unbind(".mini-cancel-btn", i, this.onCancelClick), this.unbind(".play-icon", i, this.onCenterClick), this._draggabilly && this._draggabilly.destroy(), this._draggabilly = null, this.exitMini();
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
key: "render",
|
|
127
|
+
value: function() {
|
|
128
|
+
if (!this.config.disable)
|
|
129
|
+
return `
|
|
130
|
+
<xg-mini-layer class="xg-mini-layer">
|
|
131
|
+
<xg-mini-header class="xgplayer-mini-header">
|
|
132
|
+
`.concat(S(this, "MINI_DRAG", this.playerConfig.isHideTips), `
|
|
133
|
+
</xg-mini-header>
|
|
134
|
+
<div class="mini-cancel-btn">
|
|
135
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
136
|
+
<path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>
|
|
137
|
+
</svg>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="play-icon">
|
|
140
|
+
</div>
|
|
141
|
+
</xg-mini-layer>`);
|
|
142
|
+
}
|
|
143
|
+
}], [{
|
|
144
|
+
key: "pluginName",
|
|
145
|
+
get: function() {
|
|
146
|
+
return "miniscreen";
|
|
147
|
+
}
|
|
148
|
+
}, {
|
|
149
|
+
key: "defaultConfig",
|
|
150
|
+
get: function() {
|
|
151
|
+
return {
|
|
152
|
+
index: 10,
|
|
153
|
+
disable: !1,
|
|
154
|
+
width: 320,
|
|
155
|
+
height: 180,
|
|
156
|
+
left: -1,
|
|
157
|
+
top: -1,
|
|
158
|
+
isShowIcon: !1,
|
|
159
|
+
isScrollSwitch: !1,
|
|
160
|
+
scrollTop: 0,
|
|
161
|
+
disableDrag: !1
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}]), o;
|
|
165
|
+
})(M);
|
|
166
|
+
export {
|
|
167
|
+
f as MiniScreenIcon,
|
|
168
|
+
E as default
|
|
169
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { inherits as s, createSuper as a, classCallCheck as r, createClass as o } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import l, { POSITIONS as u } from "../../plugin/plugin.js";
|
|
3
|
+
var f = /* @__PURE__ */ (function(t) {
|
|
4
|
+
s(n, t);
|
|
5
|
+
var c = a(n);
|
|
6
|
+
function n() {
|
|
7
|
+
return r(this, n), c.apply(this, arguments);
|
|
8
|
+
}
|
|
9
|
+
return o(n, [{
|
|
10
|
+
key: "afterCreate",
|
|
11
|
+
value: function() {
|
|
12
|
+
this.getMini = this.getMini.bind(this), this.exitMini = this.exitMini.bind(this), this.bind("click", this.getMini);
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
key: "getMini",
|
|
16
|
+
value: function() {
|
|
17
|
+
this.config.onClick && this.config.onClick();
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
key: "exitMini",
|
|
21
|
+
value: function() {
|
|
22
|
+
this.config.onClick && this.config.onClick();
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
key: "destroy",
|
|
26
|
+
value: function() {
|
|
27
|
+
this.unbind(["click", "touchend"], this.getMini);
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
key: "render",
|
|
31
|
+
value: function() {
|
|
32
|
+
var e = "MINISCREEN";
|
|
33
|
+
return `
|
|
34
|
+
<xg-icon class="xgplayer-miniicon">
|
|
35
|
+
<div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="`.concat(this.i18nKeys[e], '">').concat(this.i18n[e], `</span></div>
|
|
36
|
+
</xg-icon>`);
|
|
37
|
+
}
|
|
38
|
+
}], [{
|
|
39
|
+
key: "pluginName",
|
|
40
|
+
get: function() {
|
|
41
|
+
return "miniscreenIcon";
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: "defaultConfig",
|
|
45
|
+
get: function() {
|
|
46
|
+
return {
|
|
47
|
+
position: u.CONTROLS_RIGHT,
|
|
48
|
+
index: 10
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}]), n;
|
|
52
|
+
})(l);
|
|
53
|
+
export {
|
|
54
|
+
f as default
|
|
55
|
+
};
|