@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,119 @@
|
|
|
1
|
+
import { inherits as g, createSuper as p, classCallCheck as y, createClass as v } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import i from "../../utils/util.js";
|
|
3
|
+
import { ENDED as C, TIME_UPDATE as r, URL_CHANGE as m, PLAY as k } from "../../events.js";
|
|
4
|
+
import _ from "../../plugin/plugin.js";
|
|
5
|
+
var S = /* @__PURE__ */ (function(u) {
|
|
6
|
+
g(n, u);
|
|
7
|
+
var f = p(n);
|
|
8
|
+
function n() {
|
|
9
|
+
return y(this, n), f.apply(this, arguments);
|
|
10
|
+
}
|
|
11
|
+
return v(n, [{
|
|
12
|
+
key: "isEndedShow",
|
|
13
|
+
get: function() {
|
|
14
|
+
return this.config.isEndedShow;
|
|
15
|
+
},
|
|
16
|
+
set: function(e) {
|
|
17
|
+
this.config.isEndedShow = e;
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
key: "hide",
|
|
21
|
+
value: function() {
|
|
22
|
+
i.addClass(this.root, "hide");
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
key: "show",
|
|
26
|
+
value: function(e) {
|
|
27
|
+
i.removeClass(this.root, "hide");
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
key: "beforeCreate",
|
|
31
|
+
value: function(e) {
|
|
32
|
+
typeof e.player.config.poster == "string" && (e.config.poster = e.player.config.poster);
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
key: "afterCreate",
|
|
36
|
+
value: function() {
|
|
37
|
+
var e = this;
|
|
38
|
+
this.on(C, function() {
|
|
39
|
+
e.isEndedShow && i.removeClass(e.root, "hide");
|
|
40
|
+
}), this.config.hideCanplay ? (this.once(r, function() {
|
|
41
|
+
e.onTimeUpdate();
|
|
42
|
+
}), this.on(m, function() {
|
|
43
|
+
i.removeClass(e.root, "hide"), i.addClass(e.root, "xg-showplay"), e.once(r, function() {
|
|
44
|
+
e.onTimeUpdate();
|
|
45
|
+
});
|
|
46
|
+
})) : this.on(k, function() {
|
|
47
|
+
i.addClass(e.root, "hide");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
key: "setConfig",
|
|
52
|
+
value: function(e) {
|
|
53
|
+
var o = this;
|
|
54
|
+
Object.keys(e).forEach(function(a) {
|
|
55
|
+
o.config[a] = e[a];
|
|
56
|
+
});
|
|
57
|
+
var s = this.config.poster;
|
|
58
|
+
this.update(s);
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
key: "onTimeUpdate",
|
|
62
|
+
value: function() {
|
|
63
|
+
var e = this;
|
|
64
|
+
this.player.currentTime ? i.removeClass(this.root, "xg-showplay") : this.once(r, function() {
|
|
65
|
+
e.onTimeUpdate();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "update",
|
|
70
|
+
value: function(e) {
|
|
71
|
+
e && (this.config.poster = e, this.root.style.backgroundImage = "url(".concat(e, ")"));
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "getBgSize",
|
|
75
|
+
value: function(e) {
|
|
76
|
+
var o = "";
|
|
77
|
+
switch (e) {
|
|
78
|
+
case "cover":
|
|
79
|
+
o = "cover";
|
|
80
|
+
break;
|
|
81
|
+
case "contain":
|
|
82
|
+
o = "contain";
|
|
83
|
+
break;
|
|
84
|
+
case "fixHeight":
|
|
85
|
+
o = "auto 100%";
|
|
86
|
+
break;
|
|
87
|
+
default:
|
|
88
|
+
o = "";
|
|
89
|
+
}
|
|
90
|
+
return o ? "background-size: ".concat(o, ";") : "";
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "render",
|
|
94
|
+
value: function() {
|
|
95
|
+
var e = this.config, o = e.poster, s = e.hideCanplay, a = e.fillMode, l = e.notHidden, c = this.getBgSize(a), h = o ? "background-image:url(".concat(o, ");").concat(c) : c, d = l ? "xg-not-hidden" : s ? "xg-showplay" : "";
|
|
96
|
+
return '<xg-poster class="xgplayer-poster '.concat(d, '" style="').concat(h, `">
|
|
97
|
+
</xg-poster>`);
|
|
98
|
+
}
|
|
99
|
+
}], [{
|
|
100
|
+
key: "pluginName",
|
|
101
|
+
get: function() {
|
|
102
|
+
return "poster";
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
key: "defaultConfig",
|
|
106
|
+
get: function() {
|
|
107
|
+
return {
|
|
108
|
+
isEndedShow: !0,
|
|
109
|
+
hideCanplay: !1,
|
|
110
|
+
notHidden: !1,
|
|
111
|
+
poster: "",
|
|
112
|
+
fillMode: "fixWidth"
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}]), n;
|
|
116
|
+
})(_);
|
|
117
|
+
export {
|
|
118
|
+
S as default
|
|
119
|
+
};
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
import { inherits as T, createSuper as E, classCallCheck as S, defineProperty as p, assertThisInitialized as c, createClass as D, objectSpread2 as k, typeof as L } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import l from "../../utils/util.js";
|
|
3
|
+
import P from "../../utils/sniffer.js";
|
|
4
|
+
import { DURATION_CHANGE as w, TIME_UPDATE as I, SEEKED as B, PROGRESS as H, ENDED as x, EMPTIED as O, VIDEO_RESIZE as U } from "../../events.js";
|
|
5
|
+
import F, { POSITIONS as A } from "../../plugin/plugin.js";
|
|
6
|
+
import N from "./innerList.js";
|
|
7
|
+
var _ = {
|
|
8
|
+
POINT: "inner-focus-point",
|
|
9
|
+
HIGHLIGHT: "inner-focus-highlight"
|
|
10
|
+
}, Y = /* @__PURE__ */ (function(M) {
|
|
11
|
+
T(m, M);
|
|
12
|
+
var b = E(m);
|
|
13
|
+
function m(r) {
|
|
14
|
+
var e;
|
|
15
|
+
return S(this, m), e = b.call(this, r), p(c(e), "onMoveOnly", function(t, i) {
|
|
16
|
+
var n = c(e), o = n.pos, s = n.config, a = n.player, f = i;
|
|
17
|
+
if (t) {
|
|
18
|
+
l.event(t);
|
|
19
|
+
var u = l.getEventPos(t, a.zoom), h = a.rotateDeg === 90 ? u.clientY : u.clientX;
|
|
20
|
+
if (o.moving && Math.abs(o.x - h) < s.miniMoveStep)
|
|
21
|
+
return;
|
|
22
|
+
o.moving = !0, o.x = h, f = e.computeTime(t, h);
|
|
23
|
+
}
|
|
24
|
+
e.triggerCallbacks("dragmove", f, t), e._updateInnerFocus(f);
|
|
25
|
+
}), p(c(e), "onBodyClick", function(t) {
|
|
26
|
+
e.pos.isLocked && (e.pos.isLocked = !1, t.preventDefault(), t.stopPropagation());
|
|
27
|
+
}), p(c(e), "_mouseDownHandler", function(t, i) {
|
|
28
|
+
e._state.time = i.currentTime, e.updateWidth(i.currentTime, i.seekTime, i.percent, 0), e._updateInnerFocus(i);
|
|
29
|
+
}), p(c(e), "_mouseUpHandler", function(t, i) {
|
|
30
|
+
var n = c(e), o = n.pos;
|
|
31
|
+
o.moving && e.updateWidth(i.currentTime, i.seekTime, i.percent, 2);
|
|
32
|
+
}), p(c(e), "_mouseMoveHandler", function(t, i) {
|
|
33
|
+
var n = c(e), o = n._state, s = n.pos, a = n.config, f = n.player;
|
|
34
|
+
o.time < i.currentTime ? i.forward = !0 : i.forward = !1, o.time = i.currentTime, s.isDown && !s.moving && (s.moving = !0, a.isPauseMoving && f.pause(), e.triggerCallbacks("dragstart", i, t), e.emitUserAction("drag", "dragstart", i)), e.updateWidth(i.currentTime, i.seekTime, i.percent, 1), e.triggerCallbacks("dragmove", i, t), e._updateInnerFocus(i);
|
|
35
|
+
}), p(c(e), "onMouseDown", function(t) {
|
|
36
|
+
var i = c(e), n = i._state, o = i.player, s = i.pos, a = i.config, f = i.playerConfig, u = l.getEventPos(t, o.zoom), h = o.rotateDeg === 90 ? u.clientY : u.clientX;
|
|
37
|
+
if (!(o.isMini || a.closeMoveSeek || !f.allowSeekAfterEnded && o.ended)) {
|
|
38
|
+
if (!o.duration && !o.isPlaying) {
|
|
39
|
+
o.play();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
t.stopPropagation(), e.focus(), l.checkIsFunction(f.disableSwipeHandler) && f.disableSwipeHandler(), l.checkIsFunction(a.onMoveStart) && a.onMoveStart(), l.event(t), s.x = h, s.isDown = !0, s.moving = !1, n.prePlayTime = o.currentTime, o.focus({
|
|
43
|
+
autoHide: !1
|
|
44
|
+
}), e.isProgressMoving = !0, l.addClass(e.progressBtn, "active");
|
|
45
|
+
var d = e.computeTime(t, h);
|
|
46
|
+
d.prePlayTime = n.prePlayTime, e._mouseDownHandlerHook(t, d);
|
|
47
|
+
var v = t.type;
|
|
48
|
+
return v === "touchstart" ? (e.root.addEventListener("touchmove", e.onMouseMove), e.root.addEventListener("touchend", e.onMouseUp), e.root.addEventListener("touchcancel", e.onMouseUp)) : (e.unbind("mousemove", e.onMoveOnly), document.addEventListener("mousemove", e.onMouseMove, !1), document.addEventListener("mouseup", e.onMouseUp, !1)), !0;
|
|
49
|
+
}
|
|
50
|
+
}), p(c(e), "onMouseUp", function(t) {
|
|
51
|
+
var i = c(e), n = i.player, o = i.config, s = i.pos, a = i.playerConfig, f = i._state;
|
|
52
|
+
if (s) {
|
|
53
|
+
t.stopPropagation(), t.preventDefault(), l.checkIsFunction(a.enableSwipeHandler) && a.enableSwipeHandler(), l.checkIsFunction(o.onMoveEnd) && o.onMoveEnd(), l.event(t), l.removeClass(e.progressBtn, "active");
|
|
54
|
+
var u = e.computeTime(t, s.x);
|
|
55
|
+
u.prePlayTime = f.prePlayTime, s.moving ? (e.triggerCallbacks("dragend", u, t), e.emitUserAction("drag", "dragend", u)) : (e.triggerCallbacks("click", u, t), e.emitUserAction("click", "click", u)), e._mouseUpHandlerHook(t, u), s.moving = !1, s.isDown = !1, s.x = 0, s.y = 0, s.isLocked = !0, f.prePlayTime = 0, f.time = 0;
|
|
56
|
+
var h = t.type;
|
|
57
|
+
h === "touchend" || h === "touchcancel" ? (e.root.removeEventListener("touchmove", e.onMouseMove), e.root.removeEventListener("touchend", e.onMouseUp), e.root.removeEventListener("touchcancel", e.onMouseUp), e.blur()) : (document.removeEventListener("mousemove", e.onMouseMove, !1), document.removeEventListener("mouseup", e.onMouseUp, !1), s.isEnter ? a.isMobileSimulateMode !== "mobile" && e.bind("mousemove", e.onMoveOnly) : e.onMouseLeave(t)), l.setTimeout(c(e), function() {
|
|
58
|
+
e.resetSeekState();
|
|
59
|
+
}, 1), n.focus();
|
|
60
|
+
}
|
|
61
|
+
}), p(c(e), "onMouseMove", function(t) {
|
|
62
|
+
var i = c(e), n = i._state, o = i.pos, s = i.player, a = i.config;
|
|
63
|
+
l.checkTouchSupport() && t.preventDefault(), l.event(t);
|
|
64
|
+
var f = l.getEventPos(t, s.zoom), u = s.rotateDeg === 90 ? f.clientY : f.clientX, h = Math.abs(o.x - u);
|
|
65
|
+
if (!(o.moving && h < a.miniMoveStep || !o.moving && h < a.miniStartStep)) {
|
|
66
|
+
o.x = u;
|
|
67
|
+
var d = e.computeTime(t, u);
|
|
68
|
+
d.prePlayTime = n.prePlayTime, e._mouseMoveHandlerHook(t, d);
|
|
69
|
+
}
|
|
70
|
+
}), p(c(e), "onMouseOut", function(t) {
|
|
71
|
+
e.triggerCallbacks("mouseout", null, t);
|
|
72
|
+
}), p(c(e), "onMouseOver", function(t) {
|
|
73
|
+
e.triggerCallbacks("mouseover", null, t);
|
|
74
|
+
}), p(c(e), "onMouseEnter", function(t) {
|
|
75
|
+
var i = c(e), n = i.player, o = i.pos;
|
|
76
|
+
if (!(o.isDown || o.isEnter || n.isMini || !n.config.allowSeekAfterEnded && n.ended)) {
|
|
77
|
+
o.isEnter = !0, e.bind("mousemove", e.onMoveOnly), e.bind("mouseleave", e.onMouseLeave), l.event(t);
|
|
78
|
+
var s = l.getEventPos(t, n.zoom), a = n.rotateDeg === 90 ? s.clientY : s.clientX, f = e.computeTime(t, a);
|
|
79
|
+
e.triggerCallbacks("mouseenter", f, t), e.focus();
|
|
80
|
+
}
|
|
81
|
+
}), p(c(e), "onMouseLeave", function(t) {
|
|
82
|
+
e.triggerCallbacks("mouseleave", null, t), e.unlock(), e._updateInnerFocus(null);
|
|
83
|
+
}), p(c(e), "onVideoResize", function() {
|
|
84
|
+
var t = e.pos, i = t.x, n = t.isDown, o = t.isEnter;
|
|
85
|
+
if (o && !n) {
|
|
86
|
+
var s = e.computeTime(null, i);
|
|
87
|
+
e.onMoveOnly(null, s);
|
|
88
|
+
}
|
|
89
|
+
}), e.useable = !1, e.isProgressMoving = !1, e.__dragCallBacks = [], e._state = {
|
|
90
|
+
now: -1,
|
|
91
|
+
direc: 0,
|
|
92
|
+
time: 0,
|
|
93
|
+
prePlayTime: -1
|
|
94
|
+
}, e._disableBlur = !1, typeof e.config.isDragingSeek == "boolean" && (console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"), e.config.isDraggingSeek = e.config.isDragingSeek), e;
|
|
95
|
+
}
|
|
96
|
+
return D(m, [{
|
|
97
|
+
key: "offsetDuration",
|
|
98
|
+
get: function() {
|
|
99
|
+
return this.playerConfig.customDuration || this.player.offsetDuration || this.player.duration;
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "duration",
|
|
103
|
+
get: function() {
|
|
104
|
+
return this.playerConfig.customDuration || this.player.duration;
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
key: "timeOffset",
|
|
108
|
+
get: function() {
|
|
109
|
+
return this.playerConfig.timeOffset || 0;
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "currentTime",
|
|
113
|
+
get: function() {
|
|
114
|
+
var e = this.player, t = e.offsetCurrentTime, i = e.currentTime;
|
|
115
|
+
return t >= 0 ? t : i + this.timeOffset;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "changeState",
|
|
119
|
+
value: function() {
|
|
120
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
121
|
+
this.useable = e;
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "show",
|
|
125
|
+
value: function(e) {
|
|
126
|
+
this.root && (this.root.style.display = "flex");
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
key: "_initInner",
|
|
130
|
+
value: function() {
|
|
131
|
+
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
132
|
+
(!t || t.length === 0) && (t = [{
|
|
133
|
+
percent: 1
|
|
134
|
+
}]);
|
|
135
|
+
var n = k(k({
|
|
136
|
+
fragments: t
|
|
137
|
+
}, i), {}, {
|
|
138
|
+
actionCallback: function(s) {
|
|
139
|
+
e.emitUserAction("fragment_focus", "fragment_focus", s);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
this.innerList ? this.innerList.reset(n) : (this.innerList = new N(n), this.outer.insertBefore(this.innerList.render(), this.outer.children[0]), ["findHightLight", "unHightLight", "setHightLight", "findFragment"].map(function(o) {
|
|
143
|
+
e[o] = e.innerList[o].bind(e.innerList);
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "_updateInnerFocus",
|
|
148
|
+
value: function(e) {
|
|
149
|
+
this.innerList && this.innerList.updateFocus(e);
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "afterCreate",
|
|
153
|
+
value: function() {
|
|
154
|
+
if (!(this.config.disable || this.playerConfig.isLive)) {
|
|
155
|
+
this.pos = {
|
|
156
|
+
x: 0,
|
|
157
|
+
y: 0,
|
|
158
|
+
moving: !1,
|
|
159
|
+
isDown: !1,
|
|
160
|
+
isEnter: !1,
|
|
161
|
+
isLocked: !1
|
|
162
|
+
}, this.outer = this.find("xg-outer");
|
|
163
|
+
var e = this.config, t = e.fragFocusClass, i = e.fragAutoFocus, n = e.fragClass;
|
|
164
|
+
this._initInner(this.config.fragments, {
|
|
165
|
+
fragFocusClass: t,
|
|
166
|
+
fragAutoFocus: i,
|
|
167
|
+
fragClass: n,
|
|
168
|
+
style: this.playerConfig.commonStyle || {}
|
|
169
|
+
}), P.device === "mobile" && (this.config.isDraggingSeek = !1, this.isMobile = !0), this.progressBtn = this.find(".xgplayer-progress-btn"), this.listenEvents(), this.bindDomEvents(), this.initCustomStyle();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}, {
|
|
173
|
+
key: "listenEvents",
|
|
174
|
+
value: function() {
|
|
175
|
+
var e = this;
|
|
176
|
+
this.on(w, function() {
|
|
177
|
+
e.onMouseLeave();
|
|
178
|
+
}), this.on(I, function() {
|
|
179
|
+
e.onTimeupdate();
|
|
180
|
+
}), this.on(B, function() {
|
|
181
|
+
e.onTimeupdate(), e.onCacheUpdate();
|
|
182
|
+
}), this.on(H, function() {
|
|
183
|
+
e.onCacheUpdate();
|
|
184
|
+
}), this.on(x, function() {
|
|
185
|
+
e.onCacheUpdate(!0), e.onTimeupdate(!0), e._state.now = 0;
|
|
186
|
+
}), this.on(O, function() {
|
|
187
|
+
e.onReset();
|
|
188
|
+
}), this.on(U, function() {
|
|
189
|
+
e.onVideoResize();
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "setConfig",
|
|
194
|
+
value: function(e) {
|
|
195
|
+
var t = this, i = null;
|
|
196
|
+
Object.keys(e).forEach(function(n) {
|
|
197
|
+
t.config[n] = e[n], n === "fragments" && (i = e[n]);
|
|
198
|
+
}), i && this._initInner(i, e);
|
|
199
|
+
}
|
|
200
|
+
}, {
|
|
201
|
+
key: "initCustomStyle",
|
|
202
|
+
value: function() {
|
|
203
|
+
var e = this.playerConfig || {}, t = e.commonStyle, i = t.sliderBtnStyle, n = this.progressBtn;
|
|
204
|
+
i && (typeof i == "string" ? n.style.boxShadow = i : L(i) === "object" && Object.keys(i).map(function(o) {
|
|
205
|
+
n.style[o] = i[o];
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
}, {
|
|
209
|
+
key: "triggerCallbacks",
|
|
210
|
+
value: function(e, t, i) {
|
|
211
|
+
this.__dragCallBacks.length > 0 && this.__dragCallBacks.map(function(n) {
|
|
212
|
+
if (n && n.handler && n.type === e)
|
|
213
|
+
try {
|
|
214
|
+
n.handler(t, i);
|
|
215
|
+
} catch (o) {
|
|
216
|
+
console.error("[XGPLAYER][triggerCallbacks] ".concat(n, " error"), o);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
key: "addCallBack",
|
|
222
|
+
value: function(e, t) {
|
|
223
|
+
t && typeof t == "function" && this.__dragCallBacks.push({
|
|
224
|
+
type: e,
|
|
225
|
+
handler: t
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
key: "removeCallBack",
|
|
230
|
+
value: function(e, t) {
|
|
231
|
+
var i = this.__dragCallBacks, n = -1;
|
|
232
|
+
i.map(function(o, s) {
|
|
233
|
+
o && o.type === e && o.handler === t && (n = s);
|
|
234
|
+
}), n > -1 && i.splice(n, 1);
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
key: "unlock",
|
|
238
|
+
value: function() {
|
|
239
|
+
var e = this.player, t = this.pos;
|
|
240
|
+
if (t.isEnter = !1, t.isLocked = !1, !e.isMini) {
|
|
241
|
+
if (this.unbind("mousemove", this.onMoveOnly), t.isDown) {
|
|
242
|
+
this.unbind("mouseleave", this.onMouseLeave);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.blur();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}, {
|
|
249
|
+
key: "bindDomEvents",
|
|
250
|
+
value: function() {
|
|
251
|
+
var e = this.player.config;
|
|
252
|
+
this._mouseDownHandlerHook = this.hook("dragstart", this._mouseDownHandler), this._mouseUpHandlerHook = this.hook("dragend", this._mouseUpHandler), this._mouseMoveHandlerHook = this.hook("drag", this._mouseMoveHandler), (this.domEventType === "touch" || this.domEventType === "compatible") && this.root.addEventListener("touchstart", this.onMouseDown), (this.domEventType === "mouse" || this.domEventType === "compatible") && (this.bind("mousedown", this.onMouseDown), e.isMobileSimulateMode !== "mobile" && this.bind("mouseenter", this.onMouseEnter), this.bind("mouseover", this.onMouseOver), this.bind("mouseout", this.onMouseOut), this.player.root.addEventListener("click", this.onBodyClick, !0));
|
|
253
|
+
}
|
|
254
|
+
}, {
|
|
255
|
+
key: "focus",
|
|
256
|
+
value: function() {
|
|
257
|
+
this.player.controls.pauseAutoHide(), l.addClass(this.root, "active");
|
|
258
|
+
}
|
|
259
|
+
}, {
|
|
260
|
+
key: "blur",
|
|
261
|
+
value: function() {
|
|
262
|
+
this._disableBlur || (this.player.controls.recoverAutoHide(), l.removeClass(this.root, "active"));
|
|
263
|
+
}
|
|
264
|
+
}, {
|
|
265
|
+
key: "disableBlur",
|
|
266
|
+
value: function() {
|
|
267
|
+
this._disableBlur = !0;
|
|
268
|
+
}
|
|
269
|
+
}, {
|
|
270
|
+
key: "enableBlur",
|
|
271
|
+
value: function() {
|
|
272
|
+
this._disableBlur = !1;
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
key: "updateWidth",
|
|
276
|
+
value: function(e, t, i, n) {
|
|
277
|
+
var o = this.config, s = this.player;
|
|
278
|
+
if (!(o.isCloseClickSeek && n === 0)) {
|
|
279
|
+
var a = t = t >= s.duration ? s.duration - o.endedDiff : Number(t).toFixed(1);
|
|
280
|
+
this.updatePercent(i), this.updateTime(e), !(n === 1 && (!o.isDraggingSeek || s.config.mediaType === "audio")) && (this._state.now = a, this._state.direc = a > s.currentTime ? 0 : 1, s.seek(a));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
key: "computeTime",
|
|
285
|
+
value: function(e, t) {
|
|
286
|
+
var i = this.player, n = this.root.getBoundingClientRect(), o = n.width, s = n.height, a = n.top, f = n.left, u, h, d = t;
|
|
287
|
+
i.rotateDeg === 90 ? (u = s, h = a) : (u = o, h = f);
|
|
288
|
+
var v = d - h;
|
|
289
|
+
v = v > u ? u : v < 0 ? 0 : v;
|
|
290
|
+
var g = v / u;
|
|
291
|
+
g = g < 0 ? 0 : g > 1 ? 1 : g, Number.isNaN(g) && (g = this.player.currentTime / this.offsetDuration);
|
|
292
|
+
var y = parseInt(g * this.offsetDuration * 1e3, 10) / 1e3, C = l.getCurrentTimeByOffset(y, i.timeSegments);
|
|
293
|
+
return {
|
|
294
|
+
percent: g,
|
|
295
|
+
currentTime: y,
|
|
296
|
+
seekTime: C,
|
|
297
|
+
offset: v,
|
|
298
|
+
width: u,
|
|
299
|
+
left: h,
|
|
300
|
+
e
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}, {
|
|
304
|
+
key: "updateTime",
|
|
305
|
+
value: function(e) {
|
|
306
|
+
var t = this.player, i = this.duration;
|
|
307
|
+
e > i ? e = i : e < 0 && (e = 0);
|
|
308
|
+
var n = t.plugins.time;
|
|
309
|
+
n && n.updateTime(e);
|
|
310
|
+
}
|
|
311
|
+
}, {
|
|
312
|
+
key: "resetSeekState",
|
|
313
|
+
value: function() {
|
|
314
|
+
this.isProgressMoving = !1;
|
|
315
|
+
var e = this.player.plugins.time;
|
|
316
|
+
e && e.resetActive();
|
|
317
|
+
}
|
|
318
|
+
}, {
|
|
319
|
+
key: "updatePercent",
|
|
320
|
+
value: function(e, t) {
|
|
321
|
+
if (this.isProgressMoving = !0, !this.config.disable) {
|
|
322
|
+
e = e > 1 ? 1 : e < 0 ? 0 : e, this.progressBtn.style.left = "".concat(e * 100, "%"), this.innerList.update({
|
|
323
|
+
played: e * this.offsetDuration
|
|
324
|
+
}, this.offsetDuration);
|
|
325
|
+
var i = this.player.plugins.miniprogress;
|
|
326
|
+
i && i.update({
|
|
327
|
+
played: e * this.offsetDuration
|
|
328
|
+
}, this.offsetDuration);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
key: "onTimeupdate",
|
|
333
|
+
value: function(e) {
|
|
334
|
+
var t = this.player, i = this._state, n = this.offsetDuration;
|
|
335
|
+
if (!(t.isSeeking && t.media.seeking || this.isProgressMoving || !t.hasStart)) {
|
|
336
|
+
if (i.now > -1) {
|
|
337
|
+
var o = parseInt(i.now * 1e3, 10) - parseInt(t.currentTime * 1e3, 10);
|
|
338
|
+
if (i.direc === 0 && o > 300 || i.direc === 1 && o > -300) {
|
|
339
|
+
i.now = -1;
|
|
340
|
+
return;
|
|
341
|
+
} else
|
|
342
|
+
i.now = -1;
|
|
343
|
+
}
|
|
344
|
+
var s = this.currentTime;
|
|
345
|
+
s = l.adjustTimeByDuration(s, n, e), this.innerList.update({
|
|
346
|
+
played: s
|
|
347
|
+
}, n), this.progressBtn.style.left = "".concat(s / n * 100, "%");
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}, {
|
|
351
|
+
key: "onCacheUpdate",
|
|
352
|
+
value: function(e) {
|
|
353
|
+
var t = this.player, i = this.duration;
|
|
354
|
+
if (t) {
|
|
355
|
+
var n = t.bufferedPoint.end;
|
|
356
|
+
n = l.adjustTimeByDuration(n, i, e), this.innerList.update({
|
|
357
|
+
cached: n
|
|
358
|
+
}, i);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}, {
|
|
362
|
+
key: "onReset",
|
|
363
|
+
value: function() {
|
|
364
|
+
this.innerList.update({
|
|
365
|
+
played: 0,
|
|
366
|
+
cached: 0
|
|
367
|
+
}, 0), this.progressBtn.style.left = "0%";
|
|
368
|
+
}
|
|
369
|
+
}, {
|
|
370
|
+
key: "destroy",
|
|
371
|
+
value: function() {
|
|
372
|
+
var e = this.player;
|
|
373
|
+
this.thumbnailPlugin = null, this.innerList.destroy(), this.innerList = null;
|
|
374
|
+
var t = this.domEventType;
|
|
375
|
+
(t === "touch" || t === "compatible") && (this.root.removeEventListener("touchstart", this.onMouseDown), this.root.removeEventListener("touchmove", this.onMouseMove), this.root.removeEventListener("touchend", this.onMouseUp), this.root.removeEventListener("touchcancel", this.onMouseUp)), (t === "mouse" || t === "compatible") && (this.unbind("mousedown", this.onMouseDown), this.unbind("mouseenter", this.onMouseEnter), this.unbind("mousemove", this.onMoveOnly), this.unbind("mouseleave", this.onMouseLeave), document.removeEventListener("mousemove", this.onMouseMove, !1), document.removeEventListener("mouseup", this.onMouseUp, !1), e.root.removeEventListener("click", this.onBodyClick, !0));
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
key: "render",
|
|
379
|
+
value: function() {
|
|
380
|
+
if (!(this.config.disable || this.playerConfig.isLive)) {
|
|
381
|
+
var e = this.player.controls ? this.player.controls.config.mode : "", t = e === "bottom" ? "xgplayer-progress-bottom" : "";
|
|
382
|
+
return `
|
|
383
|
+
<xg-progress class="xgplayer-progress `.concat(t, `">
|
|
384
|
+
<xg-outer class="xgplayer-progress-outer">
|
|
385
|
+
<xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>
|
|
386
|
+
</xg-outer>
|
|
387
|
+
</xg-progress>
|
|
388
|
+
`);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}], [{
|
|
392
|
+
key: "pluginName",
|
|
393
|
+
get: function() {
|
|
394
|
+
return "progress";
|
|
395
|
+
}
|
|
396
|
+
}, {
|
|
397
|
+
key: "defaultConfig",
|
|
398
|
+
get: function() {
|
|
399
|
+
return {
|
|
400
|
+
position: A.CONTROLS_CENTER,
|
|
401
|
+
index: 0,
|
|
402
|
+
disable: !1,
|
|
403
|
+
isDraggingSeek: !0,
|
|
404
|
+
closeMoveSeek: !1,
|
|
405
|
+
isPauseMoving: !1,
|
|
406
|
+
isCloseClickSeek: !1,
|
|
407
|
+
fragments: [{
|
|
408
|
+
percent: 1
|
|
409
|
+
}],
|
|
410
|
+
fragFocusClass: _.POINT,
|
|
411
|
+
fragClass: "",
|
|
412
|
+
fragAutoFocus: !1,
|
|
413
|
+
miniMoveStep: 5,
|
|
414
|
+
miniStartStep: 2,
|
|
415
|
+
onMoveStart: function() {
|
|
416
|
+
},
|
|
417
|
+
onMoveEnd: function() {
|
|
418
|
+
},
|
|
419
|
+
endedDiff: 0.2
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
key: "FRAGMENT_FOCUS_CLASS",
|
|
424
|
+
get: function() {
|
|
425
|
+
return _;
|
|
426
|
+
}
|
|
427
|
+
}]), m;
|
|
428
|
+
})(F);
|
|
429
|
+
export {
|
|
430
|
+
Y as default
|
|
431
|
+
};
|