@xiping/react-components 1.0.50 → 1.0.52
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/components/gradient-text/index.js +1 -1
- package/dist/cjs/components/message/Message.js +1 -1
- package/dist/cjs/components/subtitle-player/CurrentMode.d.ts +20 -0
- package/dist/cjs/components/subtitle-player/CurrentMode.js +2 -0
- package/dist/cjs/components/subtitle-player/LyricsMode.d.ts +26 -0
- package/dist/cjs/components/subtitle-player/LyricsMode.js +2 -0
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.d.ts +3 -2
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +1 -3
- package/dist/cjs/components/subtitle-player/utils.d.ts +28 -0
- package/dist/cjs/components/subtitle-player/utils.js +1 -0
- package/dist/cjs/components/text-animate/TextAnimate.js +1 -1
- package/dist/cjs/components/text-type/TextType.js +1 -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.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -1
- package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
- package/dist/cjs/react-components.css +1 -1
- package/dist/es/components/gradient-text/index.js +8 -8
- package/dist/es/components/message/Message.js +72 -72
- package/dist/es/components/subtitle-player/CurrentMode.d.ts +20 -0
- package/dist/es/components/subtitle-player/CurrentMode.js +40 -0
- package/dist/es/components/subtitle-player/LyricsMode.d.ts +26 -0
- package/dist/es/components/subtitle-player/LyricsMode.js +67 -0
- package/dist/es/components/subtitle-player/SubtitlePlayer.d.ts +3 -2
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +121 -238
- package/dist/es/components/subtitle-player/utils.d.ts +28 -0
- package/dist/es/components/subtitle-player/utils.js +72 -0
- package/dist/es/components/text-animate/TextAnimate.js +0 -1
- package/dist/es/components/text-type/TextType.js +31 -31
- package/dist/es/components/txt-reader/TxtReader.js +9 -9
- package/dist/es/components/txt-reader/index.module.css.js +7 -8
- package/dist/es/components/variable-proximity/index.js +8 -9
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +64 -64
- package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
- package/dist/es/react-components.css +1 -1
- package/package.json +15 -15
- package/dist/cjs/_virtual/_commonjsHelpers.js +0 -1
- package/dist/cjs/_virtual/delegate.js +0 -1
- package/dist/cjs/_virtual/download.js +0 -1
- package/dist/cjs/_virtual/download2.js +0 -1
- package/dist/cjs/_virtual/index.js +0 -1
- package/dist/cjs/_virtual/index2.js +0 -1
- package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +0 -1
- package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +0 -1
- package/dist/cjs/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +0 -3
- package/dist/cjs/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +0 -15
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +0 -8
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +0 -12
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +0 -7
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +0 -3
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +0 -9
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +0 -13
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +0 -19
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +0 -8
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +0 -7
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +0 -7
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +0 -11
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +0 -3
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +0 -3
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +0 -11
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +0 -1
- 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 +0 -1
- 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 +0 -1
- package/dist/es/_virtual/_commonjsHelpers.js +0 -6
- package/dist/es/_virtual/delegate.js +0 -7
- package/dist/es/_virtual/download.js +0 -7
- package/dist/es/_virtual/download2.js +0 -4
- package/dist/es/_virtual/index.js +0 -8
- package/dist/es/_virtual/index2.js +0 -4
- package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +0 -21
- package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +0 -29
- package/dist/es/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +0 -77
- package/dist/es/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +0 -111
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +0 -197
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +0 -7
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +0 -87
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +0 -64
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +0 -67
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +0 -45
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +0 -101
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +0 -79
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +0 -75
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +0 -79
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +0 -466
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +0 -1240
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +0 -207
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +0 -130
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +0 -366
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +0 -204
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +0 -14
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +0 -81
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +0 -20
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +0 -13
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +0 -17
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +0 -12
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +0 -35
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +0 -12
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +0 -79
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +0 -193
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +0 -141
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +0 -171
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +0 -105
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +0 -110
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +0 -83
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +0 -232
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +0 -42
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +0 -68
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +0 -116
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +0 -68
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +0 -150
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +0 -96
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +0 -299
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +0 -46
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +0 -171
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +0 -169
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +0 -55
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +0 -448
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +0 -138
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +0 -122
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +0 -216
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +0 -102
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +0 -78
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +0 -100
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +0 -119
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +0 -431
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +0 -215
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +0 -93
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +0 -175
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +0 -292
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +0 -86
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +0 -92
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +0 -106
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +0 -134
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +0 -222
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +0 -152
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +0 -134
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +0 -164
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +0 -146
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +0 -206
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +0 -53
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +0 -61
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +0 -13
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +0 -34
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +0 -83
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +0 -34
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +0 -271
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +0 -111
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +0 -517
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +0 -25
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +0 -4
- 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 +0 -19
- 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 +0 -14
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { createClass as g, classCallCheck as p } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
-
import o from "../../utils/util.js";
|
|
3
|
-
import "../../../../../../../../_virtual/delegate.js";
|
|
4
|
-
var v = [{
|
|
5
|
-
tag: "xg-cache",
|
|
6
|
-
className: "xgplayer-progress-cache",
|
|
7
|
-
styleKey: "cachedColor"
|
|
8
|
-
}, {
|
|
9
|
-
tag: "xg-played",
|
|
10
|
-
className: "xgplayer-progress-played",
|
|
11
|
-
styleKey: "playedColor"
|
|
12
|
-
}], C = /* @__PURE__ */ (function() {
|
|
13
|
-
function c(a) {
|
|
14
|
-
p(this, c), this.fragments = a.fragments || [], this.fragments.length === 0 && this.fragments.push({
|
|
15
|
-
percent: 1
|
|
16
|
-
}), this._callBack = a.actionCallback, this.fragConfig = {
|
|
17
|
-
fragFocusClass: a.fragFocusClass || "inner-focus-point",
|
|
18
|
-
fragAutoFocus: !!a.fragAutoFocus,
|
|
19
|
-
fragClass: a.fragClass || ""
|
|
20
|
-
}, this.style = a.style || {
|
|
21
|
-
playedColor: "",
|
|
22
|
-
cachedColor: "",
|
|
23
|
-
progressColor: ""
|
|
24
|
-
}, this.duration = 0, this.cachedIndex = 0, this.playedIndex = 0, this.focusIndex = -1;
|
|
25
|
-
}
|
|
26
|
-
return g(c, [{
|
|
27
|
-
key: "updateDuration",
|
|
28
|
-
value: function(t) {
|
|
29
|
-
var e = this;
|
|
30
|
-
this.duration = t;
|
|
31
|
-
var r = 0, s = this.fragments;
|
|
32
|
-
this.fragments = s.map(function(n) {
|
|
33
|
-
return n.start = parseInt(r, 10), n.end = parseInt(r + n.percent * e.duration, 10), n.duration = parseInt(n.percent * e.duration, 10), r += n.percent * e.duration, n;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
key: "updateProgress",
|
|
38
|
-
value: function() {
|
|
39
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "played", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
40
|
-
newIndex: 0,
|
|
41
|
-
curIndex: 0,
|
|
42
|
-
millisecond: 0
|
|
43
|
-
}, r = this.progressList, s = this.fragments;
|
|
44
|
-
if (!(r.length < 1)) {
|
|
45
|
-
var n = e.newIndex, i = e.curIndex, h = e.millisecond;
|
|
46
|
-
n !== i && r.map(function(u, f) {
|
|
47
|
-
f < n ? u[t].style.width = "100%" : f > n && (u[t].style.width = 0);
|
|
48
|
-
});
|
|
49
|
-
var l = s[n], d = h === 0 ? 0 : (h - l.start) / l.duration;
|
|
50
|
-
r[n][t].style.width = d < 0 ? 0 : "".concat(d * 100, "%");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "updateFocus",
|
|
55
|
-
value: function(t) {
|
|
56
|
-
if (!(!this.fragConfig.fragAutoFocus || this.fragments.length < 2)) {
|
|
57
|
-
if (!t) {
|
|
58
|
-
if (this.focusIndex > -1) {
|
|
59
|
-
this.unHightLight(this.focusIndex);
|
|
60
|
-
var e = {
|
|
61
|
-
index: -1,
|
|
62
|
-
preIndex: this.focusIndex,
|
|
63
|
-
fragment: null
|
|
64
|
-
};
|
|
65
|
-
this._callBack && this._callBack(e), this.focusIndex = -1;
|
|
66
|
-
}
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
var r = this.findIndex(t.currentTime * 1e3, this.focusIndex);
|
|
70
|
-
if (r >= 0 && r !== this.focusIndex) {
|
|
71
|
-
this.focusIndex > -1 && this.unHightLight(this.focusIndex), this.setHightLight(r);
|
|
72
|
-
var s = {
|
|
73
|
-
index: r,
|
|
74
|
-
preIndex: this.focusIndex,
|
|
75
|
-
fragment: this.fragments[this.focusIndex]
|
|
76
|
-
};
|
|
77
|
-
this.focusIndex = r, this._callBack && this._callBack(s);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: "update",
|
|
83
|
-
value: function() {
|
|
84
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
85
|
-
cached: 0,
|
|
86
|
-
played: 0
|
|
87
|
-
}, e = arguments.length > 1 ? arguments[1] : void 0;
|
|
88
|
-
if (!this.duration || parseInt(e * 1e3, 10) !== this.duration) {
|
|
89
|
-
if (!e && e !== 0)
|
|
90
|
-
return;
|
|
91
|
-
this.updateDuration(parseInt(e * 1e3, 10));
|
|
92
|
-
}
|
|
93
|
-
var r = this.playedIndex, s = this.cachedIndex;
|
|
94
|
-
if (o.typeOf(t.played) !== "Undefined") {
|
|
95
|
-
var n = this.findIndex(t.played * 1e3, r);
|
|
96
|
-
if (n < 0)
|
|
97
|
-
return;
|
|
98
|
-
this.updateProgress("played", {
|
|
99
|
-
newIndex: n,
|
|
100
|
-
curIndex: r,
|
|
101
|
-
millisecond: parseInt(t.played * 1e3, 10)
|
|
102
|
-
}), this.playedIndex = n;
|
|
103
|
-
}
|
|
104
|
-
if (o.typeOf(t.cached) !== "Undefined") {
|
|
105
|
-
var i = this.findIndex(t.cached * 1e3, s);
|
|
106
|
-
if (i < 0)
|
|
107
|
-
return;
|
|
108
|
-
this.updateProgress("cached", {
|
|
109
|
-
newIndex: i,
|
|
110
|
-
curIndex: s,
|
|
111
|
-
millisecond: parseInt(t.cached * 1e3, 10)
|
|
112
|
-
}), this.cachedIndex = i;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}, {
|
|
116
|
-
key: "findIndex",
|
|
117
|
-
value: function(t, e) {
|
|
118
|
-
var r = this.fragments;
|
|
119
|
-
if (!r || r.length === 0)
|
|
120
|
-
return -1;
|
|
121
|
-
if (r.length === 1)
|
|
122
|
-
return 0;
|
|
123
|
-
if (e > -1 && e < r.length && t > r[e].start && t < r[e].end)
|
|
124
|
-
return e;
|
|
125
|
-
if (t > r[r.length - 1].start)
|
|
126
|
-
return r.length - 1;
|
|
127
|
-
for (var s = 0; s < r.length; s++)
|
|
128
|
-
if (t > r[s].start && t <= r[s].end) {
|
|
129
|
-
e = s;
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
return e;
|
|
133
|
-
}
|
|
134
|
-
}, {
|
|
135
|
-
key: "findHightLight",
|
|
136
|
-
value: function() {
|
|
137
|
-
for (var t = this.root.children, e = 0; e < t.length; e++)
|
|
138
|
-
if (o.hasClass(t[e], this.fragConfig.fragFocusClass))
|
|
139
|
-
return {
|
|
140
|
-
dom: t[e],
|
|
141
|
-
pos: t[e].getBoundingClientRect()
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}, {
|
|
145
|
-
key: "findFragment",
|
|
146
|
-
value: function(t) {
|
|
147
|
-
var e = this.root.children;
|
|
148
|
-
return t < 0 || t >= e.length ? null : {
|
|
149
|
-
dom: e[t],
|
|
150
|
-
pos: e[t].getBoundingClientRect()
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "unHightLight",
|
|
155
|
-
value: function() {
|
|
156
|
-
for (var t = this.root.children, e = 0; e < t.length; e++)
|
|
157
|
-
o.removeClass(t[e], this.fragConfig.fragFocusClass);
|
|
158
|
-
}
|
|
159
|
-
}, {
|
|
160
|
-
key: "setHightLight",
|
|
161
|
-
value: function(t) {
|
|
162
|
-
var e = this.root.children;
|
|
163
|
-
if (t < e.length)
|
|
164
|
-
return o.addClass(e[t], this.fragConfig.fragFocusClass), {
|
|
165
|
-
dom: e[t],
|
|
166
|
-
pos: e[t].getBoundingClientRect()
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
}, {
|
|
170
|
-
key: "destroy",
|
|
171
|
-
value: function() {
|
|
172
|
-
this.progressList = null, this.fragments = null, this.root.innerHTML = "";
|
|
173
|
-
}
|
|
174
|
-
}, {
|
|
175
|
-
key: "reset",
|
|
176
|
-
value: function(t) {
|
|
177
|
-
var e = this;
|
|
178
|
-
if (Object.keys(this.fragConfig).forEach(function(s) {
|
|
179
|
-
t[s] !== void 0 && (e.fragConfig[s] = t[s]);
|
|
180
|
-
}), t.fragments) {
|
|
181
|
-
if (this.fragments = t.fragments.length === 0 ? [{
|
|
182
|
-
percent: 1
|
|
183
|
-
}] : t.fragments, this.updateDuration(this.duration), this.playedIndex = 0, this.cachedIndex = 0, this.root)
|
|
184
|
-
for (var r = this.root.children; r.length > 0; )
|
|
185
|
-
this.root.removeChild(r[0]);
|
|
186
|
-
this.render();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}, {
|
|
190
|
-
key: "render",
|
|
191
|
-
value: function() {
|
|
192
|
-
var t = this, e = this.style.progressColor;
|
|
193
|
-
if (this.root || (this.root = o.createDom("xg-inners", "", {}, "progress-list")), this.fragments) {
|
|
194
|
-
var r = this.fragConfig, s = r.fragClass, n = r.fragFocusClass;
|
|
195
|
-
this.progressList = this.fragments.map(function(i) {
|
|
196
|
-
var h = o.createDom("xg-inner", "", {
|
|
197
|
-
style: e ? "background:".concat(e, "; flex: ").concat(i.percent) : "flex: ".concat(i.percent)
|
|
198
|
-
}, "".concat(i.isFocus ? n : "", " xgplayer-progress-inner ").concat(s));
|
|
199
|
-
return t.root.appendChild(h), v.forEach(function(l) {
|
|
200
|
-
h.appendChild(o.createDom(l.tag, "", {
|
|
201
|
-
style: l.styleKey ? "background: ".concat(t.style[l.styleKey], "; width:0;") : "width:0;"
|
|
202
|
-
}, l.className));
|
|
203
|
-
}), {
|
|
204
|
-
cached: h.children[0],
|
|
205
|
-
played: h.children[1]
|
|
206
|
-
};
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
return this.root;
|
|
210
|
-
}
|
|
211
|
-
}]), c;
|
|
212
|
-
})();
|
|
213
|
-
export {
|
|
214
|
-
C as default
|
|
215
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { inherits as d, createSuper as f, classCallCheck as m, defineProperty as y, assertThisInitialized as h, createClass as v } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
-
import C from "../../utils/util.js";
|
|
3
|
-
import { TIME_UPDATE as T, EMPTIED as x } from "../../events.js";
|
|
4
|
-
import _ from "../../plugin/plugin.js";
|
|
5
|
-
function g(o) {
|
|
6
|
-
return o ? "background:".concat(o, ";") : "";
|
|
7
|
-
}
|
|
8
|
-
var I = /* @__PURE__ */ (function(o) {
|
|
9
|
-
d(n, o);
|
|
10
|
-
var l = f(n);
|
|
11
|
-
function n() {
|
|
12
|
-
var e;
|
|
13
|
-
m(this, n);
|
|
14
|
-
for (var r = arguments.length, t = new Array(r), i = 0; i < r; i++)
|
|
15
|
-
t[i] = arguments[i];
|
|
16
|
-
return e = l.call.apply(l, [this].concat(t)), y(h(e), "onTimeupdate", function() {
|
|
17
|
-
var c = e.player.ended, u = h(e), s = u.offsetDuration, a = e.currentTime;
|
|
18
|
-
a = C.adjustTimeByDuration(a, s, c), e.update({
|
|
19
|
-
played: a
|
|
20
|
-
}, s);
|
|
21
|
-
}), e;
|
|
22
|
-
}
|
|
23
|
-
return v(n, [{
|
|
24
|
-
key: "offsetDuration",
|
|
25
|
-
get: function() {
|
|
26
|
-
return this.playerConfig.customDuration || this.player.offsetDuration || this.player.duration;
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
key: "currentTime",
|
|
30
|
-
get: function() {
|
|
31
|
-
var r = this.player, t = r.offsetCurrentTime, i = r.currentTime;
|
|
32
|
-
return t >= 0 ? t : i;
|
|
33
|
-
}
|
|
34
|
-
}, {
|
|
35
|
-
key: "afterCreate",
|
|
36
|
-
value: function() {
|
|
37
|
-
var r = this;
|
|
38
|
-
this.root && (this.on(T, this.onTimeupdate), this.on(x, function() {
|
|
39
|
-
r.reset();
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
key: "reset",
|
|
44
|
-
value: function() {
|
|
45
|
-
this.update({
|
|
46
|
-
played: 0,
|
|
47
|
-
cached: 0
|
|
48
|
-
}, 0);
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
key: "update",
|
|
52
|
-
value: function() {
|
|
53
|
-
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
54
|
-
cached: 0,
|
|
55
|
-
played: 0
|
|
56
|
-
}, t = arguments.length > 1 ? arguments[1] : void 0;
|
|
57
|
-
!t || !this.root || (r.cached && (this.find("xg-mini-progress-cache").style.width = "".concat(r.cached / t * 100, "%")), r.played && (this.find("xg-mini-progress-played").style.width = "".concat(r.played / t * 100, "%")));
|
|
58
|
-
}
|
|
59
|
-
}, {
|
|
60
|
-
key: "render",
|
|
61
|
-
value: function() {
|
|
62
|
-
var r = this.playerConfig, t = r.commonStyle, i = r.miniprogress;
|
|
63
|
-
if (i) {
|
|
64
|
-
var c = this.config, u = c.mode, s = c.height, a = {
|
|
65
|
-
cached: g(t.cachedColor),
|
|
66
|
-
played: g(t.playedColor),
|
|
67
|
-
progress: g(t.progressColor),
|
|
68
|
-
height: s > 0 && s !== 2 ? "height: ".concat(s, "px;") : ""
|
|
69
|
-
}, p = u === "show" ? "xg-mini-progress-show" : "";
|
|
70
|
-
return '<xg-mini-progress class="xg-mini-progress '.concat(p, '" style="').concat(a.progress, " ").concat(a.height, `">
|
|
71
|
-
<xg-mini-progress-cache class="xg-mini-progress-cache" style="`).concat(a.cached, `"></xg-mini-progress-cache>
|
|
72
|
-
<xg-mini-progress-played class="xg-mini-progress-played" style="`).concat(a.played, `"></xg-mini-progress-played>
|
|
73
|
-
</xg-mini-progress>`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}], [{
|
|
77
|
-
key: "pluginName",
|
|
78
|
-
get: function() {
|
|
79
|
-
return "MiniProgress";
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: "defaultConfig",
|
|
83
|
-
get: function() {
|
|
84
|
-
return {
|
|
85
|
-
mode: "auto",
|
|
86
|
-
height: 2
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}]), n;
|
|
90
|
-
})(_);
|
|
91
|
-
export {
|
|
92
|
-
I as default
|
|
93
|
-
};
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import p from "../../utils/util.js";
|
|
2
|
-
import { DURATION_CHANGE as g, VIDEO_RESIZE as v } from "../../events.js";
|
|
3
|
-
import "../../../../../../../../_virtual/delegate.js";
|
|
4
|
-
var d = {
|
|
5
|
-
time: 0,
|
|
6
|
-
text: "",
|
|
7
|
-
id: 1,
|
|
8
|
-
duration: 1,
|
|
9
|
-
color: "#fff",
|
|
10
|
-
style: {},
|
|
11
|
-
width: 6,
|
|
12
|
-
height: 6
|
|
13
|
-
};
|
|
14
|
-
function h(r) {
|
|
15
|
-
Object.keys(d).map(function(t) {
|
|
16
|
-
r[t] === void 0 && (r[t] = d[t]);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
var u = {
|
|
20
|
-
_updateDotDom: function(t, e) {
|
|
21
|
-
if (e) {
|
|
22
|
-
var s = this.calcuPosition(t.time, t.duration), i = t.style || {};
|
|
23
|
-
i.left = "".concat(s.left, "%"), i.width = "".concat(s.width, "%"), e.setAttribute("data-text", t.text), e.setAttribute("data-time", t.time), s.isMini ? p.addClass(e, "mini") : p.removeClass(e, "mini"), Object.keys(i).map(function(o) {
|
|
24
|
-
e.style[o] = i[o];
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
initDots: function() {
|
|
29
|
-
var t = this;
|
|
30
|
-
this._ispots.map(function(e) {
|
|
31
|
-
t.createDot(e, !1);
|
|
32
|
-
}), this.ispotsInit = !0;
|
|
33
|
-
},
|
|
34
|
-
createDot: function(t) {
|
|
35
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, s = this.player.plugins.progress;
|
|
36
|
-
if (s && (e && (h(t), this._ispots.push(t)), !(!this.ispotsInit && e))) {
|
|
37
|
-
var i = this.calcuPosition(t.time, t.duration), o = t.style || {};
|
|
38
|
-
o.left = "".concat(i.left, "%"), o.width = "".concat(i.width, "%");
|
|
39
|
-
var a = "xgspot_".concat(t.id, " xgplayer-spot");
|
|
40
|
-
i.isMini && (a += " mini");
|
|
41
|
-
var n = t.template ? '<div class="xgplayer-spot-pop">'.concat(t.template, "</div>") : "", f = p.createDom("xg-spot", n, {
|
|
42
|
-
"data-text": t.text,
|
|
43
|
-
"data-time": t.time,
|
|
44
|
-
"data-id": t.id
|
|
45
|
-
}, a);
|
|
46
|
-
Object.keys(o).map(function(l) {
|
|
47
|
-
f.style[l] = o[l];
|
|
48
|
-
}), s.outer && s.outer.appendChild(f), this.positionDot(f, t.id);
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
findDot: function(t) {
|
|
52
|
-
if (this.player.plugins.progress) {
|
|
53
|
-
var e = this._ispots.filter(function(s, i) {
|
|
54
|
-
return s.id === t;
|
|
55
|
-
});
|
|
56
|
-
return e.length > 0 ? e[0] : null;
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
updateDot: function(t) {
|
|
60
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, s = this.player.plugins.progress;
|
|
61
|
-
if (s) {
|
|
62
|
-
var i = this.findDot(t.id);
|
|
63
|
-
if (i && Object.keys(t).map(function(a) {
|
|
64
|
-
i[a] = t[a];
|
|
65
|
-
}), !!this.ispotsInit) {
|
|
66
|
-
var o = s.find('xg-spot[data-id="'.concat(t.id, '"]'));
|
|
67
|
-
o && (this._updateDotDom(t, o), e && this.showDot(t.id));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
deleteDot: function(t) {
|
|
72
|
-
var e = this._ispots, s = this.player.plugins.progress;
|
|
73
|
-
if (s) {
|
|
74
|
-
for (var i = [], o = 0; o < e.length; o++)
|
|
75
|
-
e[o].id === t && i.push(o);
|
|
76
|
-
for (var a = i.length, n = a - 1; n >= 0; n--)
|
|
77
|
-
if (e.splice(i[n], 1), this.ispotsInit) {
|
|
78
|
-
var f = s.find('xg-spot[data-id="'.concat(t, '"]'));
|
|
79
|
-
f && f.parentElement.removeChild(f);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
deleteAllDots: function() {
|
|
84
|
-
var t = this.player.plugins.progress;
|
|
85
|
-
if (t) {
|
|
86
|
-
if (!this.ispotsInit) {
|
|
87
|
-
this._ispots = [];
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
for (var e = t.root.getElementsByTagName("xg-spot"), s = e.length - 1; s >= 0; s--)
|
|
91
|
-
t.outer.removeChild(e[s]);
|
|
92
|
-
this._ispots = [];
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
updateAllDots: function() {
|
|
96
|
-
var t = this, e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = this.player.plugins.progress;
|
|
97
|
-
if (s) {
|
|
98
|
-
if (!this.ispotsInit) {
|
|
99
|
-
this._ispots = e;
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
this._ispots = [];
|
|
103
|
-
var i = s.root.getElementsByTagName("xg-spot"), o = i.length;
|
|
104
|
-
if (o > e.length)
|
|
105
|
-
for (var a = o - 1; a > e.length - 1; a--)
|
|
106
|
-
s.outer.removeChild(i[a]);
|
|
107
|
-
e.forEach(function(n, f) {
|
|
108
|
-
f < o ? (i[f].setAttribute("data-id", "".concat(n.id)), t._ispots.push(n), t.updateDot(n)) : t.createDot(n);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
positionDots: function() {
|
|
113
|
-
var t = this, e = this._ispots, s = this.playerSize, i = this.player.sizeInfo, o = this.player.plugins.progress;
|
|
114
|
-
!o || i.width === s.width || (s.width = i.width, s.left = i.left, e.forEach(function(a) {
|
|
115
|
-
var n = o.find('xg-spot[data-id="'.concat(a.id, '"]'));
|
|
116
|
-
n && t.positionDot(n, a.id);
|
|
117
|
-
}));
|
|
118
|
-
},
|
|
119
|
-
positionDot: function(t, e) {
|
|
120
|
-
var s = p.findDom(t, ".xgplayer-spot-pop");
|
|
121
|
-
if (s) {
|
|
122
|
-
var i = this.playerSize, o = t.getBoundingClientRect(), a = s.getBoundingClientRect(), n = o.left - i.left, f = i.width - n - o.width / 2;
|
|
123
|
-
if (n < a.width / 2 || i.width < a.width) {
|
|
124
|
-
var l = a.width / 2 - n;
|
|
125
|
-
s.style.left = "".concat(l, "px");
|
|
126
|
-
} else if (f < a.width / 2) {
|
|
127
|
-
var c = f - a.width / 2 + o.width / 2;
|
|
128
|
-
s.style.left = "".concat(c, "px");
|
|
129
|
-
} else
|
|
130
|
-
s.style.left = "50%";
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
updateDuration: function() {
|
|
134
|
-
var t = this, e = this.player.plugins.progress;
|
|
135
|
-
if (e) {
|
|
136
|
-
var s = this._ispots;
|
|
137
|
-
s.forEach(function(i) {
|
|
138
|
-
var o = e.find('xg-spot[data-id="'.concat(i.id, '"]'));
|
|
139
|
-
t._updateDotDom(i, o);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
getAllDotsDom: function() {
|
|
144
|
-
var t = this.player.plugins.progress;
|
|
145
|
-
if (!t)
|
|
146
|
-
return [];
|
|
147
|
-
var e = t.root.getElementsByTagName("xg-spot");
|
|
148
|
-
return e;
|
|
149
|
-
},
|
|
150
|
-
getDotDom: function(t) {
|
|
151
|
-
var e = this.player.plugins.progress;
|
|
152
|
-
if (e)
|
|
153
|
-
return e.find('xg-spot[data-id="'.concat(t, '"]'));
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
function _(r) {
|
|
157
|
-
var t = r.config, e = r.player;
|
|
158
|
-
Object.keys(u).map(function(i) {
|
|
159
|
-
r[i] = u[i].bind(r);
|
|
160
|
-
});
|
|
161
|
-
var s = e.config.progressDot || t.ispots || [];
|
|
162
|
-
r._ispots = s.map(function(i) {
|
|
163
|
-
return h(i), i;
|
|
164
|
-
}), r.ispotsInit = !1, r.playerSize = {
|
|
165
|
-
left: e.sizeInfo.left,
|
|
166
|
-
width: e.sizeInfo.width
|
|
167
|
-
}, r.on(g, function() {
|
|
168
|
-
r.ispotsInit ? r.updateDuration() : r.initDots();
|
|
169
|
-
}), r.on(v, function() {
|
|
170
|
-
r.positionDots();
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
export {
|
|
174
|
-
_ as default
|
|
175
|
-
};
|