xgplayer 2.32.5 → 2.32.6

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.
Files changed (371) hide show
  1. package/browser/controls/airplay.js +1 -1
  2. package/browser/controls/cssFullscreen.js +1 -1
  3. package/browser/controls/danmu.js +3 -1
  4. package/browser/controls/definition.js +1 -1
  5. package/browser/controls/download.js +1 -1
  6. package/browser/controls/enter.js +1 -1
  7. package/browser/controls/error.js +1 -1
  8. package/browser/controls/errorRetry.js +1 -1
  9. package/browser/controls/flex.js +1 -1
  10. package/browser/controls/fullscreen.js +1 -1
  11. package/browser/controls/loading.js +1 -1
  12. package/browser/controls/memoryPlay.js +1 -1
  13. package/browser/controls/miniplayer.js +9 -7
  14. package/browser/controls/mobile.js +1 -1
  15. package/browser/controls/nativeTextTrack.js +1 -1
  16. package/browser/controls/pc.js +1 -1
  17. package/browser/controls/pip.js +1 -1
  18. package/browser/controls/play.js +1 -1
  19. package/browser/controls/playNext.js +1 -1
  20. package/browser/controls/playbackRate.js +1 -1
  21. package/browser/controls/poster.js +1 -1
  22. package/browser/controls/progress.js +1 -1
  23. package/browser/controls/reload.js +1 -1
  24. package/browser/controls/replay.js +1 -1
  25. package/browser/controls/rotate.js +1 -1
  26. package/browser/controls/screenShot.js +1 -1
  27. package/browser/controls/start.js +1 -1
  28. package/browser/controls/textTrack.js +1 -1
  29. package/browser/controls/time.js +1 -1
  30. package/browser/controls/volume.js +1 -1
  31. package/browser/core_player.js +1 -1
  32. package/browser/core_player.js.map +1 -1
  33. package/browser/index.js +11 -7
  34. package/browser/index.js.map +1 -1
  35. package/browser/simple_player.js +1 -1
  36. package/browser/simple_player.js.map +1 -1
  37. package/dist/controls/airplay.js +1 -1
  38. package/dist/controls/cssFullscreen.js +1 -1
  39. package/dist/controls/danmu.js +3 -1
  40. package/dist/controls/definition.js +1 -1
  41. package/dist/controls/download.js +1 -1
  42. package/dist/controls/enter.js +1 -1
  43. package/dist/controls/error.js +1 -1
  44. package/dist/controls/errorRetry.js +1 -1
  45. package/dist/controls/flex.js +1 -1
  46. package/dist/controls/fullscreen.js +1 -1
  47. package/dist/controls/loading.js +1 -1
  48. package/dist/controls/memoryPlay.js +1 -1
  49. package/dist/controls/miniplayer.js +9 -7
  50. package/dist/controls/mobile.js +1 -1
  51. package/dist/controls/nativeTextTrack.js +1 -1
  52. package/dist/controls/pc.js +1 -1
  53. package/dist/controls/pip.js +1 -1
  54. package/dist/controls/play.js +1 -1
  55. package/dist/controls/playNext.js +1 -1
  56. package/dist/controls/playbackRate.js +1 -1
  57. package/dist/controls/poster.js +1 -1
  58. package/dist/controls/progress.js +1 -1
  59. package/dist/controls/reload.js +1 -1
  60. package/dist/controls/replay.js +1 -1
  61. package/dist/controls/rotate.js +1 -1
  62. package/dist/controls/screenShot.js +1 -1
  63. package/dist/controls/start.js +1 -1
  64. package/dist/controls/textTrack.js +1 -1
  65. package/dist/controls/time.js +1 -1
  66. package/dist/controls/volume.js +1 -1
  67. package/dist/core_player.js +2960 -2889
  68. package/dist/core_player.js.map +1 -1
  69. package/dist/index.js +1938 -3321
  70. package/dist/index.js.map +1 -1
  71. package/dist/index.min.css +1 -0
  72. package/dist/index.min.js +2 -0
  73. package/dist/index.min.js.map +1 -0
  74. package/dist/simple_player.js +274 -281
  75. package/dist/simple_player.js.map +1 -1
  76. package/es/_virtual/_rollupPluginBabelHelpers.js +216 -0
  77. package/es/constant.d.ts +4 -0
  78. package/es/constant.js +5 -0
  79. package/es/controls/airplay.js +1 -1
  80. package/es/controls/cssFullscreen.js +1 -1
  81. package/es/controls/danmu.js +3 -1
  82. package/es/controls/definition.js +1 -1
  83. package/es/controls/download.js +1 -1
  84. package/es/controls/enter.js +1 -1
  85. package/es/controls/error.js +1 -1
  86. package/es/controls/errorRetry.js +1 -1
  87. package/es/controls/flex.js +1 -1
  88. package/es/controls/fullscreen.js +1 -1
  89. package/es/controls/i18n.js +1 -1
  90. package/es/controls/keyboard.js +1 -1
  91. package/es/controls/loading.js +1 -1
  92. package/es/controls/localPreview.js +1 -1
  93. package/es/controls/memoryPlay.js +1 -1
  94. package/es/controls/miniplayer.js +9 -7
  95. package/es/controls/mobile.js +1 -1
  96. package/es/controls/nativeTextTrack.js +1 -1
  97. package/es/controls/pc.js +1 -1
  98. package/es/controls/pip.js +1 -1
  99. package/es/controls/play.js +1 -1
  100. package/es/controls/playNext.js +1 -1
  101. package/es/controls/playbackRate.js +1 -1
  102. package/es/controls/poster.js +1 -1
  103. package/es/controls/progress.js +1 -1
  104. package/es/controls/reload.js +1 -1
  105. package/es/controls/replay.js +1 -1
  106. package/es/controls/rotate.js +1 -1
  107. package/es/controls/screenShot.js +1 -1
  108. package/es/controls/start.js +1 -1
  109. package/es/controls/textTrack.js +1 -1
  110. package/es/controls/time.js +1 -1
  111. package/es/controls/volume.js +1 -1
  112. package/es/core_player.js +1 -1
  113. package/es/core_player.js.map +1 -1
  114. package/es/defaultConfig.d.ts +243 -0
  115. package/es/defaultConfig.js +85 -0
  116. package/es/error.d.ts +114 -0
  117. package/es/error.js +75 -0
  118. package/es/events.d.ts +61 -0
  119. package/es/events.js +62 -0
  120. package/es/icons.d.ts +2 -0
  121. package/es/index.css +499 -0
  122. package/es/index.d.ts +25 -0
  123. package/es/index.js +11 -7
  124. package/es/index.js.map +1 -1
  125. package/es/index.scss +29 -0
  126. package/es/index.umd.d.ts +60 -0
  127. package/es/index.umd.js +30 -0
  128. package/es/lang/en.d.ts +91 -0
  129. package/es/lang/en.js +77 -0
  130. package/es/lang/i18n.d.ts +36 -0
  131. package/es/lang/i18n.js +122 -0
  132. package/es/lang/index.d.ts +2 -0
  133. package/es/lang/jp.d.ts +91 -0
  134. package/es/lang/jp.js +77 -0
  135. package/es/lang/zh-cn.d.ts +91 -0
  136. package/es/lang/zh-cn.js +77 -0
  137. package/es/lang/zh-hk.d.ts +91 -0
  138. package/es/lang/zh-hk.js +77 -0
  139. package/es/mediaProxy.d.ts +334 -0
  140. package/es/mediaProxy.js +623 -0
  141. package/es/player.d.ts +825 -0
  142. package/es/player.js +1945 -0
  143. package/es/plugin/basePlugin.d.ts +180 -0
  144. package/es/plugin/basePlugin.js +259 -0
  145. package/es/plugin/hooksDescriptor.d.ts +60 -0
  146. package/es/plugin/hooksDescriptor.js +149 -0
  147. package/es/plugin/index.d.ts +13 -0
  148. package/es/plugin/plugin.d.ts +207 -0
  149. package/es/plugin/plugin.js +542 -0
  150. package/es/plugin/pluginsManager.d.ts +162 -0
  151. package/es/plugin/pluginsManager.js +362 -0
  152. package/es/plugin/preset.d.ts +1 -0
  153. package/es/plugin/preset.js +28 -0
  154. package/es/plugin/resizeObserver.d.ts +3 -0
  155. package/es/plugin/resizeObserver.js +108 -0
  156. package/es/plugins/assets/back.js +4 -0
  157. package/es/plugins/assets/download.js +4 -0
  158. package/es/plugins/assets/exitCssFull.js +4 -0
  159. package/es/plugins/assets/exitFull.js +4 -0
  160. package/es/plugins/assets/loading.js +4 -0
  161. package/es/plugins/assets/panel.js +4 -0
  162. package/es/plugins/assets/pause.js +4 -0
  163. package/es/plugins/assets/pipIcon.js +4 -0
  164. package/es/plugins/assets/pipIconExit.js +4 -0
  165. package/es/plugins/assets/play.js +4 -0
  166. package/es/plugins/assets/playNext.js +4 -0
  167. package/es/plugins/assets/replay.js +4 -0
  168. package/es/plugins/assets/requestCssFull.js +7 -0
  169. package/es/plugins/assets/requestFull.js +4 -0
  170. package/es/plugins/assets/rotate.js +4 -0
  171. package/es/plugins/assets/seekicon.js +4 -0
  172. package/es/plugins/assets/volumeLarge.js +4 -0
  173. package/es/plugins/assets/volumeMuted.js +4 -0
  174. package/es/plugins/assets/volumeSmall.js +4 -0
  175. package/es/plugins/common/iconPlugin.d.ts +5 -0
  176. package/es/plugins/common/iconPlugin.js +42 -0
  177. package/es/plugins/common/iconTools.d.ts +1 -0
  178. package/es/plugins/common/iconTools.js +8 -0
  179. package/es/plugins/common/index.scss +2 -0
  180. package/es/plugins/common/optionList.d.ts +15 -0
  181. package/es/plugins/common/optionList.js +120 -0
  182. package/es/plugins/common/optionsIcon.d.ts +40 -0
  183. package/es/plugins/common/optionsIcon.js +304 -0
  184. package/es/plugins/common/optionsIcon.scss +154 -0
  185. package/es/plugins/common/thumbnail.d.ts +62 -0
  186. package/es/plugins/common/thumbnail.js +191 -0
  187. package/es/plugins/common/thumbnail.scss +27 -0
  188. package/es/plugins/controls/index.css +132 -0
  189. package/es/plugins/controls/index.d.ts +73 -0
  190. package/es/plugins/controls/index.js +189 -0
  191. package/es/plugins/controls/index.scss +204 -0
  192. package/es/plugins/cssFullScreen/index.css +12 -0
  193. package/es/plugins/cssFullScreen/index.d.ts +40 -0
  194. package/es/plugins/cssFullScreen/index.js +136 -0
  195. package/es/plugins/cssFullScreen/index.scss +19 -0
  196. package/es/plugins/danmu/danmuIcon.d.ts +24 -0
  197. package/es/plugins/danmu/danmuIcon.js +98 -0
  198. package/es/plugins/danmu/danmuPanel.d.ts +39 -0
  199. package/es/plugins/danmu/danmuPanel.js +81 -0
  200. package/es/plugins/danmu/index.css +603 -0
  201. package/es/plugins/danmu/index.d.ts +96 -0
  202. package/es/plugins/danmu/index.js +313 -0
  203. package/es/plugins/danmu/index.scss +356 -0
  204. package/es/plugins/definition/index.css +4 -0
  205. package/es/plugins/definition/index.d.ts +38 -0
  206. package/es/plugins/definition/index.js +164 -0
  207. package/es/plugins/definition/index.scss +4 -0
  208. package/es/plugins/download/index.css +13 -0
  209. package/es/plugins/download/index.d.ts +31 -0
  210. package/es/plugins/download/index.js +107 -0
  211. package/es/plugins/download/index.scss +22 -0
  212. package/es/plugins/dynamicBg/index.css +16 -0
  213. package/es/plugins/dynamicBg/index.d.ts +83 -0
  214. package/es/plugins/dynamicBg/index.js +316 -0
  215. package/es/plugins/dynamicBg/index.scss +19 -0
  216. package/es/plugins/enter/index.css +104 -0
  217. package/es/plugins/enter/index.d.ts +19 -0
  218. package/es/plugins/enter/index.js +46 -0
  219. package/es/plugins/enter/index.scss +78 -0
  220. package/es/plugins/error/index.css +29 -0
  221. package/es/plugins/error/index.d.ts +8 -0
  222. package/es/plugins/error/index.js +75 -0
  223. package/es/plugins/error/index.scss +34 -0
  224. package/es/plugins/fpsDetect/index.d.ts +34 -0
  225. package/es/plugins/fpsDetect/index.js +149 -0
  226. package/es/plugins/fullscreen/backicon.d.ts +17 -0
  227. package/es/plugins/fullscreen/backicon.js +72 -0
  228. package/es/plugins/fullscreen/index.css +23 -0
  229. package/es/plugins/fullscreen/index.d.ts +58 -0
  230. package/es/plugins/fullscreen/index.js +202 -0
  231. package/es/plugins/fullscreen/index.scss +35 -0
  232. package/es/plugins/gapJump/index.d.ts +21 -0
  233. package/es/plugins/gapJump/index.js +142 -0
  234. package/es/plugins/keyboard/index.d.ts +89 -0
  235. package/es/plugins/keyboard/index.js +421 -0
  236. package/es/plugins/loading/index.css +58 -0
  237. package/es/plugins/loading/index.d.ts +11 -0
  238. package/es/plugins/loading/index.js +43 -0
  239. package/es/plugins/loading/index.scss +70 -0
  240. package/es/plugins/logger/index.d.ts +54 -0
  241. package/es/plugins/logger/index.js +311 -0
  242. package/es/plugins/miniScreen/index.css +179 -0
  243. package/es/plugins/miniScreen/index.d.ts +68 -0
  244. package/es/plugins/miniScreen/index.js +212 -0
  245. package/es/plugins/miniScreen/index.scss +198 -0
  246. package/es/plugins/miniScreen/miniScreenIcon.d.ts +11 -0
  247. package/es/plugins/miniScreen/miniScreenIcon.js +56 -0
  248. package/es/plugins/mobile/index.css +181 -0
  249. package/es/plugins/mobile/index.d.ts +125 -0
  250. package/es/plugins/mobile/index.js +631 -0
  251. package/es/plugins/mobile/index.scss +180 -0
  252. package/es/plugins/mobile/touch.d.ts +43 -0
  253. package/es/plugins/mobile/touch.js +214 -0
  254. package/es/plugins/netAdaption/index.d.ts +5 -0
  255. package/es/plugins/pc/index.css +3 -0
  256. package/es/plugins/pc/index.d.ts +14 -0
  257. package/es/plugins/pc/index.js +199 -0
  258. package/es/plugins/pc/index.scss +5 -0
  259. package/es/plugins/pip/index.css +12 -0
  260. package/es/plugins/pip/index.d.ts +37 -0
  261. package/es/plugins/pip/index.js +222 -0
  262. package/es/plugins/pip/index.scss +21 -0
  263. package/es/plugins/play/index.css +12 -0
  264. package/es/plugins/play/index.d.ts +23 -0
  265. package/es/plugins/play/index.js +127 -0
  266. package/es/plugins/play/index.scss +18 -0
  267. package/es/plugins/playNext/index.css +22 -0
  268. package/es/plugins/playNext/index.d.ts +19 -0
  269. package/es/plugins/playNext/index.js +104 -0
  270. package/es/plugins/playNext/index.scss +35 -0
  271. package/es/plugins/playbackRate/index.css +4 -0
  272. package/es/plugins/playbackRate/index.d.ts +31 -0
  273. package/es/plugins/playbackRate/index.js +140 -0
  274. package/es/plugins/playbackRate/index.scss +6 -0
  275. package/es/plugins/poster/index.css +39 -0
  276. package/es/plugins/poster/index.d.ts +27 -0
  277. package/es/plugins/poster/index.js +109 -0
  278. package/es/plugins/poster/index.scss +56 -0
  279. package/es/plugins/progress/index.css +234 -0
  280. package/es/plugins/progress/index.d.ts +178 -0
  281. package/es/plugins/progress/index.js +687 -0
  282. package/es/plugins/progress/index.scss +288 -0
  283. package/es/plugins/progress/innerList.d.ts +49 -0
  284. package/es/plugins/progress/innerList.js +285 -0
  285. package/es/plugins/progress/miniProgress.d.ts +9 -0
  286. package/es/plugins/progress/miniProgress.js +55 -0
  287. package/es/plugins/progressPreview/dotsApi.d.ts +1 -0
  288. package/es/plugins/progressPreview/dotsApi.js +269 -0
  289. package/es/plugins/progressPreview/index.css +190 -0
  290. package/es/plugins/progressPreview/index.d.ts +87 -0
  291. package/es/plugins/progressPreview/index.js +475 -0
  292. package/es/plugins/progressPreview/index.scss +235 -0
  293. package/es/plugins/prompt/index.css +47 -0
  294. package/es/plugins/prompt/index.d.ts +24 -0
  295. package/es/plugins/prompt/index.js +110 -0
  296. package/es/plugins/prompt/index.scss +53 -0
  297. package/es/plugins/replay/index.css +33 -0
  298. package/es/plugins/replay/index.d.ts +16 -0
  299. package/es/plugins/replay/index.js +109 -0
  300. package/es/plugins/replay/index.scss +41 -0
  301. package/es/plugins/rotate/index.css +0 -0
  302. package/es/plugins/rotate/index.d.ts +22 -0
  303. package/es/plugins/rotate/index.js +148 -0
  304. package/es/plugins/rotate/index.scss +0 -0
  305. package/es/plugins/rotate/index2.js +2 -0
  306. package/es/plugins/screenShot/index.css +3 -0
  307. package/es/plugins/screenShot/index.d.ts +30 -0
  308. package/es/plugins/screenShot/index.js +178 -0
  309. package/es/plugins/screenShot/index.scss +5 -0
  310. package/es/plugins/start/index.css +91 -0
  311. package/es/plugins/start/index.d.ts +41 -0
  312. package/es/plugins/start/index.js +267 -0
  313. package/es/plugins/start/index.scss +115 -0
  314. package/es/plugins/stats/index.d.ts +38 -0
  315. package/es/plugins/stats/index.js +194 -0
  316. package/es/plugins/testspeed/index.d.ts +26 -0
  317. package/es/plugins/testspeed/index.js +207 -0
  318. package/es/plugins/time/index.css +46 -0
  319. package/es/plugins/time/index.d.ts +28 -0
  320. package/es/plugins/time/index.js +225 -0
  321. package/es/plugins/time/index.scss +57 -0
  322. package/es/plugins/time/timesegments.d.ts +24 -0
  323. package/es/plugins/time/timesegments.js +216 -0
  324. package/es/plugins/track/index.css +91 -0
  325. package/es/plugins/track/index.d.ts +132 -0
  326. package/es/plugins/track/index.js +463 -0
  327. package/es/plugins/track/index.scss +111 -0
  328. package/es/plugins/track/nativeSubTitle.d.ts +22 -0
  329. package/es/plugins/track/nativeSubTitle.js +94 -0
  330. package/es/plugins/volume/index.css +95 -0
  331. package/es/plugins/volume/index.d.ts +88 -0
  332. package/es/plugins/volume/index.js +319 -0
  333. package/es/plugins/volume/index.scss +124 -0
  334. package/es/plugins/waitingTimeoutJump/index.d.ts +15 -0
  335. package/es/plugins/waitingTimeoutJump/index.js +88 -0
  336. package/es/presets/default-en.d.ts +33 -0
  337. package/es/presets/default-en.js +63 -0
  338. package/es/presets/default.d.ts +34 -0
  339. package/es/presets/default.js +70 -0
  340. package/es/presets/index.d.ts +4 -0
  341. package/es/presets/live.d.ts +94 -0
  342. package/es/presets/live.js +39 -0
  343. package/es/presets/mobile.d.ts +103 -0
  344. package/es/presets/mobile.js +34 -0
  345. package/es/simple_player.js +1 -1
  346. package/es/simple_player.js.map +1 -1
  347. package/es/state.d.ts +11 -0
  348. package/es/state.js +12 -0
  349. package/es/stateClassMap.d.ts +32 -0
  350. package/es/stateClassMap.js +32 -0
  351. package/es/style/common/animation.scss +16 -0
  352. package/es/style/common/svg-url.scss +70 -0
  353. package/es/style/common.scss +457 -0
  354. package/es/style/index.scss +4 -0
  355. package/es/style/variable.scss +76 -0
  356. package/es/utils/database.d.ts +31 -0
  357. package/es/utils/database.js +107 -0
  358. package/es/utils/debug.d.ts +10 -0
  359. package/es/utils/debug.js +43 -0
  360. package/es/utils/draggabilly.d.ts +54 -0
  361. package/es/utils/draggabilly.js +410 -0
  362. package/es/utils/sniffer.d.ts +28 -0
  363. package/es/utils/sniffer.js +150 -0
  364. package/es/utils/url.d.ts +1 -0
  365. package/es/utils/util.d.ts +304 -0
  366. package/es/utils/util.js +827 -0
  367. package/es/utils/xgplayerTimeRange.d.ts +7 -0
  368. package/es/utils/xgplayerTimeRange.js +25 -0
  369. package/es/version.d.ts +2 -0
  370. package/es/version.js +2 -0
  371. package/package.json +2 -3
package/es/state.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export namespace STATES {
2
+ const INITIAL: number;
3
+ const READY: number;
4
+ const ATTACHING: number;
5
+ const ATTACHED: number;
6
+ const NOTALLOW: number;
7
+ const RUNNING: number;
8
+ const ENDED: number;
9
+ const DESTROYED: number;
10
+ }
11
+ export const STATE_ARRAY: string[];
package/es/state.js ADDED
@@ -0,0 +1,12 @@
1
+ var STATES = {
2
+ INITIAL: 1,
3
+ READY: 2,
4
+ ATTACHING: 3,
5
+ ATTACHED: 4,
6
+ NOTALLOW: 5,
7
+ RUNNING: 6,
8
+ ENDED: 7,
9
+ DESTROYED: 8
10
+ };
11
+ var STATE_ARRAY = ["ERROR", "INITIAL", "READY", "ATTACHING", "ATTACHED", "NOTALLOW", "RUNNING", "ENDED", "DESTROYED"];
12
+ export { STATES, STATE_ARRAY };
@@ -0,0 +1,32 @@
1
+ declare namespace _default {
2
+ const DEFAULT: string;
3
+ const DEFAULT_SKIN: string;
4
+ const ENTER: string;
5
+ const PAUSED: string;
6
+ const PLAYING: string;
7
+ const ENDED: string;
8
+ const CANPLAY: string;
9
+ const LOADING: string;
10
+ const ERROR: string;
11
+ const REPLAY: string;
12
+ const NO_START: string;
13
+ const ACTIVE: string;
14
+ const INACTIVE: string;
15
+ const FULLSCREEN: string;
16
+ const CSS_FULLSCREEN: string;
17
+ const ROTATE_FULLSCREEN: string;
18
+ const PARENT_ROTATE_FULLSCREEN: string;
19
+ const PARENT_FULLSCREEN: string;
20
+ const INNER_FULLSCREEN: string;
21
+ const NO_CONTROLS: string;
22
+ const FLEX_CONTROLS: string;
23
+ const CONTROLS_FOLLOW: string;
24
+ const CONTROLS_AUTOHIDE: string;
25
+ const TOP_BAR_AUTOHIDE: string;
26
+ const NOT_ALLOW_AUTOPLAY: string;
27
+ const SEEKING: string;
28
+ const PC: string;
29
+ const MOBILE: string;
30
+ const MINI: string;
31
+ }
32
+ export default _default;
@@ -0,0 +1,32 @@
1
+ var STATE_CLASS = {
2
+ DEFAULT: "xgplayer",
3
+ DEFAULT_SKIN: "xgplayer-skin-default",
4
+ ENTER: "xgplayer-is-enter",
5
+ PAUSED: "xgplayer-pause",
6
+ PLAYING: "xgplayer-playing",
7
+ ENDED: "xgplayer-ended",
8
+ CANPLAY: "xgplayer-canplay",
9
+ LOADING: "xgplayer-isloading",
10
+ ERROR: "xgplayer-is-error",
11
+ REPLAY: "xgplayer-replay",
12
+ NO_START: "xgplayer-nostart",
13
+ ACTIVE: "xgplayer-active",
14
+ INACTIVE: "xgplayer-inactive",
15
+ FULLSCREEN: "xgplayer-is-fullscreen",
16
+ CSS_FULLSCREEN: "xgplayer-is-cssfullscreen",
17
+ ROTATE_FULLSCREEN: "xgplayer-rotate-fullscreen",
18
+ PARENT_ROTATE_FULLSCREEN: "xgplayer-rotate-parent",
19
+ PARENT_FULLSCREEN: "xgplayer-fullscreen-parent",
20
+ INNER_FULLSCREEN: "xgplayer-fullscreen-inner",
21
+ NO_CONTROLS: "no-controls",
22
+ FLEX_CONTROLS: "flex-controls",
23
+ CONTROLS_FOLLOW: "controls-follow",
24
+ CONTROLS_AUTOHIDE: "controls-autohide",
25
+ TOP_BAR_AUTOHIDE: "top-bar-autohide",
26
+ NOT_ALLOW_AUTOPLAY: "not-allow-autoplay",
27
+ SEEKING: "seeking",
28
+ PC: "xgplayer-pc",
29
+ MOBILE: "xgplayer-mobile",
30
+ MINI: "xgplayer-mini"
31
+ };
32
+ export { STATE_CLASS as default };
@@ -0,0 +1,16 @@
1
+ @keyframes loadingRotate {
2
+ 0% {
3
+ transform: rotate(0);
4
+ }
5
+ 100% {
6
+ transform: rotate(360deg);
7
+ }
8
+ }
9
+ @keyframes loadingDashOffset {
10
+ 0% {
11
+ stroke-dashoffset: 236;
12
+ }
13
+ 100% {
14
+ stroke-dashoffset: 0;
15
+ }
16
+ }
@@ -0,0 +1,70 @@
1
+ //
2
+ // Function to create an optimized svg url
3
+ //
4
+ // Helper function to replace characters in a string
5
+ @function str-replace($string, $search, $replace: '') {
6
+ $index: str-index($string, $search);
7
+ @return if($index,
8
+ str-slice($string, 1, $index - 1) + $replace +
9
+ str-replace(str-slice($string, $index +
10
+ str-length($search)), $search, $replace),
11
+ $string);
12
+ }
13
+
14
+ @function svg-url($svg){
15
+ //
16
+ // Add missing namespace
17
+ //
18
+ @if not str-index($svg,xmlns) {
19
+ $svg: str-replace($svg, '<svg','<svg xmlns="http://www.w3.org/2000/svg"');
20
+ }
21
+ //
22
+ // Chunk up string in order to avoid
23
+ // "stack level too deep" error
24
+ //
25
+ $encoded:'';
26
+ $slice: 2000;
27
+ $index: 0;
28
+ $loops: ceil(str-length($svg)/$slice);
29
+ @for $i from 1 through $loops {
30
+ $chunk: str-slice($svg, $index, $index + $slice - 1);
31
+ //
32
+ // Encode
33
+ //
34
+ $chunk: str-replace($chunk, '"', '\'');
35
+ $chunk: str-replace($chunk, '%', '%25');
36
+ $chunk: str-replace($chunk, '#', '%23');
37
+ $chunk: str-replace($chunk, '{', '%7B');
38
+ $chunk: str-replace($chunk, '}', '%7D');
39
+ $chunk: str-replace($chunk, '<', '%3C');
40
+ $chunk: str-replace($chunk, '>', '%3E');
41
+
42
+ //
43
+ // The maybe list
44
+ //
45
+ // Keep size and compile time down
46
+ // ... only add on documented fail
47
+ //
48
+ // $chunk: str-replace($chunk, '&', '%26');
49
+ // $chunk: str-replace($chunk, '|', '%7C');
50
+ // $chunk: str-replace($chunk, '[', '%5B');
51
+ // $chunk: str-replace($chunk, ']', '%5D');
52
+ // $chunk: str-replace($chunk, '^', '%5E');
53
+ // $chunk: str-replace($chunk, '`', '%60');
54
+ // $chunk: str-replace($chunk, ';', '%3B');
55
+ // $chunk: str-replace($chunk, '?', '%3F');
56
+ // $chunk: str-replace($chunk, ':', '%3A');
57
+ // $chunk: str-replace($chunk, '@', '%40');
58
+ // $chunk: str-replace($chunk, '=', '%3D');
59
+
60
+ $encoded: #{$encoded}#{$chunk};
61
+ $index: $index + $slice;
62
+ }
63
+ @return url("data:image/svg+xml,#{$encoded}");
64
+ }
65
+
66
+ // Background svg mixin
67
+ @mixin background-svg($svg){
68
+ background-image: svg-url($svg);
69
+ }
70
+
@@ -0,0 +1,457 @@
1
+ @import 'variable';
2
+ /** xgplayer base style begain**/
3
+ .xgplayer-fullscreen-parent {
4
+ position: fixed;
5
+ left: 0;
6
+ top: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ z-index: 9999;
10
+ .xgplayer.xgplayer-is-cssfullscreen {
11
+ z-index: 10;
12
+ position: absolute;
13
+ }
14
+ .xgplayer.xgplayer-is-fullscreen {
15
+ z-index: 10;
16
+ position: absolute;
17
+ }
18
+ }
19
+
20
+ .xgplayer-rotate-parent {
21
+ position: fixed;
22
+ top: 0;
23
+ left: 100%;
24
+ bottom: 0;
25
+ right: 0;
26
+ width: 100vh;
27
+ height: 100vw;
28
+ z-index: 9999;
29
+ transform-origin: top left;
30
+ transform: rotate(90deg);
31
+ .xgplayer.xgplayer-rotate-fullscreen {
32
+ position: absolute;
33
+ top: 0;
34
+ left: 0;
35
+ z-index: 10;
36
+ margin: 0;
37
+ padding: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ transform: rotate(0);
41
+ }
42
+ // &.xgplayer-mobile {
43
+ // width: 90%;
44
+ // }
45
+ .xgplayer-mobile {
46
+ video {
47
+ z-index: -1;
48
+ }
49
+ }
50
+ }
51
+
52
+ .xgplayer {
53
+ position: relative;
54
+ width: 100%;
55
+ height: 100%;
56
+ overflow: hidden;
57
+ font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, STHeiTi, 'Microsoft YaHei',
58
+ 'WenQuanYi Micro Hei', sans-serif;
59
+ font-size: 14px;
60
+ font-weight: 400;
61
+ background: $playerBgColor;
62
+ -webkit-font-smoothing: antialiased;
63
+ -moz-osx-font-smoothing: grayscale;
64
+ -webkit-touch-callout: none;
65
+ -webkit-user-select: none;
66
+ -khtml-user-select: none;
67
+ -moz-user-select: none;
68
+ -ms-user-select: none;
69
+ user-select: none;
70
+ cursor: pointer;
71
+ * {
72
+ margin: 0;
73
+ padding: 0;
74
+ border: 0;
75
+ vertical-align: baseline;
76
+ white-space: normal;
77
+ word-wrap: normal;
78
+ overflow-wrap: normal;
79
+ }
80
+ ul,
81
+ li {
82
+ list-style: none;
83
+ }
84
+ .xgplayer-none {
85
+ display: none;
86
+ }
87
+
88
+ &.xgplayer-is-fullscreen {
89
+ position: fixed;
90
+ top: 0;
91
+ left: 0;
92
+ width: 100%;
93
+ height: 100%;
94
+ margin: 0;
95
+ padding: 0;
96
+ z-index: 9999;
97
+ }
98
+
99
+ /** xgplayer cssFullscreen style begain**/
100
+ &.xgplayer-is-cssfullscreen {
101
+ position: fixed;
102
+ left: 0;
103
+ top: 0;
104
+ width: 100%;
105
+ height: 100%;
106
+ z-index: 9999;
107
+ }
108
+ /** xgplayer cssFullscreen style end**/
109
+
110
+ &.xgplayer-rotate-fullscreen {
111
+ position: fixed;
112
+ top: 0;
113
+ left: 100%;
114
+ bottom: 0;
115
+ right: 0;
116
+ width: 100vh;
117
+ height: 100vw;
118
+ transform-origin: top left;
119
+ transform: rotate(90deg);
120
+ z-index: 9999;
121
+ // &.xgplayer-mobile {
122
+ // width: 90vh;
123
+ // }
124
+ &.xgplayer-mobile video {
125
+ z-index: -1;
126
+ }
127
+ }
128
+
129
+ xg-video-container.xg-video-container {
130
+ position: absolute;
131
+ top: 0;
132
+ bottom: 48px;
133
+ display: block;
134
+ width: 100%;
135
+ }
136
+
137
+ video {
138
+ position: absolute;
139
+ top: 0;
140
+ left: 0;
141
+ width: 100%;
142
+ height: 100%;
143
+ outline: none;
144
+ }
145
+
146
+ &[data-xgfill='contain'] {
147
+ video {
148
+ object-fit: contain;
149
+ }
150
+ }
151
+
152
+ &[data-xgfill='cover'] {
153
+ video {
154
+ object-fit: cover;
155
+ }
156
+ }
157
+
158
+ &[data-xgfill='fill'] {
159
+ video {
160
+ object-fit: fill;
161
+ }
162
+ }
163
+ /** position start **/
164
+ .xg-pos {
165
+ left: $miniMargin; //$iconMargin;
166
+ right: $miniMargin; //$iconMargin;
167
+ }
168
+
169
+ .xg-margin {
170
+ margin-left: $iconMargin;
171
+ margin-right: $iconMargin;
172
+ }
173
+
174
+ .xg-bottom {
175
+ bottom: 0;
176
+ }
177
+ /** position ended **/
178
+
179
+ .btn-text {
180
+ position: relative;
181
+ top: 50%;
182
+ height: 24px;
183
+ font-size: 13px;
184
+ text-align: center;
185
+ span {
186
+ display: inline-block;
187
+ min-width: 52px;
188
+ height: 24px;
189
+ line-height: 24px;
190
+ background: $definitionNameBgColor;
191
+ border-radius: 12px;
192
+ }
193
+ }
194
+ /** icon style begain **/
195
+ xg-icon {
196
+ position: relative;
197
+ box-sizing: border-box;
198
+ height: 40px;
199
+ margin-left: $iconMargin;
200
+ margin-right: $iconMargin;
201
+ cursor: pointer;
202
+ color: $definitionNameColor;
203
+ fill: #fff;
204
+ .xg-tips {
205
+ top: -30px;
206
+ left: 50%;
207
+ transform: translateX(-50%);
208
+ }
209
+ &:active,
210
+ &:hover {
211
+ .xg-tips {
212
+ display: block;
213
+ }
214
+ .xg-tips.hide {
215
+ display: none;
216
+ }
217
+ }
218
+ .xgplayer-icon {
219
+ position: relative;
220
+ top: 50%;
221
+ transform: translateY(-50%);
222
+ cursor: pointer;
223
+ }
224
+
225
+ .xg-icon-disable {
226
+ cursor: not-allowed;
227
+ }
228
+
229
+ .xg-img {
230
+ width: 100%;
231
+ }
232
+
233
+ svg,
234
+ img {
235
+ height: 100%;
236
+ display: block;
237
+ }
238
+ }
239
+ /** icon style ended **/
240
+
241
+ /** root bar style begain **/
242
+ xg-bar {
243
+ display: block;
244
+ }
245
+
246
+ &.xgplayer-inactive,
247
+ &.xgplayer-mini {
248
+ xg-bar {
249
+ display: none;
250
+ }
251
+ }
252
+ &.xgplayer-inactive {
253
+ .xg-top-bar {
254
+ display: flex;
255
+ &.top-bar-autohide {
256
+ display: none;
257
+ }
258
+ }
259
+ }
260
+
261
+ .xg-top-bar {
262
+ position: absolute;
263
+ z-index: 10;
264
+ top: 0;
265
+ padding: 0 $iconMargin;
266
+ display: flex;
267
+ height: $barWidth;
268
+ xg-icon {
269
+ position: relative;
270
+ top: 10px;
271
+ left: 0;
272
+ width: 34px;
273
+ margin-top: 0;
274
+ &:first-child {
275
+ margin-left: 0;
276
+ }
277
+ }
278
+ }
279
+ .xg-left-bar,
280
+ .xg-right-bar {
281
+ position: absolute;
282
+ z-index: 9;
283
+ top: $barWidth;
284
+ bottom: $barWidth;
285
+ width: $barWidth;
286
+ }
287
+ .xg-left-bar {
288
+ left: 0;
289
+ }
290
+ .xg-right-bar {
291
+ right: 0;
292
+ }
293
+ /* root bar style ended */
294
+
295
+ .xg-tips {
296
+ display: none;
297
+ position: absolute;
298
+ padding: 4px 6px;
299
+ background: $tipsBgColor;
300
+ border-radius: 4px;
301
+ font-size: $tipsFontsize;
302
+ color: $tipsColor;
303
+ text-align: center;
304
+ white-space: nowrap;
305
+ opacity: 0.85;
306
+ }
307
+ .xg-margin {
308
+ left: 0px;
309
+ right: 0px;
310
+ }
311
+ }
312
+
313
+ // 移动端适配
314
+ .xgplayer-mobile {
315
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
316
+ * {
317
+ text-decoration: none;
318
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
319
+ }
320
+
321
+ &.xgplayer-rotate-fullscreen {
322
+ .xg-top-bar,
323
+ .xg-pos {
324
+ left: 6%;
325
+ right: 6%;
326
+ }
327
+ }
328
+
329
+ xg-icon {
330
+ &:hover {
331
+ .xg-tips {
332
+ display: none;
333
+ }
334
+ }
335
+ }
336
+ }
337
+
338
+ .xg-list-slide-scroll {
339
+ &::-webkit-scrollbar-track {
340
+ background-color: transparent;
341
+ display: none
342
+ }
343
+ &:hover::-webkit-scrollbar-track {
344
+ display: block
345
+ }
346
+ &::-webkit-scrollbar {
347
+ -webkit-appearance: none;
348
+ appearance: none;
349
+ background: rgba(0,0,0,0);
350
+ height: 4px;
351
+ width: 4px
352
+ }
353
+ &::-webkit-scrollbar-corner {
354
+ background: transparent;
355
+ display: none
356
+ }
357
+ &::-webkit-scrollbar-thumb {
358
+ background: hsla(0,0%,100%,.5);
359
+ border-radius: 3px;
360
+ display: none;
361
+ width: 4px
362
+ }
363
+ &:hover::-webkit-scrollbar-thumb {
364
+ display: block
365
+ }
366
+ }
367
+
368
+ // 移动端小屏幕
369
+ @media only screen and (max-width: 480px) {
370
+ .xgplayer-mobile {
371
+ xg-icon {
372
+ margin-right: $miniMargin;
373
+ margin-left: $miniMargin;
374
+ }
375
+
376
+ .xg-top-bar {
377
+ left: $miniMargin;
378
+ right: $miniMargin;
379
+ }
380
+ }
381
+ }
382
+
383
+ // @media only screen and (min-width: 480px) {
384
+ // .xgplayer-mobile {
385
+ // &.xgplayer-is-fullscreen {
386
+ // .xg-top-bar, .xg-pos{
387
+ // left: 6%;
388
+ // right: 6%;
389
+ // }
390
+ // }
391
+ // }
392
+ // }
393
+
394
+ @supports ((height: constant(safe-area-inset-top)) or (height: env(safe-area-inset-top)))
395
+ and (-webkit-overflow-scrolling: touch) {
396
+ // .xgplayer-mobile {
397
+ // &.xgplayer-rotate-fullscreen {
398
+ // .xg-pos {
399
+ // left: constant(safe-area-inset-top, 30px);
400
+ // left: env(safe-area-inset-top, 30px);
401
+ // right: constant(safe-area-inset-bottom, 30px);
402
+ // right: env(safe-area-inset-bottom, 30px);
403
+ // }
404
+ // }
405
+ // }
406
+ }
407
+
408
+ // 竖屏兼容
409
+ @media screen and (orientation: portrait) {
410
+ .xgplayer-mobile {
411
+ &.xgplayer-is-fullscreen,
412
+ &.xgplayer-is-cssfullscreen {
413
+ //.flex-controls {
414
+ .xgplayer-controls {
415
+ bottom: 34px;
416
+ /* iOS 11.0 */
417
+ bottom: constant(safe-area-inset-bottom);
418
+ /* 11.2+ */
419
+ bottom: env(safe-area-inset-bottom);
420
+ }
421
+ .xg-top-bar {
422
+ top: 34px;
423
+ /* iOS 11.0 */
424
+ top: constant(safe-area-inset-top);
425
+ /* 11.2+ */
426
+ top: env(safe-area-inset-top);
427
+ }
428
+ }
429
+ }
430
+ }
431
+
432
+ // 横屏兼容
433
+ @media only screen and (orientation: landscape) {
434
+ .xgplayer-mobile {
435
+ &.xgplayer-is-fullscreen {
436
+ .xg-top-bar,
437
+ .xg-pos {
438
+ left: 6%;
439
+ right: 6%;
440
+ }
441
+ }
442
+ &.xgplayer-rotate-fullscreen {
443
+ left: 0;
444
+ width: 100vw;
445
+ height: 100vh;
446
+ transform: rotate(0deg);
447
+ }
448
+ }
449
+ }
450
+
451
+ // 自定义mse使用 不能删除
452
+ .xgplayer {
453
+ .xgplayer-screen-container {
454
+ display: block;
455
+ width: 100%;
456
+ }
457
+ }
@@ -0,0 +1,4 @@
1
+ @import "variable";
2
+ @import "common";
3
+ @import "common/svg-url";
4
+ @import "../plugins/common/index";
@@ -0,0 +1,76 @@
1
+ // player
2
+
3
+ $playerBgColor: #000;
4
+ $playerIconColor: #fff;
5
+
6
+ // controls
7
+ $controlsBgImage: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .37), rgba(0, 0, 0, .75), rgba(0, 0, 0, .75));
8
+
9
+ // progress-bar
10
+ $progressOuterBgColor: rgba(255, 255, 255, 0.30);
11
+ $progressCacheBgColor: rgba(255, 255, 255, 0.50);
12
+ $progressPlayedBgImage: linear-gradient(-90deg, #FA1F41 0%, #E31106 100%);
13
+ $progressPlayedShadow: 0 0 2px 0 rgba(0, 0, 0, 0.26);
14
+
15
+ // time
16
+ $timeColor: #fff;
17
+ $timeDurationColor: rgba(255, 255, 255, 0.50);
18
+
19
+ // tips
20
+ $tipsColor: #fff;
21
+ $tipsBgColor: rgba(0, 0, 0, 0.54);
22
+ $tipsFontsize: 11px;
23
+
24
+ // slider
25
+ $sliderBgColor: rgba(0, 0, 0, 0.54);
26
+ $sliderBarBgColor: rgba(255, 255, 255, 0.30);
27
+ $sliderDragBgColor: #FA1F41;
28
+ $sliderDragAfterBgColor: #fff;
29
+ $sliderDragAfterShadow: 0 0 5px 0 rgba(0, 0, 0, 0.26);
30
+
31
+ // start
32
+
33
+ $startBgColor: rgba(0, 0, 0, 0.38);
34
+ $startSvgFill: rgba(255, 255, 255, 0.7);
35
+ $startHoverBgColor: rgba(255, 255, 255, 0.5);
36
+ $startHoverFillColor: rgba(255, 255, 255, 0.6);
37
+
38
+ // definition
39
+
40
+ $definitionUlBgColor: rgba(0, 0, 0, 0.54);
41
+ $definitionLiColor: rgba(255, 255, 255, 0.80);
42
+ $definitionLiActiveColor: #FF0000;
43
+ $definitionNameColor: rgba(255, 255, 255, 0.80);
44
+ $definitionNameBgColor: rgba(0, 0, 0, 0.38);
45
+
46
+ // replay
47
+
48
+ $replayBgColor: rgba(0, 0, 0, 0.54);
49
+ $replaySvgBgColor: rgba(0,0,0,0.58);
50
+ $replaySvgPathFillColor: #ddd;
51
+ $replaySvgHoverBgColor: rgba(0, 0, 0, .38);
52
+ $replaySvgHoverFillColor: #fff;
53
+ $replayTxtColor: #fff;
54
+
55
+ $enterTipsBgColor: -webkit-linear-gradient(right, #000, red, red, red, #000);
56
+ $ieEnterTipsBgColor: linear-gradient(to right, #000, red, red, red, #000);
57
+
58
+ // live
59
+
60
+ $liveColor: #fff;
61
+
62
+ // error
63
+
64
+ $errorBgColor: #000;
65
+ $errorColor: #fff;
66
+ $errorRefreshColor: #FA1F41;
67
+
68
+ //icon
69
+ $iconMargin: 16px;
70
+ //
71
+ $miniMargin: 10px;
72
+
73
+
74
+ //bar
75
+ $barWidth: 50px;
76
+ $barBottom: 50px;