@xiping/react-components 1.0.50 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/gradient-text/index.js +1 -1
- package/dist/cjs/components/message/Message.js +1 -1
- package/dist/cjs/components/subtitle-player/CurrentMode.d.ts +20 -0
- package/dist/cjs/components/subtitle-player/CurrentMode.js +2 -0
- package/dist/cjs/components/subtitle-player/LyricsMode.d.ts +26 -0
- package/dist/cjs/components/subtitle-player/LyricsMode.js +2 -0
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.d.ts +3 -2
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +1 -3
- package/dist/cjs/components/subtitle-player/utils.d.ts +28 -0
- package/dist/cjs/components/subtitle-player/utils.js +1 -0
- package/dist/cjs/components/text-animate/TextAnimate.js +1 -1
- package/dist/cjs/components/text-type/TextType.js +1 -1
- package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
- package/dist/cjs/components/txt-reader/index.module.css.js +1 -1
- package/dist/cjs/components/variable-proximity/index.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -1
- package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
- package/dist/cjs/react-components.css +1 -1
- package/dist/es/components/gradient-text/index.js +8 -8
- package/dist/es/components/message/Message.js +72 -72
- package/dist/es/components/subtitle-player/CurrentMode.d.ts +20 -0
- package/dist/es/components/subtitle-player/CurrentMode.js +40 -0
- package/dist/es/components/subtitle-player/LyricsMode.d.ts +26 -0
- package/dist/es/components/subtitle-player/LyricsMode.js +67 -0
- package/dist/es/components/subtitle-player/SubtitlePlayer.d.ts +3 -2
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +121 -238
- package/dist/es/components/subtitle-player/utils.d.ts +28 -0
- package/dist/es/components/subtitle-player/utils.js +72 -0
- package/dist/es/components/text-animate/TextAnimate.js +0 -1
- package/dist/es/components/text-type/TextType.js +31 -31
- package/dist/es/components/txt-reader/TxtReader.js +9 -9
- package/dist/es/components/txt-reader/index.module.css.js +7 -8
- package/dist/es/components/variable-proximity/index.js +8 -9
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +64 -64
- package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
- package/dist/es/react-components.css +1 -1
- package/package.json +15 -15
- package/dist/cjs/_virtual/_commonjsHelpers.js +0 -1
- package/dist/cjs/_virtual/delegate.js +0 -1
- package/dist/cjs/_virtual/download.js +0 -1
- package/dist/cjs/_virtual/download2.js +0 -1
- package/dist/cjs/_virtual/index.js +0 -1
- package/dist/cjs/_virtual/index2.js +0 -1
- package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +0 -1
- package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +0 -1
- package/dist/cjs/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +0 -3
- package/dist/cjs/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +0 -15
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +0 -8
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +0 -12
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +0 -7
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +0 -3
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +0 -9
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +0 -13
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +0 -19
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +0 -8
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +0 -5
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +0 -7
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +0 -2
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +0 -7
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +0 -11
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +0 -3
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +0 -3
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +0 -4
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +0 -6
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +0 -11
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +0 -1
- package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +0 -1
- package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +0 -1
- package/dist/es/_virtual/_commonjsHelpers.js +0 -6
- package/dist/es/_virtual/delegate.js +0 -7
- package/dist/es/_virtual/download.js +0 -7
- package/dist/es/_virtual/download2.js +0 -4
- package/dist/es/_virtual/index.js +0 -8
- package/dist/es/_virtual/index2.js +0 -4
- package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +0 -21
- package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +0 -29
- package/dist/es/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +0 -77
- package/dist/es/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +0 -111
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +0 -197
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +0 -7
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +0 -87
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +0 -64
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +0 -67
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +0 -45
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +0 -101
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +0 -79
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +0 -75
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +0 -79
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +0 -466
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +0 -1240
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +0 -207
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +0 -130
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +0 -366
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +0 -204
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +0 -14
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +0 -81
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +0 -20
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +0 -13
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +0 -9
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +0 -17
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +0 -12
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +0 -10
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +0 -35
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +0 -12
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +0 -79
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +0 -193
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +0 -141
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +0 -171
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +0 -105
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +0 -110
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +0 -83
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +0 -232
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +0 -42
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +0 -68
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +0 -116
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +0 -68
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +0 -150
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +0 -96
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +0 -299
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +0 -46
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +0 -171
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +0 -169
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +0 -55
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +0 -448
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +0 -138
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +0 -122
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +0 -216
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +0 -102
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +0 -78
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +0 -100
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +0 -119
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +0 -431
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +0 -215
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +0 -93
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +0 -175
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +0 -292
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +0 -86
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +0 -92
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +0 -106
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +0 -134
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +0 -222
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +0 -152
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +0 -134
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +0 -164
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +0 -146
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +0 -206
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +0 -53
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +0 -61
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +0 -13
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +0 -34
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +0 -83
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +0 -34
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +0 -271
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +0 -111
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +0 -517
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +0 -25
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +0 -4
- package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +0 -19
- package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +0 -14
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { inherits as M, createSuper as P, classCallCheck as B, createClass as H, get as y, getPrototypeOf as C } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
-
import { VIDEO_RESIZE as S, SCREEN_SHOT as N } from "../../events.js";
|
|
3
|
-
import { POSITIONS as q } from "../../plugin/plugin.js";
|
|
4
|
-
import T from "../common/iconPlugin.js";
|
|
5
|
-
var K = /* @__PURE__ */ (function(k) {
|
|
6
|
-
M(o, k);
|
|
7
|
-
var E = P(o);
|
|
8
|
-
function o() {
|
|
9
|
-
return B(this, o), E.apply(this, arguments);
|
|
10
|
-
}
|
|
11
|
-
return H(o, [{
|
|
12
|
-
key: "beforeCreate",
|
|
13
|
-
value: function(t) {
|
|
14
|
-
typeof t.player.config.screenShot == "boolean" && (t.config.disable = !t.player.config.screenShot);
|
|
15
|
-
}
|
|
16
|
-
}, {
|
|
17
|
-
key: "afterCreate",
|
|
18
|
-
value: function() {
|
|
19
|
-
y(C(o.prototype), "afterCreate", this).call(this), this.appendChild(".xgplayer-icon", this.icons.screenshotIcon);
|
|
20
|
-
var t = this.config;
|
|
21
|
-
this.initSize = function(n) {
|
|
22
|
-
t.fitVideo && (t.width = n.vWidth, t.height = n.vHeight);
|
|
23
|
-
}, this.once(S, this.initSize);
|
|
24
|
-
}
|
|
25
|
-
}, {
|
|
26
|
-
key: "onPluginsReady",
|
|
27
|
-
value: function() {
|
|
28
|
-
this.show(), this.onClickBtn = this.onClickBtn.bind(this), this.bind(["click", "touchend"], this.onClickBtn);
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
key: "saveScreenShot",
|
|
32
|
-
value: function(t, n) {
|
|
33
|
-
var e = document.createElement("a");
|
|
34
|
-
e.href = t, e.download = n;
|
|
35
|
-
var i;
|
|
36
|
-
try {
|
|
37
|
-
typeof MouseEvent < "u" ? i = new MouseEvent("click", {
|
|
38
|
-
bubbles: !0,
|
|
39
|
-
cancelable: !0,
|
|
40
|
-
view: window
|
|
41
|
-
}) : (i = document.createEvent("MouseEvents"), i.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null));
|
|
42
|
-
} catch (c) {
|
|
43
|
-
console.error("MouseEvent unsupported", c);
|
|
44
|
-
}
|
|
45
|
-
i && e.dispatchEvent(i);
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
key: "createCanvas",
|
|
49
|
-
value: function(t, n) {
|
|
50
|
-
var e = document.createElement("canvas"), i = e.getContext("2d");
|
|
51
|
-
this.canvasCtx = i, this.canvas = e, e.width = t || this.config.width, e.height = n || this.config.height, i.imageSmoothingEnabled = !0, i.imageSmoothingEnabled && (i.imageSmoothingQuality = "high");
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "onClickBtn",
|
|
55
|
-
value: function(t) {
|
|
56
|
-
var n = this;
|
|
57
|
-
t.preventDefault(), t.stopPropagation(), this.emitUserAction(t, "shot");
|
|
58
|
-
var e = this.config;
|
|
59
|
-
this.shot(e.width, e.height).then(function(i) {
|
|
60
|
-
n.emit(N, i), e.saveImg && n.saveScreenShot(i, e.name + e.format);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: "shot",
|
|
65
|
-
value: function(t, n) {
|
|
66
|
-
var e = this, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
67
|
-
quality: 0.92,
|
|
68
|
-
type: "image/png"
|
|
69
|
-
}, c = this.config, r = this.player, w = i.quality || c.quality, d = i.type || c.type;
|
|
70
|
-
return new Promise(function(b, z) {
|
|
71
|
-
var a = null, m;
|
|
72
|
-
if (r.media.canvas)
|
|
73
|
-
a = r.media.canvas;
|
|
74
|
-
else {
|
|
75
|
-
e.canvas ? (e.canvas.width = t || c.width, e.canvas.height = n || c.height) : e.createCanvas(t, n), a = e.canvas, m = e.canvasCtx;
|
|
76
|
-
var h = r.media.videoWidth / r.media.videoHeight, g = a.width / a.height, I = 0, _ = 0, x = r.media.videoWidth, O = r.media.videoHeight, v, f, l, u;
|
|
77
|
-
h > g ? (l = a.width, u = a.width / h, v = 0, f = Math.round((a.height - u) / 2)) : h === g ? (l = a.width, u = a.height, v = 0, f = 0) : h < g && (l = a.height * h, u = a.height, v = Math.round((a.width - l) / 2), f = 0), m.drawImage(r.media, I, _, x, O, v, f, l, u);
|
|
78
|
-
}
|
|
79
|
-
var p = a.toDataURL(d, w).replace(d, "image/octet-stream");
|
|
80
|
-
p = p.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), b(p);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "registerIcons",
|
|
85
|
-
value: function() {
|
|
86
|
-
return {
|
|
87
|
-
screenshotIcon: null
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}, {
|
|
91
|
-
key: "destroy",
|
|
92
|
-
value: function() {
|
|
93
|
-
y(C(o.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.onClickBtn), this.off(S, this.initSize);
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
key: "render",
|
|
97
|
-
value: function() {
|
|
98
|
-
if (!this.config.disable) {
|
|
99
|
-
var t = this.icons.screenshotIcon ? "xgplayer-icon" : "xgplayer-icon btn-text", n = "SCREENSHOT";
|
|
100
|
-
return `
|
|
101
|
-
<xg-icon class="xgplayer-shot">
|
|
102
|
-
<div class="`.concat(t, `">
|
|
103
|
-
`).concat(this.icons.screenshotIcon ? "" : '<span lang-key="'.concat(this.i18nKeys[n], '">').concat(this.i18n[n], "</span>"), `
|
|
104
|
-
</div>
|
|
105
|
-
</xg-icon>`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}], [{
|
|
109
|
-
key: "pluginName",
|
|
110
|
-
get: function() {
|
|
111
|
-
return "screenShot";
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
key: "defaultConfig",
|
|
115
|
-
get: function() {
|
|
116
|
-
return {
|
|
117
|
-
position: q.CONTROLS_RIGHT,
|
|
118
|
-
index: 5,
|
|
119
|
-
quality: 0.92,
|
|
120
|
-
type: "image/png",
|
|
121
|
-
format: ".png",
|
|
122
|
-
width: 600,
|
|
123
|
-
height: 337,
|
|
124
|
-
saveImg: !0,
|
|
125
|
-
fitVideo: !0,
|
|
126
|
-
disable: !1,
|
|
127
|
-
name: "screenshot"
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}]), o;
|
|
131
|
-
})(T);
|
|
132
|
-
export {
|
|
133
|
-
K as default
|
|
134
|
-
};
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { inherits as p, createSuper as y, classCallCheck as m, defineProperty as h, assertThisInitialized as d, createClass as v } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
-
import n from "../../utils/util.js";
|
|
3
|
-
import { READY as g, AUTOPLAY_STARTED as P, AUTOPLAY_PREVENTED as w, PLAY as C, PAUSE as S, RESET as k } from "../../events.js";
|
|
4
|
-
import A from "../../plugin/plugin.js";
|
|
5
|
-
import { STATES as c } from "../../state.js";
|
|
6
|
-
import T from "../assets/play.js";
|
|
7
|
-
import _ from "../assets/pause.js";
|
|
8
|
-
var r = {};
|
|
9
|
-
function E(s, l) {
|
|
10
|
-
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
11
|
-
start: null,
|
|
12
|
-
end: null
|
|
13
|
-
};
|
|
14
|
-
return r[s] && window.clearTimeout(r[s].id), r[s] = {}, o.start && o.start(), r[s].id = window.setTimeout(function() {
|
|
15
|
-
o.end && o.end(), window.clearTimeout(r[s].id), delete r[s];
|
|
16
|
-
}, l), r[s].id;
|
|
17
|
-
}
|
|
18
|
-
function f(s) {
|
|
19
|
-
if (s) {
|
|
20
|
-
window.clearTimeout(s);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
Object.keys(r).map(function(l) {
|
|
24
|
-
window.clearTimeout(r[l].id), delete r[l];
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
var H = /* @__PURE__ */ (function(s) {
|
|
28
|
-
p(o, s);
|
|
29
|
-
var l = y(o);
|
|
30
|
-
function o(a) {
|
|
31
|
-
var t;
|
|
32
|
-
return m(this, o), t = l.call(this, a), h(d(t), "onPlayerReset", function() {
|
|
33
|
-
t.autoPlayStart = !1;
|
|
34
|
-
var e = t.config.mode === "auto" ? "auto-hide" : "hide";
|
|
35
|
-
t.setAttr("data-state", "play"), n.removeClass(t.root, e), t.show();
|
|
36
|
-
}), h(d(t), "onAutoplayStart", function() {
|
|
37
|
-
if (!t.autoPlayStart) {
|
|
38
|
-
var e = t.config.mode === "auto" ? "auto-hide" : "hide";
|
|
39
|
-
n.addClass(t.root, e), t.autoPlayStart = !0, t.toggleTo("play");
|
|
40
|
-
}
|
|
41
|
-
}), t.autoPlayStart = !1, t;
|
|
42
|
-
}
|
|
43
|
-
return v(o, [{
|
|
44
|
-
key: "afterCreate",
|
|
45
|
-
value: function() {
|
|
46
|
-
var t = this.playerConfig;
|
|
47
|
-
this.initIcons(), this.listenEvents(), this.bindClickEvents(), t.autoplay || this.show();
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
key: "listenEvents",
|
|
51
|
-
value: function() {
|
|
52
|
-
var t = this, e = this.player, i = this.playerConfig;
|
|
53
|
-
this.once(g, function() {
|
|
54
|
-
i && (i.lang && i.lang === "en" ? n.addClass(e.root, "lang-is-en") : i.lang === "jp" && n.addClass(e.root, "lang-is-jp"));
|
|
55
|
-
}), this.on(P, this.onAutoplayStart), this.on(w, function() {
|
|
56
|
-
var u = t.config.mode === "auto" ? "auto-hide" : "hide";
|
|
57
|
-
t.setAttr("data-state", "play"), n.removeClass(t.root, u), t.show();
|
|
58
|
-
}), this.on(C, function() {
|
|
59
|
-
t.toggleTo("play");
|
|
60
|
-
}), this.on(S, function() {
|
|
61
|
-
t.toggleTo("pause");
|
|
62
|
-
}), this.on(k, function() {
|
|
63
|
-
t.onPlayerReset();
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}, {
|
|
67
|
-
key: "bindClickEvents",
|
|
68
|
-
value: function() {
|
|
69
|
-
var t = this;
|
|
70
|
-
this.clickHandler = this.hook("startClick", this.switchPausePlay, {
|
|
71
|
-
pre: function(i) {
|
|
72
|
-
i.cancelable && i.preventDefault(), i.stopPropagation();
|
|
73
|
-
var u = t.player.paused;
|
|
74
|
-
t.emitUserAction(i, "switch_play_pause", {
|
|
75
|
-
props: "paused",
|
|
76
|
-
from: u,
|
|
77
|
-
to: !u
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}), this.bind(["click", "touchend"], this.clickHandler);
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "registerIcons",
|
|
84
|
-
value: function() {
|
|
85
|
-
return {
|
|
86
|
-
startPlay: {
|
|
87
|
-
icon: T,
|
|
88
|
-
class: "xg-icon-play"
|
|
89
|
-
},
|
|
90
|
-
startPause: {
|
|
91
|
-
icon: _,
|
|
92
|
-
class: "xg-icon-pause"
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}, {
|
|
97
|
-
key: "initIcons",
|
|
98
|
-
value: function() {
|
|
99
|
-
var t = this.icons;
|
|
100
|
-
this.appendChild("xg-start-inner", t.startPlay), this.appendChild("xg-start-inner", t.startPause);
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "hide",
|
|
104
|
-
value: function() {
|
|
105
|
-
n.addClass(this.root, "hide");
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
key: "show",
|
|
109
|
-
value: function(t) {
|
|
110
|
-
n.removeClass(this.root, "hide");
|
|
111
|
-
}
|
|
112
|
-
}, {
|
|
113
|
-
key: "focusHide",
|
|
114
|
-
value: function() {
|
|
115
|
-
n.addClass(this.root, "focus-hide");
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
key: "recover",
|
|
119
|
-
value: function() {
|
|
120
|
-
n.removeClass(this.root, "focus-hide");
|
|
121
|
-
}
|
|
122
|
-
}, {
|
|
123
|
-
key: "switchStatus",
|
|
124
|
-
value: function(t) {
|
|
125
|
-
t ? this.setAttr("data-state", this.player.paused ? "pause" : "play") : this.setAttr("data-state", this.player.paused ? "play" : "pause");
|
|
126
|
-
}
|
|
127
|
-
}, {
|
|
128
|
-
key: "animate",
|
|
129
|
-
value: function(t) {
|
|
130
|
-
var e = this;
|
|
131
|
-
this._animateId = E("pauseplay", 400, {
|
|
132
|
-
start: function() {
|
|
133
|
-
n.addClass(e.root, "interact"), e.show(), e.switchStatus(!0);
|
|
134
|
-
},
|
|
135
|
-
end: function() {
|
|
136
|
-
n.removeClass(e.root, "interact"), !t && e.hide(), e._animateId = null;
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}, {
|
|
141
|
-
key: "endAnimate",
|
|
142
|
-
value: function() {
|
|
143
|
-
n.removeClass(this.root, "interact"), f(this._animateId), this._animateId = null;
|
|
144
|
-
}
|
|
145
|
-
}, {
|
|
146
|
-
key: "switchPausePlay",
|
|
147
|
-
value: function(t) {
|
|
148
|
-
var e = this.player;
|
|
149
|
-
if (t.cancelable && t.preventDefault(), t.stopPropagation(), !(e.state < c.READY)) {
|
|
150
|
-
var i = this.player.paused;
|
|
151
|
-
!i && e.state === c.RUNNING ? e.pause() : e.play();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}, {
|
|
155
|
-
key: "onPlayPause",
|
|
156
|
-
value: function(t) {
|
|
157
|
-
this.toggleTo(t);
|
|
158
|
-
}
|
|
159
|
-
}, {
|
|
160
|
-
key: "toggleTo",
|
|
161
|
-
value: function(t) {
|
|
162
|
-
var e = this.config, i = this.player;
|
|
163
|
-
if (!(!i || i.state < c.RUNNING || !this.autoPlayStart)) {
|
|
164
|
-
if (e.mode === "show") {
|
|
165
|
-
this.switchStatus(), this.show();
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (e.mode === "auto") {
|
|
169
|
-
this.switchStatus();
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
if (e.isShowPause && i.paused && !i.ended || e.isShowEnd && i.ended) {
|
|
173
|
-
this.switchStatus(), this.show(), this.endAnimate();
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
if (e.disableAnimate) {
|
|
177
|
-
this.switchStatus(), this.hide();
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
if (t === "play")
|
|
181
|
-
this.autoPlayStart ? this.animate() : this.hide();
|
|
182
|
-
else {
|
|
183
|
-
if (!this.autoPlayStart || i.ended)
|
|
184
|
-
return;
|
|
185
|
-
this.animate();
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}, {
|
|
190
|
-
key: "destroy",
|
|
191
|
-
value: function() {
|
|
192
|
-
this.unbind(["click", "touchend"], this.clickHandler), f(this._animateId);
|
|
193
|
-
}
|
|
194
|
-
}, {
|
|
195
|
-
key: "render",
|
|
196
|
-
value: function() {
|
|
197
|
-
var t = this.playerConfig.autoplay ? this.config.mode === "auto" ? "auto-hide" : "hide" : "";
|
|
198
|
-
return `
|
|
199
|
-
<xg-start class="xgplayer-start `.concat(t, `">
|
|
200
|
-
<xg-start-inner></xg-start-inner>
|
|
201
|
-
</xg-start>`);
|
|
202
|
-
}
|
|
203
|
-
}], [{
|
|
204
|
-
key: "pluginName",
|
|
205
|
-
get: function() {
|
|
206
|
-
return "start";
|
|
207
|
-
}
|
|
208
|
-
}, {
|
|
209
|
-
key: "defaultConfig",
|
|
210
|
-
get: function() {
|
|
211
|
-
return {
|
|
212
|
-
isShowPause: !1,
|
|
213
|
-
isShowEnd: !1,
|
|
214
|
-
disableAnimate: !1,
|
|
215
|
-
mode: "hide"
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}]), o;
|
|
219
|
-
})(A);
|
|
220
|
-
export {
|
|
221
|
-
H as default
|
|
222
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { inherits as p, createSuper as v, classCallCheck as S, defineProperty as n, objectSpread2 as c, assertThisInitialized as d, createClass as g } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
-
import { USER_ACTION as y, STATS_EVENTS as T } from "../../events.js";
|
|
3
|
-
import w from "../../plugin/basePlugin.js";
|
|
4
|
-
import "../../../../../../../../_virtual/delegate.js";
|
|
5
|
-
var u = "info", _ = T, C = /* @__PURE__ */ (function(h) {
|
|
6
|
-
p(o, h);
|
|
7
|
-
var m = v(o);
|
|
8
|
-
function o() {
|
|
9
|
-
var e;
|
|
10
|
-
S(this, o);
|
|
11
|
-
for (var t = arguments.length, r = new Array(t), s = 0; s < t; s++)
|
|
12
|
-
r[s] = arguments[s];
|
|
13
|
-
return e = m.call.apply(m, [this].concat(r)), n(d(e), "_recordUserActions", function(a) {
|
|
14
|
-
var i = e._getTime(), f = Object.assign({}, a, {
|
|
15
|
-
msg: a.msg || a.action
|
|
16
|
-
});
|
|
17
|
-
e._stats[u].push(c(c({
|
|
18
|
-
type: "userAction"
|
|
19
|
-
}, i), {}, {
|
|
20
|
-
payload: f
|
|
21
|
-
}));
|
|
22
|
-
}), n(d(e), "_onReset", function() {
|
|
23
|
-
e.reset();
|
|
24
|
-
}), n(d(e), "_recordInfo", function(a) {
|
|
25
|
-
e.info(a);
|
|
26
|
-
}), n(d(e), "_downloadStats", function() {
|
|
27
|
-
var a = e.getStats(), i = new Blob([JSON.stringify(a)], {
|
|
28
|
-
type: "application/json"
|
|
29
|
-
}), f = window.URL.createObjectURL(i), l = document.createElement("a");
|
|
30
|
-
l.style.display = "none", l.href = f, l.download = "player.txt", l.disabled = !1, l.click();
|
|
31
|
-
}), e;
|
|
32
|
-
}
|
|
33
|
-
return g(o, [{
|
|
34
|
-
key: "_getTime",
|
|
35
|
-
value: function() {
|
|
36
|
-
return {
|
|
37
|
-
timestamp: Date.now(),
|
|
38
|
-
timeFormat: (/* @__PURE__ */ new Date()).toISOString()
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
key: "afterCreate",
|
|
43
|
-
value: function() {
|
|
44
|
-
this.reset(), this.on(y, this._recordUserActions), this.on(_.STATS_INFO, this._recordInfo), this.on(_.STATS_DOWNLOAD, this._downloadStats), this.on(_.STATS_RESET, this._onReset);
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
key: "destroy",
|
|
48
|
-
value: function() {
|
|
49
|
-
this.offAll();
|
|
50
|
-
}
|
|
51
|
-
}, {
|
|
52
|
-
key: "downloadStats",
|
|
53
|
-
value: function() {
|
|
54
|
-
this._downloadStats();
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
key: "info",
|
|
58
|
-
value: function(t) {
|
|
59
|
-
t.profile ? this._infoProfile(t) : this._info(t);
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
key: "_info",
|
|
63
|
-
value: function(t) {
|
|
64
|
-
var r = this._getTime();
|
|
65
|
-
this._stats[u].push(c(c({}, r), {}, {
|
|
66
|
-
payload: t
|
|
67
|
-
}));
|
|
68
|
-
}
|
|
69
|
-
}, {
|
|
70
|
-
key: "_infoProfile",
|
|
71
|
-
value: function(t) {
|
|
72
|
-
if (t && t.startMs) {
|
|
73
|
-
var r = Date.now(), s = r - t.startMs, a = c({
|
|
74
|
-
cat: "function",
|
|
75
|
-
dur: s,
|
|
76
|
-
name: t.name || t.msg,
|
|
77
|
-
ph: "X",
|
|
78
|
-
pid: 0,
|
|
79
|
-
tid: 0,
|
|
80
|
-
ts: t.startMs,
|
|
81
|
-
profile: !0
|
|
82
|
-
}, t);
|
|
83
|
-
this._info(a);
|
|
84
|
-
} else
|
|
85
|
-
console.warn("infoProfile need object data, include startMs");
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "reset",
|
|
89
|
-
value: function() {
|
|
90
|
-
var t;
|
|
91
|
-
this._stats = (t = {}, n(t, u, []), n(t, "media", {}), t);
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
key: "getStats",
|
|
95
|
-
value: function() {
|
|
96
|
-
for (var t = this.player, r = t.media, s = [], a = 0; a < r.buffered.length; a++)
|
|
97
|
-
s.push({
|
|
98
|
-
start: r.buffered.start(a),
|
|
99
|
-
end: r.buffered.end(a)
|
|
100
|
-
});
|
|
101
|
-
var i = {
|
|
102
|
-
currentTime: r.currentTime,
|
|
103
|
-
readyState: r.readyState,
|
|
104
|
-
buffered: s,
|
|
105
|
-
paused: r.paused,
|
|
106
|
-
ended: r.ended
|
|
107
|
-
};
|
|
108
|
-
return this._stats.media = i, {
|
|
109
|
-
raw: this._stats,
|
|
110
|
-
timestat: this._getTimeStats(),
|
|
111
|
-
profile: this._getProfile()
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
key: "_getTimeStats",
|
|
116
|
-
value: function() {
|
|
117
|
-
var t = this._stats[u], r = t.map(function(s) {
|
|
118
|
-
var a = s.payload.data, i = "";
|
|
119
|
-
try {
|
|
120
|
-
a instanceof Error ? i = a.msg : a !== void 0 && (i = JSON.stringify(a));
|
|
121
|
-
} catch (f) {
|
|
122
|
-
console.log("err", f);
|
|
123
|
-
}
|
|
124
|
-
return "[".concat(s.timeFormat, "] : ").concat(s.payload.msg, " ").concat(i, " ");
|
|
125
|
-
});
|
|
126
|
-
return r;
|
|
127
|
-
}
|
|
128
|
-
}, {
|
|
129
|
-
key: "_getProfile",
|
|
130
|
-
value: function() {
|
|
131
|
-
var t = {
|
|
132
|
-
traceEvents: []
|
|
133
|
-
}, r = this._stats[u];
|
|
134
|
-
return r.forEach(function(s) {
|
|
135
|
-
s.payload.profile && t.traceEvents.push(s.payload);
|
|
136
|
-
}), t;
|
|
137
|
-
}
|
|
138
|
-
}], [{
|
|
139
|
-
key: "pluginName",
|
|
140
|
-
get: function() {
|
|
141
|
-
return "stats";
|
|
142
|
-
}
|
|
143
|
-
}, {
|
|
144
|
-
key: "defaultConfig",
|
|
145
|
-
get: function() {
|
|
146
|
-
return {};
|
|
147
|
-
}
|
|
148
|
-
}]), o;
|
|
149
|
-
})(w);
|
|
150
|
-
export {
|
|
151
|
-
C as default
|
|
152
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { inherits as M, createSuper as P, classCallCheck as R, defineProperty as l, assertThisInitialized as o, createClass as x, toConsumableArray as z } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
-
import k from "../../utils/util.js";
|
|
3
|
-
import { DOWNLOAD_SPEED_CHANGE as T, LOADED_DATA as L, REPLAY as y } from "../../events.js";
|
|
4
|
-
import w from "../../plugin/plugin.js";
|
|
5
|
-
var c = "cdn", S = ["cdn"], I = /* @__PURE__ */ (function(_) {
|
|
6
|
-
M(f, _);
|
|
7
|
-
var g = P(f);
|
|
8
|
-
function f() {
|
|
9
|
-
var e;
|
|
10
|
-
R(this, f);
|
|
11
|
-
for (var a = arguments.length, r = new Array(a), n = 0; n < a; n++)
|
|
12
|
-
r[n] = arguments[n];
|
|
13
|
-
return e = g.call.apply(g, [this].concat(r)), l(o(e), "getSpeed", function() {
|
|
14
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : c;
|
|
15
|
-
if (!e.speedListCache || !e.speedListCache[t] || e.speedListCache[t].length <= 0)
|
|
16
|
-
return 0;
|
|
17
|
-
var i = 0;
|
|
18
|
-
return e.speedListCache[t].map(function(d) {
|
|
19
|
-
i += d;
|
|
20
|
-
}), Math.floor(i / e.speedListCache[t].length);
|
|
21
|
-
}), l(o(e), "startTimer", function() {
|
|
22
|
-
k.isMSE(e.player.video) || (e.initSpeedList(), e.cnt = 0, e.timer = setTimeout(e.testSpeed, e.config.testTimeStep));
|
|
23
|
-
}), l(o(e), "initSpeedList", function() {
|
|
24
|
-
e.speedListCache = {}, S.forEach(function(t) {
|
|
25
|
-
e.speedListCache[t] = [];
|
|
26
|
-
});
|
|
27
|
-
}), l(o(e), "_onRealSpeedChange", function(t) {
|
|
28
|
-
t.speed && e.appendList(t.speed, t.type || c);
|
|
29
|
-
}), l(o(e), "testSpeed", function() {
|
|
30
|
-
if (clearTimeout(e.timer), e.timer = null, !(!e.player || !e.config.openSpeed)) {
|
|
31
|
-
var t = e.config, i = t.url, d = t.loadSize, s = t.testCnt, p = t.testTimeStep, E = i + (i.indexOf("?") < 0 ? "?testst=" : "&testst=") + Date.now();
|
|
32
|
-
if (!(e.cnt >= s)) {
|
|
33
|
-
e.cnt++;
|
|
34
|
-
try {
|
|
35
|
-
var D = (/* @__PURE__ */ new Date()).getTime(), v = null, h = new XMLHttpRequest();
|
|
36
|
-
e.xhr = h, h.open("GET", E);
|
|
37
|
-
var m = {}, C = Math.floor(Math.random() * 10);
|
|
38
|
-
m.Range = "bytes=" + C + "-" + (d + C), m && Object.keys(m).forEach(function(u) {
|
|
39
|
-
h.setRequestHeader(u, m[u]);
|
|
40
|
-
}), h.onreadystatechange = function() {
|
|
41
|
-
if (h.readyState === 4) {
|
|
42
|
-
e.xhr = null, v = (/* @__PURE__ */ new Date()).getTime();
|
|
43
|
-
var u = h.getResponseHeader("Content-Length") / 1024 * 8, A = Math.round(u * 1e3 / (v - D));
|
|
44
|
-
e.appendList(A), e.timer = setTimeout(e.testSpeed, p);
|
|
45
|
-
}
|
|
46
|
-
}, h.send();
|
|
47
|
-
} catch (u) {
|
|
48
|
-
console.error(u);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}), l(o(e), "appendList", function(t) {
|
|
53
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c;
|
|
54
|
-
if (!(!e.speedListCache || !e.speedListCache[i])) {
|
|
55
|
-
var d = e.config.saveSpeedMax;
|
|
56
|
-
e.speedListCache[i].length >= d && e.speedListCache[i].shift(), e.speedListCache[i].push(t);
|
|
57
|
-
var s = o(e), p = s.player;
|
|
58
|
-
p && (i === c ? p.realTimeSpeed = t : p[e.getSpeedName("realTime", i)] = t), e.updateSpeed(i);
|
|
59
|
-
}
|
|
60
|
-
}), l(o(e), "updateSpeed", function() {
|
|
61
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : c, i = e.getSpeed(t), d = o(e), s = d.player;
|
|
62
|
-
if (s)
|
|
63
|
-
if (t === c)
|
|
64
|
-
(!s.avgSpeed || i !== s.avgSpeed) && (s.avgSpeed = i, s.emit(T, {
|
|
65
|
-
speed: i,
|
|
66
|
-
realTimeSpeed: s.realTimeSpeed
|
|
67
|
-
}));
|
|
68
|
-
else {
|
|
69
|
-
var p = e.getSpeedName("avg", t);
|
|
70
|
-
(!s[p] || i !== s[p]) && (s[p] = i, s.emit(T, {
|
|
71
|
-
speed: i,
|
|
72
|
-
realTimeSpeed: s.realTimeSpeed
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
}), e;
|
|
76
|
-
}
|
|
77
|
-
return x(f, [{
|
|
78
|
-
key: "afterCreate",
|
|
79
|
-
value: function() {
|
|
80
|
-
var a = this.config, r = a.openSpeed, n = a.addSpeedTypeList;
|
|
81
|
-
n?.length > 0 && S.push.apply(S, z(n)), this.initSpeedList(), this.on("real_time_speed", this._onRealSpeedChange), this.timer = null, this.cnt = 0, this.xhr = null, r && this.on([L, y], this.startTimer);
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "getSpeedName",
|
|
85
|
-
value: function(a, r) {
|
|
86
|
-
return a + "Speed" + r.toUpperCase();
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "openSpeed",
|
|
90
|
-
get: function() {
|
|
91
|
-
return this.config.openSpeed;
|
|
92
|
-
},
|
|
93
|
-
set: function(a) {
|
|
94
|
-
if (this.config.openSpeed = a, !a && this.timer) {
|
|
95
|
-
clearTimeout(this.timer), this.timer = null;
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
if (this.config.openSpeed) {
|
|
99
|
-
if (this.timer)
|
|
100
|
-
return;
|
|
101
|
-
this.timer = setTimeout(this.testSpeed, this.config.testTimeStep);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
key: "destroy",
|
|
106
|
-
value: function() {
|
|
107
|
-
var a = this;
|
|
108
|
-
this.off("real_time_speed", this._onRealSpeedChange), this.off([L, y], this.startTimer), S.forEach(function(r) {
|
|
109
|
-
a.speedListCache && a.speedListCache[r] && (a.speedListCache[r] = []);
|
|
110
|
-
}), this.speedListCache && (this.speedListCache = {}), clearTimeout(this.timer), this.timer = null, this.xhr && this.xhr.readyState !== 4 && (this.xhr.cancel && this.xhr.cancel(), this.xhr = null);
|
|
111
|
-
}
|
|
112
|
-
}], [{
|
|
113
|
-
key: "pluginName",
|
|
114
|
-
get: function() {
|
|
115
|
-
return "testspeed";
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
key: "defaultConfig",
|
|
119
|
-
get: function() {
|
|
120
|
-
return {
|
|
121
|
-
openSpeed: !1,
|
|
122
|
-
testCnt: 3,
|
|
123
|
-
loadSize: 200 * 1024,
|
|
124
|
-
testTimeStep: 3e3,
|
|
125
|
-
url: "",
|
|
126
|
-
saveSpeedMax: 5,
|
|
127
|
-
addSpeedTypeList: []
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}]), f;
|
|
131
|
-
})(w);
|
|
132
|
-
export {
|
|
133
|
-
I as default
|
|
134
|
-
};
|