@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,164 @@
|
|
|
1
|
+
import { inherits as l, createSuper as c, classCallCheck as f, createClass as d } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import t from "../../utils/util.js";
|
|
3
|
+
import { DURATION_CHANGE as p, SEEKED as h, TIME_UPDATE as D, ENDED as y, EMPTIED as v } from "../../events.js";
|
|
4
|
+
import g, { POSITIONS as T } from "../../plugin/plugin.js";
|
|
5
|
+
var L = /* @__PURE__ */ (function(m) {
|
|
6
|
+
l(o, m);
|
|
7
|
+
var u = c(o);
|
|
8
|
+
function o(i) {
|
|
9
|
+
var e;
|
|
10
|
+
return f(this, o), e = u.call(this, i), e.isActiving = !1, e;
|
|
11
|
+
}
|
|
12
|
+
return d(o, [{
|
|
13
|
+
key: "duration",
|
|
14
|
+
get: function() {
|
|
15
|
+
var e = this.player, n = e.offsetDuration, r = e.duration;
|
|
16
|
+
return this.playerConfig.customDuration || n || r;
|
|
17
|
+
}
|
|
18
|
+
}, {
|
|
19
|
+
key: "currentTime",
|
|
20
|
+
get: function() {
|
|
21
|
+
var e = this.player, n = e.offsetCurrentTime, r = e.currentTime;
|
|
22
|
+
return n >= 0 ? n : r;
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
key: "timeOffset",
|
|
26
|
+
get: function() {
|
|
27
|
+
return this.playerConfig.timeOffset || 0;
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
key: "afterCreate",
|
|
31
|
+
value: function() {
|
|
32
|
+
var e = this.player.controls.config.mode;
|
|
33
|
+
this.mode = e === "flex" ? "flex" : "normal", !this.config.disable && (this.mode === "flex" && (this.createCenterTime(), this.root.style.display = "none"), this.durationDom = this.find(".time-duration"), this.timeDom = this.find(".time-current"), this.listenEvents());
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "listenEvents",
|
|
37
|
+
value: function() {
|
|
38
|
+
var e = this;
|
|
39
|
+
this.on([p, h, D], function(n) {
|
|
40
|
+
n.eventName === "durationchange" && (e.isActiving = !1), e.onTimeUpdate();
|
|
41
|
+
}), this.on(y, function() {
|
|
42
|
+
e.onTimeUpdate(!0);
|
|
43
|
+
}), this.on(v, function() {
|
|
44
|
+
e.onReset();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
key: "show",
|
|
49
|
+
value: function(e) {
|
|
50
|
+
if (this.mode === "flex") {
|
|
51
|
+
this.centerCurDom && (this.centerCurDom.style.display = "block"), this.centerDurDom && (this.centerDurDom.style.display = "block");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.root.style.display = "block";
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "hide",
|
|
58
|
+
value: function() {
|
|
59
|
+
if (this.mode === "flex") {
|
|
60
|
+
this.centerCurDom && (this.centerCurDom.style.display = "none"), this.centerDurDom && (this.centerDurDom.style.display = "none");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.root.style.display = "none";
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
key: "onTimeUpdate",
|
|
67
|
+
value: function(e) {
|
|
68
|
+
var n = this.player, r = this.config, s = this.duration;
|
|
69
|
+
if (!(r.disable || this.isActiving || !n.hasStart)) {
|
|
70
|
+
var a = this.currentTime + this.timeOffset;
|
|
71
|
+
a = t.adjustTimeByDuration(a, s, e), this.mode === "flex" ? (this.centerCurDom.innerHTML = this.minWidthTime(t.format(a)), s !== 1 / 0 && s > 0 && (this.centerDurDom.innerHTML = t.format(s))) : (this.timeDom.innerHTML = this.minWidthTime(t.format(a)), s !== 1 / 0 && s > 0 && (this.durationDom.innerHTML = t.format(s)));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
key: "onReset",
|
|
76
|
+
value: function() {
|
|
77
|
+
this.mode === "flex" ? (this.centerCurDom.innerHTML = this.minWidthTime(t.format(0)), this.centerDurDom.innerHTML = t.format(0)) : (this.timeDom.innerHTML = this.minWidthTime(t.format(0)), this.durationDom.innerHTML = t.format(0));
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
key: "createCenterTime",
|
|
81
|
+
value: function() {
|
|
82
|
+
var e = this.player;
|
|
83
|
+
if (!(!e.controls || !e.controls.center)) {
|
|
84
|
+
var n = e.controls.center;
|
|
85
|
+
this.centerCurDom = t.createDom("xg-icon", "00:00", {}, "xgplayer-time xg-time-left"), this.centerDurDom = t.createDom("xg-icon", "00:00", {}, "xgplayer-time xg-time-right"), n.children.length > 0 ? n.insertBefore(this.centerCurDom, n.children[0]) : n.appendChild(this.centerCurDom), n.appendChild(this.centerDurDom), this.extraEls = [this.centerCurDom, this.centerDurDom];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
key: "afterPlayerInit",
|
|
90
|
+
value: function() {
|
|
91
|
+
var e = this.config;
|
|
92
|
+
if (this.duration === 1 / 0 || this.playerConfig.isLive ? (t.hide(this.durationDom), t.hide(this.timeDom), t.hide(this.find(".time-separator")), t.show(this.find(".time-live-tag"))) : t.hide(this.find(".time-live-tag")), e.hide) {
|
|
93
|
+
this.hide();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.show();
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
key: "changeLiveState",
|
|
100
|
+
value: function(e) {
|
|
101
|
+
e ? (t.hide(this.durationDom), t.hide(this.timeDom), t.hide(this.find(".time-separator")), t.show(this.find(".time-live-tag"))) : (t.hide(this.find(".time-live-tag")), t.show(this.find(".time-separator")), t.show(this.durationDom), t.show(this.timeDom));
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "updateTime",
|
|
105
|
+
value: function(e) {
|
|
106
|
+
if (this.isActiving = !0, !(!e && e !== 0 || e > this.duration)) {
|
|
107
|
+
if (this.mode === "flex") {
|
|
108
|
+
this.centerCurDom.innerHTML = this.minWidthTime(t.format(e));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.timeDom.innerHTML = this.minWidthTime(t.format(e));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
key: "minWidthTime",
|
|
116
|
+
value: function(e) {
|
|
117
|
+
return e.split(":").map(function(n) {
|
|
118
|
+
return '<span class="time-min-width">'.concat(n, "</span>");
|
|
119
|
+
}).join(":");
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
key: "resetActive",
|
|
123
|
+
value: function() {
|
|
124
|
+
var e = this, n = this.player, r = function() {
|
|
125
|
+
e.isActiving = !1;
|
|
126
|
+
};
|
|
127
|
+
this.off(h, r), n.isSeeking && n.media.seeking ? this.once(h, r) : this.isActiving = !1;
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
key: "destroy",
|
|
131
|
+
value: function() {
|
|
132
|
+
var e = this.player.controls.center;
|
|
133
|
+
this.centerCurDom && e.removeChild(this.centerCurDom), this.centerCurDom = null, this.centerDurDom && e.removeChild(this.centerDurDom), this.centerDurDom = null;
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
key: "render",
|
|
137
|
+
value: function() {
|
|
138
|
+
if (!this.config.disable)
|
|
139
|
+
return `<xg-icon class="xgplayer-time">
|
|
140
|
+
<span class="time-current">00:00</span>
|
|
141
|
+
<span class="time-separator">/</span>
|
|
142
|
+
<span class="time-duration">00:00</span>
|
|
143
|
+
<span class="time-live-tag">`.concat(this.i18n.LIVE_TIP, `</span>
|
|
144
|
+
</xg-icon>`);
|
|
145
|
+
}
|
|
146
|
+
}], [{
|
|
147
|
+
key: "pluginName",
|
|
148
|
+
get: function() {
|
|
149
|
+
return "time";
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "defaultConfig",
|
|
153
|
+
get: function() {
|
|
154
|
+
return {
|
|
155
|
+
position: T.CONTROLS_LEFT,
|
|
156
|
+
index: 2,
|
|
157
|
+
disable: !1
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}]), o;
|
|
161
|
+
})(g);
|
|
162
|
+
export {
|
|
163
|
+
L as default
|
|
164
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { inherits as y, createSuper as _, classCallCheck as S, defineProperty as c, assertThisInitialized as l, createClass as C } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import o from "../../utils/util.js";
|
|
3
|
+
import { DURATION_CHANGE as I, LOADED_DATA as k, TIME_UPDATE as E, SEEKING as P, PLAY as D } from "../../events.js";
|
|
4
|
+
import b from "../../plugin/basePlugin.js";
|
|
5
|
+
import "../../../../../../../../_virtual/delegate.js";
|
|
6
|
+
var L = /* @__PURE__ */ (function(T) {
|
|
7
|
+
y(m, T);
|
|
8
|
+
var d = _(m);
|
|
9
|
+
function m() {
|
|
10
|
+
var e;
|
|
11
|
+
S(this, m);
|
|
12
|
+
for (var i = arguments.length, a = new Array(i), s = 0; s < i; s++)
|
|
13
|
+
a[s] = arguments[s];
|
|
14
|
+
return e = d.call.apply(d, [this].concat(a)), c(l(e), "_onDurationChange", function() {
|
|
15
|
+
e.updateSegments();
|
|
16
|
+
var r = e.player, n = r.currentTime, t = r.timeSegments;
|
|
17
|
+
if (e._checkIfEnabled(t)) {
|
|
18
|
+
var u = o.getIndexByTime(n, t), f = o.getOffsetCurrentTime(n, t, u);
|
|
19
|
+
e.player.offsetCurrentTime = f, e.changeIndex(u, t);
|
|
20
|
+
}
|
|
21
|
+
}), c(l(e), "_onLoadedData", function() {
|
|
22
|
+
var r = e.player.timeSegments;
|
|
23
|
+
if (e._checkIfEnabled(r)) {
|
|
24
|
+
var n = o.getOffsetCurrentTime(0, r);
|
|
25
|
+
e.player.offsetCurrentTime = n, e.changeIndex(0, r), e.curPos.start > 0 && (e.player.currentTime = e.curPos.start);
|
|
26
|
+
}
|
|
27
|
+
}), c(l(e), "_onTimeupdate", function() {
|
|
28
|
+
var r = e.player, n = r.currentTime, t = r.timeSegments;
|
|
29
|
+
if (e._checkIfEnabled(t)) {
|
|
30
|
+
var u = t.length;
|
|
31
|
+
e.lastCurrentTime = n;
|
|
32
|
+
var f = o.getIndexByTime(n, t);
|
|
33
|
+
f !== e.curIndex && e.changeIndex(f, t);
|
|
34
|
+
var h = o.getOffsetCurrentTime(n, t, f);
|
|
35
|
+
if (e.player.offsetCurrentTime = h, !!e.curPos) {
|
|
36
|
+
var g = e.curPos, p = g.start, v = g.end;
|
|
37
|
+
n < p ? e.player.currentTime = p : n > v && f >= u - 1 && e.player.pause();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}), c(l(e), "_onSeeking", function() {
|
|
41
|
+
var r = e.player, n = r.currentTime, t = r.timeSegments;
|
|
42
|
+
if (e._checkIfEnabled(t))
|
|
43
|
+
if (n < t[0].start)
|
|
44
|
+
e.player.currentTime = t[0].start;
|
|
45
|
+
else if (n > t[t.length - 1].end)
|
|
46
|
+
e.player.currentTime = t[t.length - 1].end;
|
|
47
|
+
else {
|
|
48
|
+
var u = o.getIndexByTime(n, t);
|
|
49
|
+
if (u >= 0) {
|
|
50
|
+
var f = e.getSeekTime(n, e.lastCurrentTime, u, t);
|
|
51
|
+
f >= 0 && (e.player.currentTime = f);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}), c(l(e), "_onPlay", function() {
|
|
55
|
+
var r = e.player, n = r.currentTime, t = r.timeSegments;
|
|
56
|
+
e._checkIfEnabled(t) && n >= t[t.length - 1].end && (e.player.currentTime = t[0].start);
|
|
57
|
+
}), e;
|
|
58
|
+
}
|
|
59
|
+
return C(m, [{
|
|
60
|
+
key: "afterCreate",
|
|
61
|
+
value: function() {
|
|
62
|
+
this.curIndex = -1, this.curPos = null, this.lastCurrentTime = 0, this.updateSegments(), this.on(I, this._onDurationChange), this.on(k, this._onLoadedData), this.on(E, this._onTimeupdate), this.on(P, this._onSeeking), this.on(D, this._onPlay);
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
key: "setConfig",
|
|
66
|
+
value: function(i) {
|
|
67
|
+
var a = this;
|
|
68
|
+
if (i) {
|
|
69
|
+
var s = Object.keys(i);
|
|
70
|
+
s.length < 1 || (s.forEach(function(r) {
|
|
71
|
+
a.config[r] = i[r];
|
|
72
|
+
}), this.updateSegments());
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "updateSegments",
|
|
77
|
+
value: function() {
|
|
78
|
+
var i = this.config, a = i.disable, s = i.segments, r = this.player;
|
|
79
|
+
if (a || !s || s.length === 0)
|
|
80
|
+
r.timeSegments = [], r.offsetDuration = 0, r.offsetCurrentTime = -1;
|
|
81
|
+
else {
|
|
82
|
+
var n = this.formatTimeSegments(s, r.duration);
|
|
83
|
+
r.timeSegments = n, r.offsetDuration = n.length > 0 ? n[n.length - 1].duration : 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
key: "formatTimeSegments",
|
|
88
|
+
value: function(i, a) {
|
|
89
|
+
var s = [];
|
|
90
|
+
return i ? (i.sort(function(r, n) {
|
|
91
|
+
return r.start - n.start;
|
|
92
|
+
}), i.forEach(function(r, n) {
|
|
93
|
+
var t = {};
|
|
94
|
+
if (t.start = r.start < 0 ? 0 : r.start, t.end = a > 0 && r.end > a ? a : r.end, !(a > 0 && t.start > a)) {
|
|
95
|
+
s.push(t);
|
|
96
|
+
var u = t.end - t.start;
|
|
97
|
+
if (n === 0)
|
|
98
|
+
t.offset = r.start, t.cTime = 0, t.segDuration = u, t.duration = u;
|
|
99
|
+
else {
|
|
100
|
+
var f = s[n - 1];
|
|
101
|
+
t.offset = f.offset + (t.start - f.end), t.cTime = f.duration + f.cTime, t.segDuration = u, t.duration = f.duration + u;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}), s) : [];
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
key: "getSeekTime",
|
|
108
|
+
value: function(i, a, s, r) {
|
|
109
|
+
var n = -1, t = r[s], u = t.start, f = t.end;
|
|
110
|
+
if (i >= u && i <= f)
|
|
111
|
+
return n;
|
|
112
|
+
var h = i - a;
|
|
113
|
+
if (h < 0 && i < u) {
|
|
114
|
+
var g = a > u ? a - u : 0;
|
|
115
|
+
return n = s - 1 >= 0 ? r[s - 1].end + h + g : 0, n;
|
|
116
|
+
}
|
|
117
|
+
return -1;
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "_checkIfEnabled",
|
|
121
|
+
value: function(i) {
|
|
122
|
+
return !(!i || i.length < 1);
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
key: "changeIndex",
|
|
126
|
+
value: function(i, a) {
|
|
127
|
+
this.curIndex = i, i >= 0 && a.length > 0 ? this.curPos = a[i] : this.curPos = null;
|
|
128
|
+
}
|
|
129
|
+
}], [{
|
|
130
|
+
key: "pluginName",
|
|
131
|
+
get: function() {
|
|
132
|
+
return "TimeSegmentsControls";
|
|
133
|
+
}
|
|
134
|
+
}, {
|
|
135
|
+
key: "defaultConfig",
|
|
136
|
+
get: function() {
|
|
137
|
+
return {
|
|
138
|
+
disable: !0,
|
|
139
|
+
segments: []
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}]), m;
|
|
143
|
+
})(b);
|
|
144
|
+
export {
|
|
145
|
+
L as default
|
|
146
|
+
};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { inherits as M, createSuper as _, classCallCheck as x, defineProperty as h, assertThisInitialized as m, createClass as b } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import r from "../../utils/util.js";
|
|
3
|
+
import f from "../../utils/sniffer.js";
|
|
4
|
+
import { VOLUME_CHANGE as C, LOADED_DATA as V } from "../../events.js";
|
|
5
|
+
import I, { POSITIONS as S } from "../../plugin/plugin.js";
|
|
6
|
+
import k from "../assets/volumeLarge.js";
|
|
7
|
+
import B from "../assets/volumeSmall.js";
|
|
8
|
+
import w from "../assets/volumeMuted.js";
|
|
9
|
+
var E = /* @__PURE__ */ (function(y) {
|
|
10
|
+
M(v, y);
|
|
11
|
+
var p = _(v);
|
|
12
|
+
function v() {
|
|
13
|
+
var e;
|
|
14
|
+
x(this, v);
|
|
15
|
+
for (var t = arguments.length, i = new Array(t), o = 0; o < t; o++)
|
|
16
|
+
i[o] = arguments[o];
|
|
17
|
+
return e = p.call.apply(p, [this].concat(i)), h(m(e), "onBarMousedown", function(a) {
|
|
18
|
+
var s = m(e), n = s.player, l = e.find(".xgplayer-bar");
|
|
19
|
+
r.event(a);
|
|
20
|
+
var u = l.getBoundingClientRect(), d = r.getEventPos(a, n.zoom), c = u.height - (d.clientY - u.top);
|
|
21
|
+
if (d.h = c, d.barH = u.height, e.pos = d, !(c < -2))
|
|
22
|
+
return e.updateVolumePos(c, a), document.addEventListener("mouseup", e.onBarMouseUp), e._d.isStart = !0, !1;
|
|
23
|
+
}), h(m(e), "onBarMouseMove", function(a) {
|
|
24
|
+
var s = m(e), n = s._d;
|
|
25
|
+
if (n.isStart) {
|
|
26
|
+
var l = m(e), u = l.pos, d = l.player;
|
|
27
|
+
a.preventDefault(), a.stopPropagation(), r.event(a);
|
|
28
|
+
var c = r.getEventPos(a, d.zoom);
|
|
29
|
+
n.isMoving = !0;
|
|
30
|
+
var g = u.h - c.clientY + u.clientY;
|
|
31
|
+
g > u.barH || e.updateVolumePos(g, a);
|
|
32
|
+
}
|
|
33
|
+
}), h(m(e), "onBarMouseUp", function(a) {
|
|
34
|
+
r.event(a), document.removeEventListener("mouseup", e.onBarMouseUp);
|
|
35
|
+
var s = m(e), n = s._d;
|
|
36
|
+
n.isStart = !1, n.isMoving = !1;
|
|
37
|
+
}), h(m(e), "onMouseenter", function(a) {
|
|
38
|
+
e._d.isActive = !0, e.focus(), e.emit("icon_mouseenter", {
|
|
39
|
+
pluginName: e.pluginName
|
|
40
|
+
});
|
|
41
|
+
}), h(m(e), "onMouseleave", function(a) {
|
|
42
|
+
e._d.isActive = !1, e.unFocus(100, !1, a), e.emit("icon_mouseleave", {
|
|
43
|
+
pluginName: e.pluginName
|
|
44
|
+
});
|
|
45
|
+
}), h(m(e), "onVolumeChange", function(a) {
|
|
46
|
+
if (e.player) {
|
|
47
|
+
var s = e.player, n = s.muted, l = s.volume;
|
|
48
|
+
e._d.isMoving || (e.find(".xgplayer-drag").style.height = n || l === 0 ? "4px" : "".concat(l * 100, "%"), e.config.showValueLabel && e.updateVolumeValue()), e.animate(n, l);
|
|
49
|
+
}
|
|
50
|
+
}), e;
|
|
51
|
+
}
|
|
52
|
+
return b(v, [{
|
|
53
|
+
key: "registerIcons",
|
|
54
|
+
value: function() {
|
|
55
|
+
return {
|
|
56
|
+
volumeSmall: {
|
|
57
|
+
icon: B,
|
|
58
|
+
class: "xg-volume-small"
|
|
59
|
+
},
|
|
60
|
+
volumeLarge: {
|
|
61
|
+
icon: k,
|
|
62
|
+
class: "xg-volume"
|
|
63
|
+
},
|
|
64
|
+
volumeMuted: {
|
|
65
|
+
icon: w,
|
|
66
|
+
class: "xg-volume-mute"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "afterCreate",
|
|
72
|
+
value: function() {
|
|
73
|
+
var t = this;
|
|
74
|
+
if (this._timerId = null, this._d = {
|
|
75
|
+
isStart: !1,
|
|
76
|
+
isMoving: !1,
|
|
77
|
+
isActive: !1
|
|
78
|
+
}, !this.config.disable) {
|
|
79
|
+
this.initIcons();
|
|
80
|
+
var i = this.playerConfig, o = i.commonStyle, a = i.volume;
|
|
81
|
+
o.volumeColor && (this.find(".xgplayer-drag").style.backgroundColor = o.volumeColor), this.changeMutedHandler = this.hook("mutedChange", function(s) {
|
|
82
|
+
t.changeMuted(s);
|
|
83
|
+
}, {
|
|
84
|
+
pre: function(n) {
|
|
85
|
+
n.preventDefault(), n.stopPropagation();
|
|
86
|
+
}
|
|
87
|
+
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), f.device !== "mobile" && this.playerConfig.isMobileSimulateMode !== "mobile" && (this.bind("mouseenter", this._onMouseenterHandler), this.bind(["blur", "mouseleave"], this._onMouseleaveHandler), this.bind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.bind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.bind(".xgplayer-slider", "mouseup", this.onBarMouseUp)), this.bind(".xgplayer-icon", ["touchend", "click"], this.changeMutedHandler), this.on(C, this.onVolumeChange), this.once(V, this.onVolumeChange), r.typeOf(a) !== "Number" && (this.player.volume = this.config.default), this.onVolumeChange();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
key: "updateVolumePos",
|
|
92
|
+
value: function(t, i) {
|
|
93
|
+
var o = this.player, a = this.find(".xgplayer-drag"), s = this.find(".xgplayer-bar");
|
|
94
|
+
if (!(!s || !a)) {
|
|
95
|
+
var n = parseInt(t / s.getBoundingClientRect().height * 1e3, 10);
|
|
96
|
+
a.style.height = "".concat(t, "px");
|
|
97
|
+
var l = Math.max(Math.min(n / 1e3, 1), 0), u = {
|
|
98
|
+
volume: {
|
|
99
|
+
from: o.volume,
|
|
100
|
+
to: l
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
o.muted && (u.muted = {
|
|
104
|
+
from: !0,
|
|
105
|
+
to: !1
|
|
106
|
+
}), this.emitUserAction(i, "change_volume", {
|
|
107
|
+
muted: o.muted,
|
|
108
|
+
volume: o.volume,
|
|
109
|
+
props: u
|
|
110
|
+
}), o.volume = Math.max(Math.min(n / 1e3, 1), 0), o.muted && (o.muted = !1), this.config.showValueLabel && this.updateVolumeValue();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "updateVolumeValue",
|
|
115
|
+
value: function() {
|
|
116
|
+
var t = this.player, i = t.volume, o = t.muted, a = this.find(".xgplayer-value-label"), s = Math.max(Math.min(i, 1), 0);
|
|
117
|
+
a.innerText = o ? 0 : Math.round(s * 100);
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "focus",
|
|
121
|
+
value: function() {
|
|
122
|
+
var t = this.player;
|
|
123
|
+
t.focus({
|
|
124
|
+
autoHide: !1
|
|
125
|
+
}), this._timerId && (r.clearTimeout(this, this._timerId), this._timerId = null), r.addClass(this.root, "slide-show");
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "unFocus",
|
|
129
|
+
value: function() {
|
|
130
|
+
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, a = arguments.length > 2 ? arguments[2] : void 0, s = this._d, n = this.player;
|
|
131
|
+
s.isActive || (this._timerId && (r.clearTimeout(this, this._timerId), this._timerId = null), this._timerId = r.setTimeout(this, function() {
|
|
132
|
+
s.isActive || (o ? n.blur() : n.focus(), r.removeClass(t.root, "slide-show"), s.isStart && t.onBarMouseUp(a)), t._timerId = null;
|
|
133
|
+
}, i));
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
key: "changeMuted",
|
|
137
|
+
value: function(t) {
|
|
138
|
+
t && t.stopPropagation();
|
|
139
|
+
var i = this.player, o = this._d;
|
|
140
|
+
o.isStart && this.onBarMouseUp(t), this.emitUserAction(t, "change_muted", {
|
|
141
|
+
muted: i.muted,
|
|
142
|
+
volume: i.volume,
|
|
143
|
+
props: {
|
|
144
|
+
muted: {
|
|
145
|
+
from: i.muted,
|
|
146
|
+
to: !i.muted
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}), i.volume > 0 && (i.muted = !i.muted), i.volume < 0.01 && (i.volume = this.config.miniVolume);
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "animate",
|
|
153
|
+
value: function(t, i) {
|
|
154
|
+
t || i === 0 ? this.setAttr("data-state", "mute") : i < 0.5 && this.icons.volumeSmall ? this.setAttr("data-state", "small") : this.setAttr("data-state", "normal");
|
|
155
|
+
}
|
|
156
|
+
}, {
|
|
157
|
+
key: "initIcons",
|
|
158
|
+
value: function() {
|
|
159
|
+
var t = this.icons;
|
|
160
|
+
this.appendChild(".xgplayer-icon", t.volumeSmall), this.appendChild(".xgplayer-icon", t.volumeLarge), this.appendChild(".xgplayer-icon", t.volumeMuted);
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "destroy",
|
|
164
|
+
value: function() {
|
|
165
|
+
this._timerId && (r.clearTimeout(this, this._timerId), this._timerId = null), this.unbind("mouseenter", this.onMouseenter), this.unbind(["blur", "mouseleave"], this.onMouseleave), this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp), document.removeEventListener("mouseup", this.onBarMouseUp), this.unbind(".xgplayer-icon", f.device === "mobile" ? "touchend" : "click", this.changeMutedHandler);
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
key: "render",
|
|
169
|
+
value: function() {
|
|
170
|
+
if (!this.config.disable) {
|
|
171
|
+
var t = this.config.default || this.player.volume, i = this.config.showValueLabel;
|
|
172
|
+
return `
|
|
173
|
+
<xg-icon class="xgplayer-volume" data-state="normal">
|
|
174
|
+
<div class="xgplayer-icon">
|
|
175
|
+
</div>
|
|
176
|
+
<xg-slider class="xgplayer-slider">
|
|
177
|
+
`.concat(i ? '<div class="xgplayer-value-label">'.concat(t * 100, "</div>") : "", `
|
|
178
|
+
<div class="xgplayer-bar">
|
|
179
|
+
<xg-drag class="xgplayer-drag" style="height: `).concat(t * 100, `%"></xg-drag>
|
|
180
|
+
</div>
|
|
181
|
+
</xg-slider>
|
|
182
|
+
</xg-icon>`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}], [{
|
|
186
|
+
key: "pluginName",
|
|
187
|
+
get: function() {
|
|
188
|
+
return "volume";
|
|
189
|
+
}
|
|
190
|
+
}, {
|
|
191
|
+
key: "defaultConfig",
|
|
192
|
+
get: function() {
|
|
193
|
+
return {
|
|
194
|
+
position: S.CONTROLS_RIGHT,
|
|
195
|
+
index: 1,
|
|
196
|
+
disable: !1,
|
|
197
|
+
showValueLabel: !1,
|
|
198
|
+
default: 0.6,
|
|
199
|
+
miniVolume: 0.2
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}]), v;
|
|
203
|
+
})(I);
|
|
204
|
+
export {
|
|
205
|
+
E as default
|
|
206
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { inherits as g, createSuper as h, classCallCheck as j, defineProperty as f, assertThisInitialized as s, createClass as T } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import { WAITING as C, PLAYING as z, CANPLAY as d, PLAY as S } from "../../events.js";
|
|
3
|
+
import v from "../../plugin/plugin.js";
|
|
4
|
+
var P = /* @__PURE__ */ (function(l) {
|
|
5
|
+
g(a, l);
|
|
6
|
+
var o = h(a);
|
|
7
|
+
function a() {
|
|
8
|
+
var i;
|
|
9
|
+
j(this, a);
|
|
10
|
+
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
11
|
+
r[n] = arguments[n];
|
|
12
|
+
return i = o.call.apply(o, [this].concat(r)), f(s(i), "onWaiting", function() {
|
|
13
|
+
var u = s(i), e = u.config;
|
|
14
|
+
i.jumpCnt > e.jumpCntMax || i.timer || e.useWaitingTimeoutJump === !1 || (i.timer = setTimeout(i.onJump, e.waitingTime * 1e3));
|
|
15
|
+
}), f(s(i), "onJump", function() {
|
|
16
|
+
var u = s(i), e = u.player, m = u.config;
|
|
17
|
+
if (clearTimeout(i.timer), i.timer = null, !(i.jumpCnt > m.jumpCntMax || m.useWaitingTimeoutJump === !1) && !(e.media.paused && e.media.currentTime !== 0 && i.hasPlayed)) {
|
|
18
|
+
i.jumpSize = m.jumpSize * (i.jumpCnt + 1), i.jumpCnt === m.jumpSize && i.jumpSize < 6 && (i.jumpSize = 6);
|
|
19
|
+
var p = e.currentTime + i.jumpSize, c = e.media.duration;
|
|
20
|
+
p > c || (i.jumpCnt++, e.currentTime = p);
|
|
21
|
+
}
|
|
22
|
+
}), i;
|
|
23
|
+
}
|
|
24
|
+
return T(a, [{
|
|
25
|
+
key: "afterCreate",
|
|
26
|
+
value: function() {
|
|
27
|
+
var t = this, r = this.config, n = r.useWaitingTimeoutJump, u = r.jumpSize;
|
|
28
|
+
n !== !1 && (this.hasPlayed = !1, this.jumpCnt = 0, this.timer = null, this.jumpSize = u, this.on(C, this.onWaiting), this.on([z, d], function() {
|
|
29
|
+
clearTimeout(t.timer), t.timer = null, t.jumpSize = t.config.jumpSize;
|
|
30
|
+
}), this.on(S, function() {
|
|
31
|
+
t.hasPlayed = !0;
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
}], [{
|
|
35
|
+
key: "pluginName",
|
|
36
|
+
get: function() {
|
|
37
|
+
return "waitingTimeoutJump";
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
key: "defaultConfig",
|
|
41
|
+
get: function() {
|
|
42
|
+
return {
|
|
43
|
+
useWaitingTimeoutJump: !1,
|
|
44
|
+
waitingTime: 15,
|
|
45
|
+
jumpSize: 2,
|
|
46
|
+
jumpCntMax: 4
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}]), a;
|
|
50
|
+
})(v);
|
|
51
|
+
export {
|
|
52
|
+
P as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createClass as g, classCallCheck as P, toConsumableArray as d } from "../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import r from "../utils/sniffer.js";
|
|
3
|
+
import v from "../plugins/logger/index.js";
|
|
4
|
+
import b from "../plugins/replay/index.js";
|
|
5
|
+
import y from "../plugins/poster/index.js";
|
|
6
|
+
import C from "../plugins/start/index.js";
|
|
7
|
+
import S from "../plugins/enter/index.js";
|
|
8
|
+
import I from "../plugins/miniScreen/index.js";
|
|
9
|
+
import i from "../plugins/pc/index.js";
|
|
10
|
+
import D from "../plugins/mobile/index.js";
|
|
11
|
+
import p from "../plugins/keyboard/index.js";
|
|
12
|
+
import M from "../plugins/loading/index.js";
|
|
13
|
+
import _ from "../plugins/progress/index.js";
|
|
14
|
+
import k from "../plugins/play/index.js";
|
|
15
|
+
import T from "../plugins/fullscreen/index.js";
|
|
16
|
+
import L from "../plugins/time/index.js";
|
|
17
|
+
import w from "../plugins/time/timesegments.js";
|
|
18
|
+
import F from "../plugins/volume/index.js";
|
|
19
|
+
import R from "../plugins/rotate/index.js";
|
|
20
|
+
import $ from "../plugins/pip/index.js";
|
|
21
|
+
import x from "../plugins/playNext/index.js";
|
|
22
|
+
import A from "../plugins/download/index.js";
|
|
23
|
+
import E from "../plugins/screenShot/index.js";
|
|
24
|
+
import G from "../plugins/definition/index.js";
|
|
25
|
+
import J from "../plugins/playbackRate/index.js";
|
|
26
|
+
import a from "../plugins/cssFullScreen/index.js";
|
|
27
|
+
import N from "../plugins/error/index.js";
|
|
28
|
+
import B from "../plugins/prompt/index.js";
|
|
29
|
+
import H from "../plugins/progressPreview/index.js";
|
|
30
|
+
import K from "../plugins/common/thumbnail.js";
|
|
31
|
+
import V from "../plugins/progress/miniProgress.js";
|
|
32
|
+
import W from "../plugins/dynamicBg/index.js";
|
|
33
|
+
import X from "../lang/zh-cn.js";
|
|
34
|
+
import Z from "../plugins/stats/index.js";
|
|
35
|
+
import j from "../plugins/gapJump/index.js";
|
|
36
|
+
import q from "../plugins/waitingTimeoutJump/index.js";
|
|
37
|
+
import z from "../plugins/testspeed/index.js";
|
|
38
|
+
import O from "../lang/i18n.js";
|
|
39
|
+
import Q from "../plugins/fpsDetect/index.js";
|
|
40
|
+
O.use(X);
|
|
41
|
+
var No = /* @__PURE__ */ g(function l(U, o) {
|
|
42
|
+
var m, t, s;
|
|
43
|
+
P(this, l);
|
|
44
|
+
var f = o && o.isMobileSimulateMode === "mobile", n = o.isLive, u = n ? [] : [w, _, V, H, L], c = [].concat(u, [k, T, R, x, G, J, A, E, F, $]), h = [b, y, C, M, S, N, B, K, I];
|
|
45
|
+
this.plugins = [Z, v].concat(d(c), h, [j, q]);
|
|
46
|
+
var e = f ? "mobile" : r.device;
|
|
47
|
+
switch (e) {
|
|
48
|
+
case "pc":
|
|
49
|
+
(m = this.plugins).push.apply(m, [p, i, a, z, Q]);
|
|
50
|
+
break;
|
|
51
|
+
case "mobile":
|
|
52
|
+
(t = this.plugins).push.apply(t, [D]);
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
(s = this.plugins).push.apply(s, [p, i, a]);
|
|
56
|
+
}
|
|
57
|
+
(r.os.isIpad || e === "pc") && this.plugins.push(W), r.os.isIpad && this.plugins.push(i), this.ignores = [], this.i18n = [];
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
No as default
|
|
61
|
+
};
|
package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var A = {
|
|
2
|
+
INITIAL: 1,
|
|
3
|
+
READY: 2,
|
|
4
|
+
ATTACHING: 3,
|
|
5
|
+
ATTACHED: 4,
|
|
6
|
+
NOTALLOW: 5,
|
|
7
|
+
RUNNING: 6,
|
|
8
|
+
ENDED: 7
|
|
9
|
+
}, T = ["ERROR", "INITIAL", "READY", "ATTACHING", "ATTACHED", "NOTALLOW", "RUNNING", "ENDED", "DESTROYED"];
|
|
10
|
+
export {
|
|
11
|
+
A as STATES,
|
|
12
|
+
T as STATE_ARRAY
|
|
13
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
DEFAULT: "xgplayer",
|
|
3
|
+
DEFAULT_SKIN: "xgplayer-skin-default",
|
|
4
|
+
ENTER: "xgplayer-is-enter",
|
|
5
|
+
PAUSED: "xgplayer-pause",
|
|
6
|
+
PLAYING: "xgplayer-playing",
|
|
7
|
+
ENDED: "xgplayer-ended",
|
|
8
|
+
CANPLAY: "xgplayer-canplay",
|
|
9
|
+
LOADING: "xgplayer-isloading",
|
|
10
|
+
ERROR: "xgplayer-is-error",
|
|
11
|
+
REPLAY: "xgplayer-replay",
|
|
12
|
+
NO_START: "xgplayer-nostart",
|
|
13
|
+
ACTIVE: "xgplayer-active",
|
|
14
|
+
INACTIVE: "xgplayer-inactive",
|
|
15
|
+
FULLSCREEN: "xgplayer-is-fullscreen",
|
|
16
|
+
CSS_FULLSCREEN: "xgplayer-is-cssfullscreen",
|
|
17
|
+
ROTATE_FULLSCREEN: "xgplayer-rotate-fullscreen",
|
|
18
|
+
PARENT_ROTATE_FULLSCREEN: "xgplayer-rotate-parent",
|
|
19
|
+
PARENT_FULLSCREEN: "xgplayer-fullscreen-parent",
|
|
20
|
+
INNER_FULLSCREEN: "xgplayer-fullscreen-inner",
|
|
21
|
+
NO_CONTROLS: "no-controls",
|
|
22
|
+
FLEX_CONTROLS: "flex-controls",
|
|
23
|
+
CONTROLS_FOLLOW: "controls-follow",
|
|
24
|
+
CONTROLS_AUTOHIDE: "controls-autohide",
|
|
25
|
+
TOP_BAR_AUTOHIDE: "top-bar-autohide",
|
|
26
|
+
NOT_ALLOW_AUTOPLAY: "not-allow-autoplay",
|
|
27
|
+
SEEKING: "seeking",
|
|
28
|
+
PC: "xgplayer-pc",
|
|
29
|
+
MOBILE: "xgplayer-mobile",
|
|
30
|
+
MINI: "xgplayer-mini"
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
e as default
|
|
34
|
+
};
|