@xiping/react-components 1.0.45 → 1.0.50
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/subtitle-player/SubtitlePlayer.d.ts +21 -0
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +3 -3
- 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 +1 -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/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/subtitle-player/SubtitlePlayer.d.ts +21 -0
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +274 -76
- package/dist/es/components/txt-editor/TxtEditor.js +4 -1
- 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 +1 -1
- package/dist/es/index.js +60 -58
- 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/react-components.css +1 -1
- package/package.json +19 -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
- /package/dist/cjs/{subtitle → packages/subtitle}/lib/src/parser.js +0 -0
- /package/dist/es/{subtitle → packages/subtitle}/lib/src/parser.js +0 -0
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { inherits as A, createSuper as P, classCallCheck as R, defineProperty as m, assertThisInitialized as f, createClass as w } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import h from "../../utils/util.js";
|
|
3
|
+
import I from "../../utils/sniffer.js";
|
|
4
|
+
import { DURATION_CHANGE as D, CANPLAY as L, ENDED as _ } from "../../events.js";
|
|
5
|
+
import { runHooks as S } from "../../plugin/hooksDescriptor.js";
|
|
6
|
+
import N from "../../plugin/plugin.js";
|
|
7
|
+
import { STATES as b } from "../../state.js";
|
|
8
|
+
import G from "./touch.js";
|
|
9
|
+
import H from "../assets/seekicon.js";
|
|
10
|
+
var g = {
|
|
11
|
+
AUTO: "auto",
|
|
12
|
+
SEEKING: "seeking",
|
|
13
|
+
PLAYBACK: "playbackrate"
|
|
14
|
+
}, T = ["videoClick", "videoDbClick"], j = /* @__PURE__ */ (function(x) {
|
|
15
|
+
A(v, x);
|
|
16
|
+
var E = P(v);
|
|
17
|
+
function v(n) {
|
|
18
|
+
var e;
|
|
19
|
+
return R(this, v), e = E.call(this, n), m(f(e), "onTouchStart", function(t) {
|
|
20
|
+
var i = f(e), o = i.player, s = i.config, a = i.pos, c = i.playerConfig, l = e.getTouche(t);
|
|
21
|
+
if (l && !s.disableGesture && e.duration > 0 && !o.ended) {
|
|
22
|
+
a.isStart = !0, e.timer && clearTimeout(e.timer), h.checkIsFunction(c.disableSwipeHandler) && c.disableSwipeHandler(), e.find(".xg-dur").innerHTML = h.format(e.duration);
|
|
23
|
+
var r = e.root.getBoundingClientRect();
|
|
24
|
+
o.rotateDeg === 90 ? (a.top = r.left, a.left = r.top, a.width = r.height, a.height = r.width) : (a.top = r.top, a.left = r.left, a.width = r.width, a.height = r.height);
|
|
25
|
+
var u = parseInt(l.pageX - a.left, 10), p = parseInt(l.pageY - a.top, 10);
|
|
26
|
+
a.x = o.rotateDeg === 90 ? p : u, a.y = o.rotateDeg === 90 ? u : p, a.scopeL = s.scopeL * a.width, a.scopeR = (1 - s.scopeR) * a.width, a.scopeM1 = a.width * (1 - s.scopeM) / 2, a.scopeM2 = a.width - a.scopeM1;
|
|
27
|
+
}
|
|
28
|
+
}), m(f(e), "onTouchMove", function(t) {
|
|
29
|
+
var i = e.getTouche(t), o = f(e), s = o.pos, a = o.config, c = o.player;
|
|
30
|
+
if (!(!i || a.disableGesture || !e.duration || !s.isStart)) {
|
|
31
|
+
var l = a.miniMoveStep, r = a.hideControlsActive, u = parseInt(i.pageX - s.left, 10), p = parseInt(i.pageY - s.top, 10), y = c.rotateDeg === 90 ? p : u, k = c.rotateDeg === 90 ? u : p;
|
|
32
|
+
if (Math.abs(y - s.x) > l || Math.abs(k - s.y) > l) {
|
|
33
|
+
var C = y - s.x, M = k - s.y, d = s.scope;
|
|
34
|
+
if (d === -1 && (d = e.checkScope(y, k, C, M, s), d === 0 && (r ? c.blur() : c.focus({
|
|
35
|
+
autoHide: !1
|
|
36
|
+
}), !s.time && (s.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), s.scope = d), d === -1 || d > 0 && !a.gestureY || d === 0 && !a.gestureX)
|
|
37
|
+
return;
|
|
38
|
+
e.executeMove(C, M, d, s.width, s.height), s.x = y, s.y = k;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}), m(f(e), "onTouchEnd", function(t) {
|
|
42
|
+
var i = f(e), o = i.player, s = i.pos, a = i.playerConfig;
|
|
43
|
+
if (setTimeout(function() {
|
|
44
|
+
o.getPlugin("progress") && o.getPlugin("progress").resetSeekState();
|
|
45
|
+
}, 10), !!s.isStart) {
|
|
46
|
+
s.scope > -1 && t.cancelable && t.preventDefault();
|
|
47
|
+
var c = e.config, l = c.disableGesture, r = c.gestureX;
|
|
48
|
+
!l && r ? e.endLastMove(s.scope) : s.time = 0, s.scope = -1, e.resetPos(), h.checkIsFunction(a.enableSwipeHandler) && a.enableSwipeHandler(), e.changeAction(g.AUTO);
|
|
49
|
+
}
|
|
50
|
+
}), m(f(e), "onRootTouchMove", function(t) {
|
|
51
|
+
e.config.disableGesture || !e.config.gestureX || e.checkIsRootTarget(t) && (t.stopPropagation(), e.pos.isStart ? e.onTouchMove(t) : e.onTouchStart(t));
|
|
52
|
+
}), m(f(e), "onRootTouchEnd", function(t) {
|
|
53
|
+
e.pos.scope > -1 && e.onTouchEnd(t);
|
|
54
|
+
}), e.pos = {
|
|
55
|
+
isStart: !1,
|
|
56
|
+
x: 0,
|
|
57
|
+
y: 0,
|
|
58
|
+
time: 0,
|
|
59
|
+
volume: 0,
|
|
60
|
+
rate: 1,
|
|
61
|
+
light: 0,
|
|
62
|
+
width: 0,
|
|
63
|
+
height: 0,
|
|
64
|
+
scopeL: 0,
|
|
65
|
+
scopeR: 0,
|
|
66
|
+
scopeM1: 0,
|
|
67
|
+
scopeM2: 0,
|
|
68
|
+
scope: -1
|
|
69
|
+
}, e.timer = null, e;
|
|
70
|
+
}
|
|
71
|
+
return w(v, [{
|
|
72
|
+
key: "duration",
|
|
73
|
+
get: function() {
|
|
74
|
+
return this.playerConfig.customDuration || this.player.duration;
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
key: "timeOffset",
|
|
78
|
+
get: function() {
|
|
79
|
+
return this.playerConfig.timeOffset || 0;
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
key: "registerIcons",
|
|
83
|
+
value: function() {
|
|
84
|
+
return {
|
|
85
|
+
seekTipIcon: {
|
|
86
|
+
icon: H,
|
|
87
|
+
class: "xg-seek-pre"
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "afterCreate",
|
|
93
|
+
value: function() {
|
|
94
|
+
var e = this;
|
|
95
|
+
T.map(function(r) {
|
|
96
|
+
e.__hooks[r] = null;
|
|
97
|
+
});
|
|
98
|
+
var t = this.playerConfig, i = this.config, o = this.player;
|
|
99
|
+
t.closeVideoDblclick === !0 && (i.closedbClick = !0), this.resetPos(), h.isUndefined(t.disableGesture) || (i.disableGesture = !!t.disableGesture), this.appendChild(".xg-seek-icon", this.icons.seekTipIcon), this.xgMask = h.createDom("xg-mask", "", {}, "xgmask"), o.root.appendChild(this.xgMask), this.initCustomStyle(), this.registerThumbnail();
|
|
100
|
+
var s = this.domEventType === "mouse" ? "mouse" : "touch";
|
|
101
|
+
this.touch = new G(this.root, {
|
|
102
|
+
eventType: s,
|
|
103
|
+
needPreventDefault: !this.config.disableGesture
|
|
104
|
+
}), this.root.addEventListener("contextmenu", function(r) {
|
|
105
|
+
r.preventDefault();
|
|
106
|
+
}), o.root.addEventListener("touchmove", this.onRootTouchMove, !0), o.root.addEventListener("touchend", this.onRootTouchEnd, !0), o.root.addEventListener("touchcancel", this.onRootTouchEnd, !0);
|
|
107
|
+
var a = this.player.controls;
|
|
108
|
+
a && a.center && (a.center.addEventListener("touchmove", this.onRootTouchMove, !0), a.center.addEventListener("touchend", this.onRootTouchEnd, !0), a.center.addEventListener("touchcancel", this.onRootTouchEnd, !0)), this.on(D, function() {
|
|
109
|
+
var r = e.player, u = e.config;
|
|
110
|
+
r.duration > 0 && r.duration * 1e3 < u.moveDuration && (u.moveDuration = r.duration * 1e3);
|
|
111
|
+
}), this.on([L, _], function() {
|
|
112
|
+
var r = e.pos, u = r.time, p = r.isStart;
|
|
113
|
+
!p && u > 0 && (e.pos.time = 0);
|
|
114
|
+
});
|
|
115
|
+
var c = {
|
|
116
|
+
touchstart: "onTouchStart",
|
|
117
|
+
touchmove: "onTouchMove",
|
|
118
|
+
touchend: "onTouchEnd",
|
|
119
|
+
press: "onPress",
|
|
120
|
+
pressend: "onPressEnd",
|
|
121
|
+
click: "onClick",
|
|
122
|
+
doubleclick: "onDbClick"
|
|
123
|
+
};
|
|
124
|
+
if (Object.keys(c).map(function(r) {
|
|
125
|
+
e.touch.on(r, function(u) {
|
|
126
|
+
e[c[r]](u);
|
|
127
|
+
});
|
|
128
|
+
}), !i.disableActive) {
|
|
129
|
+
var l = o.plugins.progress;
|
|
130
|
+
l && (l.addCallBack("dragmove", function(r) {
|
|
131
|
+
e.activeSeekNote(r.currentTime, r.forward);
|
|
132
|
+
}), ["dragend", "click"].forEach(function(r) {
|
|
133
|
+
l.addCallBack(r, function() {
|
|
134
|
+
e.changeAction(g.AUTO);
|
|
135
|
+
});
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "registerThumbnail",
|
|
141
|
+
value: function() {
|
|
142
|
+
var e = this.player, t = e.plugins.thumbnail;
|
|
143
|
+
if (t && t.usable) {
|
|
144
|
+
this.thumbnail = t.createThumbnail(null, "mobile-thumbnail");
|
|
145
|
+
var i = this.find(".time-preview");
|
|
146
|
+
i.insertBefore(this.thumbnail, i.children[0]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}, {
|
|
150
|
+
key: "initCustomStyle",
|
|
151
|
+
value: function() {
|
|
152
|
+
var e = this.playerConfig || {}, t = e.commonStyle, i = t.playedColor, o = t.progressColor, s = t.timePreviewStyle, a = t.curTimeColor, c = t.durationColor;
|
|
153
|
+
if (i && (this.find(".xg-curbar").style.backgroundColor = i), o && (this.find(".xg-bar").style.backgroundColor = o), s) {
|
|
154
|
+
var l = this.find(".time-preview");
|
|
155
|
+
Object.keys(s).forEach(function(p) {
|
|
156
|
+
l.style[p] = s[p];
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
var r = a || i, u = c;
|
|
160
|
+
r && (this.find(".xg-cur").style.color = r), u && (this.find(".xg-dur").style.color = u), this.config.disableTimeProgress && h.addClass(this.find(".xg-timebar"), "hide");
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "resetPos",
|
|
164
|
+
value: function() {
|
|
165
|
+
var e = this;
|
|
166
|
+
this.pos ? (this.pos.isStart = !1, this.pos.scope = -1, ["x", "y", "width", "height", "scopeL", "scopeR", "scopeM1", "scopeM2"].map(function(t) {
|
|
167
|
+
e.pos[t] = 0;
|
|
168
|
+
})) : this.pos = {
|
|
169
|
+
isStart: !1,
|
|
170
|
+
x: 0,
|
|
171
|
+
y: 0,
|
|
172
|
+
volume: 0,
|
|
173
|
+
rate: 1,
|
|
174
|
+
light: 0,
|
|
175
|
+
width: 0,
|
|
176
|
+
height: 0,
|
|
177
|
+
scopeL: 0,
|
|
178
|
+
scopeR: 0,
|
|
179
|
+
scopeM1: 0,
|
|
180
|
+
scopeM2: 0,
|
|
181
|
+
scope: -1,
|
|
182
|
+
time: 0
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
key: "changeAction",
|
|
187
|
+
value: function(e) {
|
|
188
|
+
var t = this.player, i = this.root;
|
|
189
|
+
i.setAttribute("data-xg-action", e);
|
|
190
|
+
var o = t.plugins.start;
|
|
191
|
+
o && o.recover();
|
|
192
|
+
}
|
|
193
|
+
}, {
|
|
194
|
+
key: "getTouche",
|
|
195
|
+
value: function(e) {
|
|
196
|
+
var t = this.player.rotateDeg, i = e.touches && e.touches.length > 0 ? e.touches[e.touches.length - 1] : e;
|
|
197
|
+
return t === 0 ? {
|
|
198
|
+
pageX: i.pageX,
|
|
199
|
+
pageY: i.pageY
|
|
200
|
+
} : {
|
|
201
|
+
pageX: i.pageX,
|
|
202
|
+
pageY: i.pageY
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "checkScope",
|
|
207
|
+
value: function(e, t, i, o, s) {
|
|
208
|
+
var a = s.width, c = -1;
|
|
209
|
+
if (e < 0 || e > a)
|
|
210
|
+
return c;
|
|
211
|
+
var l = Math.abs(o === 0 ? i : i / o);
|
|
212
|
+
return Math.abs(i) > 0 && l >= 1.73 && e > s.scopeM1 && e < s.scopeM2 ? c = 0 : (Math.abs(i) === 0 || l <= 0.57) && (c = e < s.scopeL ? 1 : e > s.scopeR ? 2 : 3), c;
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
key: "executeMove",
|
|
216
|
+
value: function(e, t, i, o, s) {
|
|
217
|
+
switch (i) {
|
|
218
|
+
case 0:
|
|
219
|
+
this.updateTime(e / o * this.config.scopeM);
|
|
220
|
+
break;
|
|
221
|
+
case 1:
|
|
222
|
+
this.updateBrightness(t / s);
|
|
223
|
+
break;
|
|
224
|
+
case 2:
|
|
225
|
+
I.os.isIos || this.updateVolume(t / s);
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
key: "endLastMove",
|
|
231
|
+
value: function(e) {
|
|
232
|
+
var t = this, i = this.pos, o = this.player, s = this.config, a = (i.time - this.timeOffset) / 1e3;
|
|
233
|
+
switch (e) {
|
|
234
|
+
case 0:
|
|
235
|
+
o.seek(Number(a).toFixed(1)), s.hideControlsEnd ? o.blur() : o.focus(), this.timer = setTimeout(function() {
|
|
236
|
+
t.pos.time = 0;
|
|
237
|
+
}, 500);
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
this.changeAction(g.AUTO);
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "checkIsRootTarget",
|
|
244
|
+
value: function(e) {
|
|
245
|
+
var t = this.player.plugins || {};
|
|
246
|
+
return t.progress && t.progress.root.contains(e.target) ? !1 : t.start && t.start.root.contains(e.target) || t.controls && t.controls.root.contains(e.target);
|
|
247
|
+
}
|
|
248
|
+
}, {
|
|
249
|
+
key: "sendUseAction",
|
|
250
|
+
value: function(e) {
|
|
251
|
+
var t = this.player.paused;
|
|
252
|
+
this.emitUserAction(e, "switch_play_pause", {
|
|
253
|
+
prop: "paused",
|
|
254
|
+
from: t,
|
|
255
|
+
to: !t
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
key: "clickHandler",
|
|
260
|
+
value: function(e) {
|
|
261
|
+
var t = this.player, i = this.config, o = this.playerConfig;
|
|
262
|
+
if (t.state < b.RUNNING) {
|
|
263
|
+
o.closeVideoClick || (this.sendUseAction(h.createEvent("click")), t.play());
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
!i.closedbClick || o.closeVideoClick ? t.isActive ? t.blur() : t.focus() : o.closeVideoClick || ((t.isActive || i.focusVideoClick) && (this.sendUseAction(h.createEvent("click")), this.switchPlayPause()), t.focus());
|
|
267
|
+
}
|
|
268
|
+
}, {
|
|
269
|
+
key: "dbClickHandler",
|
|
270
|
+
value: function(e) {
|
|
271
|
+
var t = this.config, i = this.player;
|
|
272
|
+
!t.closedbClick && i.state >= b.RUNNING && (this.sendUseAction(h.createEvent("dblclick")), this.switchPlayPause());
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
key: "onClick",
|
|
276
|
+
value: function(e) {
|
|
277
|
+
var t = this, i = this.player;
|
|
278
|
+
S(this, T[0], function(o, s) {
|
|
279
|
+
t.clickHandler(s.e);
|
|
280
|
+
}, {
|
|
281
|
+
e,
|
|
282
|
+
paused: i.paused
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}, {
|
|
286
|
+
key: "onDbClick",
|
|
287
|
+
value: function(e) {
|
|
288
|
+
var t = this, i = this.player;
|
|
289
|
+
S(this, T[1], function(o, s) {
|
|
290
|
+
t.dbClickHandler(s.e);
|
|
291
|
+
}, {
|
|
292
|
+
e,
|
|
293
|
+
paused: i.paused
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
key: "onPress",
|
|
298
|
+
value: function(e) {
|
|
299
|
+
var t = this.pos, i = this.config, o = this.player;
|
|
300
|
+
i.disablePress || (t.rate = this.player.playbackRate, this.emitUserAction("press", "change_rate", {
|
|
301
|
+
prop: "playbackRate",
|
|
302
|
+
from: o.playbackRate,
|
|
303
|
+
to: i.pressRate
|
|
304
|
+
}), o.playbackRate = i.pressRate, this.changeAction(g.PLAYBACK));
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "onPressEnd",
|
|
308
|
+
value: function(e) {
|
|
309
|
+
var t = this.pos, i = this.config, o = this.player;
|
|
310
|
+
i.disablePress || (this.emitUserAction("pressend", "change_rate", {
|
|
311
|
+
prop: "playbackRate",
|
|
312
|
+
from: o.playbackRate,
|
|
313
|
+
to: t.rate
|
|
314
|
+
}), o.playbackRate = t.rate, t.rate = 1, this.changeAction(g.AUTO));
|
|
315
|
+
}
|
|
316
|
+
}, {
|
|
317
|
+
key: "updateTime",
|
|
318
|
+
value: function(e) {
|
|
319
|
+
var t = this.player, i = this.config, o = this.player.duration;
|
|
320
|
+
e = Number(e.toFixed(4));
|
|
321
|
+
var s = parseInt(e * i.moveDuration, 10) + this.timeOffset;
|
|
322
|
+
s += this.pos.time, s = s < 0 ? 0 : s > o * 1e3 ? o * 1e3 - 200 : s, t.getPlugin("time") && t.getPlugin("time").updateTime(s / 1e3), t.getPlugin("progress") && t.getPlugin("progress").updatePercent(s / 1e3 / this.duration, !0), this.activeSeekNote(s / 1e3, e > 0), i.isTouchingSeek && t.seek(Number((s - this.timeOffset) / 1e3).toFixed(1)), this.pos.time = s;
|
|
323
|
+
}
|
|
324
|
+
}, {
|
|
325
|
+
key: "updateVolume",
|
|
326
|
+
value: function(e) {
|
|
327
|
+
this.player.rotateDeg && (e = -e);
|
|
328
|
+
var t = this.player, i = this.pos;
|
|
329
|
+
if (e = parseInt(e * 100, 10), i.volume += e, !(Math.abs(i.volume) < 10)) {
|
|
330
|
+
var o = parseInt(t.volume * 10, 10) - parseInt(i.volume / 10, 10);
|
|
331
|
+
o = o > 10 ? 10 : o < 1 ? 0 : o, t.volume = o / 10, i.volume = 0;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}, {
|
|
335
|
+
key: "updateBrightness",
|
|
336
|
+
value: function(e) {
|
|
337
|
+
var t = this.pos, i = this.config, o = this.xgMask;
|
|
338
|
+
if (i.darkness) {
|
|
339
|
+
this.player.rotateDeg && (e = -e);
|
|
340
|
+
var s = t.light + 0.8 * e;
|
|
341
|
+
s = s > i.maxDarkness ? i.maxDarkness : s < 0 ? 0 : s, o && (o.style.backgroundColor = "rgba(0,0,0,".concat(s, ")")), t.light = s;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}, {
|
|
345
|
+
key: "activeSeekNote",
|
|
346
|
+
value: function(e) {
|
|
347
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, i = this.player, o = this.config, s = !(this.duration !== 1 / 0 && this.duration > 0);
|
|
348
|
+
if (!(!e || typeof e != "number" || s || o.disableActive)) {
|
|
349
|
+
e < 0 ? e = 0 : e > i.duration && (e = i.duration - 0.2), this.changeAction(g.SEEKING);
|
|
350
|
+
var a = i.plugins.start;
|
|
351
|
+
a && a.focusHide(), this.find(".xg-dur").innerHTML = h.format(this.duration), this.find(".xg-cur").innerHTML = h.format(e), this.find(".xg-curbar").style.width = "".concat(e / this.duration * 100, "%"), t ? h.removeClass(this.find(".xg-seek-show"), "xg-back") : h.addClass(this.find(".xg-seek-show"), "xg-back"), this.updateThumbnails(e);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}, {
|
|
355
|
+
key: "updateThumbnails",
|
|
356
|
+
value: function(e) {
|
|
357
|
+
var t = this.player, i = t.plugins.thumbnail;
|
|
358
|
+
i && i.usable && this.thumbnail && i.update(this.thumbnail, e, 160, 90);
|
|
359
|
+
}
|
|
360
|
+
}, {
|
|
361
|
+
key: "switchPlayPause",
|
|
362
|
+
value: function() {
|
|
363
|
+
var e = this.player;
|
|
364
|
+
if (e.state < b.ATTACHED)
|
|
365
|
+
return !1;
|
|
366
|
+
e.ended || (e.paused ? e.play() : e.pause());
|
|
367
|
+
}
|
|
368
|
+
}, {
|
|
369
|
+
key: "disableGesture",
|
|
370
|
+
value: function() {
|
|
371
|
+
this.config.disableGesture = !0;
|
|
372
|
+
}
|
|
373
|
+
}, {
|
|
374
|
+
key: "enableGesture",
|
|
375
|
+
value: function() {
|
|
376
|
+
this.config.disableGesture = !1;
|
|
377
|
+
}
|
|
378
|
+
}, {
|
|
379
|
+
key: "destroy",
|
|
380
|
+
value: function() {
|
|
381
|
+
var e = this.player;
|
|
382
|
+
this.timer && clearTimeout(this.timer), this.thumbnail = null, e.root.removeChild(this.xgMask), this.xgMask = null, this.touch && this.touch.destroy(), this.touch = null, e.root.removeEventListener("touchmove", this.onRootTouchMove, !0), e.root.removeEventListener("touchend", this.onRootTouchEnd, !0), e.root.removeEventListener("touchcancel", this.onRootTouchEnd, !0);
|
|
383
|
+
var t = this.player.controls;
|
|
384
|
+
t && t.center && (t.center.removeEventListener("touchmove", this.onRootTouchMove, !0), t.center.removeEventListener("touchend", this.onRootTouchEnd, !0), t.center.removeEventListener("touchcancel", this.onRootTouchEnd, !0));
|
|
385
|
+
}
|
|
386
|
+
}, {
|
|
387
|
+
key: "render",
|
|
388
|
+
value: function() {
|
|
389
|
+
var e = this.config.gradient !== "normal" ? "gradient ".concat(this.config.gradient) : "gradient";
|
|
390
|
+
return `
|
|
391
|
+
<xg-trigger class="trigger">
|
|
392
|
+
<div class="`.concat(e, `"></div>
|
|
393
|
+
<div class="time-preview">
|
|
394
|
+
<div class="xg-seek-show `).concat(this.config.disableSeekIcon ? " hide-seek-icon" : "", `">
|
|
395
|
+
<i class="xg-seek-icon"></i>
|
|
396
|
+
<span class="xg-cur">00:00</span>
|
|
397
|
+
<span class="xg-separator">/</span>
|
|
398
|
+
<span class="xg-dur">00:00</span>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="xg-bar xg-timebar">
|
|
401
|
+
<div class="xg-curbar"></div>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
<div class="xg-playbackrate xg-top-note">
|
|
405
|
+
<span><i>`).concat(this.config.pressRate, "X</i>").concat(this.i18n.FORWARD, `</span>
|
|
406
|
+
</div>
|
|
407
|
+
</xg-trigger>
|
|
408
|
+
`);
|
|
409
|
+
}
|
|
410
|
+
}], [{
|
|
411
|
+
key: "pluginName",
|
|
412
|
+
get: function() {
|
|
413
|
+
return "mobile";
|
|
414
|
+
}
|
|
415
|
+
}, {
|
|
416
|
+
key: "defaultConfig",
|
|
417
|
+
get: function() {
|
|
418
|
+
return {
|
|
419
|
+
index: 0,
|
|
420
|
+
disableGesture: !1,
|
|
421
|
+
gestureX: !0,
|
|
422
|
+
gestureY: !0,
|
|
423
|
+
gradient: "normal",
|
|
424
|
+
isTouchingSeek: !1,
|
|
425
|
+
miniMoveStep: 5,
|
|
426
|
+
miniYPer: 5,
|
|
427
|
+
scopeL: 0.25,
|
|
428
|
+
scopeR: 0.25,
|
|
429
|
+
scopeM: 0.9,
|
|
430
|
+
pressRate: 2,
|
|
431
|
+
darkness: !0,
|
|
432
|
+
maxDarkness: 0.8,
|
|
433
|
+
disableActive: !1,
|
|
434
|
+
disableTimeProgress: !1,
|
|
435
|
+
hideControlsActive: !1,
|
|
436
|
+
hideControlsEnd: !1,
|
|
437
|
+
moveDuration: 360 * 1e3,
|
|
438
|
+
closedbClick: !1,
|
|
439
|
+
disablePress: !0,
|
|
440
|
+
disableSeekIcon: !1,
|
|
441
|
+
focusVideoClick: !1
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
}]), v;
|
|
445
|
+
})(N);
|
|
446
|
+
export {
|
|
447
|
+
j as default
|
|
448
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { createClass as d, classCallCheck as g, defineProperty as l } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
var c = {
|
|
3
|
+
PRESS: "press",
|
|
4
|
+
PRESS_END: "pressend",
|
|
5
|
+
DOUBlE_CLICK: "doubleclick",
|
|
6
|
+
CLICK: "click",
|
|
7
|
+
TOUCH_MOVE: "touchmove",
|
|
8
|
+
TOUCH_START: "touchstart",
|
|
9
|
+
TOUCH_END: "touchend"
|
|
10
|
+
}, p = {
|
|
11
|
+
start: "touchstart",
|
|
12
|
+
end: "touchend",
|
|
13
|
+
move: "touchmove",
|
|
14
|
+
cancel: "touchcancel"
|
|
15
|
+
}, m = {
|
|
16
|
+
start: "mousedown",
|
|
17
|
+
end: "mouseup",
|
|
18
|
+
move: "mousemove",
|
|
19
|
+
cancel: "mouseleave"
|
|
20
|
+
};
|
|
21
|
+
function h(i) {
|
|
22
|
+
return i && i.length > 0 ? i[i.length - 1] : null;
|
|
23
|
+
}
|
|
24
|
+
function T() {
|
|
25
|
+
return {
|
|
26
|
+
pressDelay: 600,
|
|
27
|
+
dbClickDelay: 200,
|
|
28
|
+
disablePress: !1,
|
|
29
|
+
disableDbClick: !1,
|
|
30
|
+
miniStep: 2,
|
|
31
|
+
needPreventDefault: !0
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
var C = /* @__PURE__ */ (function() {
|
|
35
|
+
function i(o) {
|
|
36
|
+
var e = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
37
|
+
eventType: "touch"
|
|
38
|
+
};
|
|
39
|
+
g(this, i), l(this, "onTouchStart", function(t) {
|
|
40
|
+
var s = e._pos, n = e.root, a = h(t.touches);
|
|
41
|
+
s.x = a ? parseInt(a.pageX, 10) : t.pageX, s.y = a ? parseInt(a.pageX, 10) : t.pageX, s.start = !0, e.__setPress(t), n.addEventListener(e.events.end, e.onTouchEnd), n.addEventListener(e.events.cancel, e.onTouchCancel), n.addEventListener(e.events.move, e.onTouchMove), e.trigger(c.TOUCH_START, t);
|
|
42
|
+
}), l(this, "onTouchCancel", function(t) {
|
|
43
|
+
e.onTouchEnd(t);
|
|
44
|
+
}), l(this, "onTouchEnd", function(t) {
|
|
45
|
+
var s = e._pos, n = e.root;
|
|
46
|
+
e.__clearPress(), n.removeEventListener(e.events.cancel, e.onTouchCancel), n.removeEventListener(e.events.end, e.onTouchEnd), n.removeEventListener(e.events.move, e.onTouchMove), t.moving = s.moving, t.press = s.press, s.press && e.trigger(c.PRESS_END, t), e.trigger(c.TOUCH_END, t), !s.press && !s.moving && e.__setDb(t), s.press = !1, s.start = !1, s.moving = !1;
|
|
47
|
+
}), l(this, "onTouchMove", function(t) {
|
|
48
|
+
var s = e._pos, n = e.config, a = h(t.touches), u = a ? parseInt(a.pageX, 10) : t.pageX, v = a ? parseInt(a.pageY, 10) : t.pageX, _ = u - s.x, f = v - s.y;
|
|
49
|
+
Math.abs(f) < n.miniStep && Math.abs(_) < n.miniStep || (e.__clearPress(), s.press && e.trigger(c.PRESS_END, t), s.press = !1, s.moving = !0, e.trigger(c.TOUCH_MOVE, t));
|
|
50
|
+
}), this._pos = {
|
|
51
|
+
moving: !1,
|
|
52
|
+
start: !1,
|
|
53
|
+
x: 0,
|
|
54
|
+
y: 0
|
|
55
|
+
}, this.config = T(), Object.keys(r).map(function(t) {
|
|
56
|
+
e.config[t] = r[t];
|
|
57
|
+
}), this.root = o, this.events = r.eventType === "mouse" ? m : p, this.pressIntrvalId = null, this.dbIntrvalId = null, this.__handlers = {}, this._initEvent();
|
|
58
|
+
}
|
|
59
|
+
return d(i, [{
|
|
60
|
+
key: "_initEvent",
|
|
61
|
+
value: function() {
|
|
62
|
+
this.root.addEventListener(this.events.start, this.onTouchStart);
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
key: "__setPress",
|
|
66
|
+
value: function(e) {
|
|
67
|
+
var r = this, t = this.config;
|
|
68
|
+
this.pressIntrvalId && this.__clearPress(), this.pressIntrvalId = setTimeout(function() {
|
|
69
|
+
r.trigger(c.PRESS, e), r._pos.press = !0, r.__clearPress();
|
|
70
|
+
}, t.pressDelay);
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "__clearPress",
|
|
74
|
+
value: function() {
|
|
75
|
+
window.clearTimeout(this.pressIntrvalId), this.pressIntrvalId = null;
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "__setDb",
|
|
79
|
+
value: function(e) {
|
|
80
|
+
var r = this, t = this.config;
|
|
81
|
+
if (this.dbIntrvalId) {
|
|
82
|
+
this.__clearDb(), this.trigger(c.DOUBlE_CLICK, e);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.dbIntrvalId = setTimeout(function() {
|
|
86
|
+
r.__clearDb(), !r._pos.start && !r._pos.press && !r._pos.moving && r.trigger(c.CLICK, e);
|
|
87
|
+
}, t.dbClickDelay);
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "__clearDb",
|
|
91
|
+
value: function() {
|
|
92
|
+
clearTimeout(this.dbIntrvalId), this.dbIntrvalId = null;
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "on",
|
|
96
|
+
value: function(e, r) {
|
|
97
|
+
this.__handlers[e] || (this.__handlers[e] = []), this.__handlers[e].push(r);
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
key: "off",
|
|
101
|
+
value: function(e, r) {
|
|
102
|
+
if (this.__handlers[e]) {
|
|
103
|
+
for (var t = this.__handlers[e], s = -1, n = 0; n < t.length; n++)
|
|
104
|
+
if (t[n] === r) {
|
|
105
|
+
s = n;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
s >= 0 && this.__handlers[e].splice(s, 1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "trigger",
|
|
113
|
+
value: function(e, r) {
|
|
114
|
+
this.__handlers[e] && this.__handlers[e].map(function(t) {
|
|
115
|
+
try {
|
|
116
|
+
t(r);
|
|
117
|
+
} catch (s) {
|
|
118
|
+
console.error("trigger>>:".concat(e), s);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "destroy",
|
|
124
|
+
value: function() {
|
|
125
|
+
var e = this, r = {
|
|
126
|
+
touchend: "onTouchEnd",
|
|
127
|
+
touchmove: "onTouchMove",
|
|
128
|
+
touchstart: "onTouchStart"
|
|
129
|
+
};
|
|
130
|
+
Object.keys(r).forEach(function(t) {
|
|
131
|
+
e.root.removeEventListener(t, e[r[t]]);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}]), i;
|
|
135
|
+
})();
|
|
136
|
+
export {
|
|
137
|
+
C as default
|
|
138
|
+
};
|