@tiwz/react-video-player 0.0.1 → 1.0.0

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/README.md CHANGED
@@ -39,12 +39,11 @@ yarn add @tiwz/react-video-player
39
39
 
40
40
  ---
41
41
 
42
- ## 🚀 Usage
43
-
44
- ### Basic Example
42
+ ## 🚀 Quick Start
45
43
 
46
44
  ```tsx
47
45
  import { VideoPlayer } from '@tiwz/react-video-player'
46
+ import '@tiwz/react-video-player/style'
48
47
 
49
48
  export default function App() {
50
49
  return (
@@ -58,46 +57,32 @@ export default function App() {
58
57
 
59
58
  ---
60
59
 
61
- ### Advanced Source Configuration
62
-
63
- ```tsx
64
- import { VideoPlayer } from '@tiwz/react-video-player'
65
-
66
- <VideoPlayer
67
- title="My Video"
68
- source={{
69
- link: 'https://example.com/video.webm',
70
- type: 'video/webm'
71
- }}
72
- />
73
- ```
74
-
75
- ---
76
-
77
60
  ## 🧩 Props
78
61
 
79
62
  ### VideoPlayerProps
80
63
 
81
64
  | Prop | Type | Required | Description |
82
- |-------|------|----------|--------------|
83
- | title | string | ❌ | Video title overlay |
84
- | source | string \| { link: string; type?: 'video/mp4' \| 'video/ogg' \| 'video/webm' } | ✅ | Video source |
65
+ |--------|------|----------|--------------|
66
+ | `title` | `string` | ❌ | Video title overlay |
67
+ | `source` | `string \| { link: string; type?: 'video/mp4' \| 'video/ogg' \| 'video/webm' }` | ✅ | Video source |
85
68
 
86
69
  ---
87
70
 
88
- ## ⌨️ Keyboard Shortcuts (Desktop)
71
+ ## 🎥 Player Controls
89
72
 
90
- | Key | Action |
91
- |------|---------|
92
- | Space | Play / Pause |
93
- | Arrow Left | Seek backward 10s |
94
- | Arrow Right | Seek forward 10s |
95
- | F | Toggle Fullscreen |
96
- | P | Toggle Picture-in-Picture |
73
+ ### Desktop
74
+
75
+ | Action | Control |
76
+ |---------|----------|
77
+ | Play / Pause | Click center / Space |
78
+ | Seek backward | Arrow (10s) |
79
+ | Seek forward | Arrow (10s) |
80
+ | Fullscreen | F |
81
+ | Picture-in-Picture | P |
97
82
 
98
83
  ---
99
84
 
100
- ## 📱 Mobile Gestures
85
+ ### Mobile
101
86
 
102
87
  | Gesture | Action |
103
88
  |------------|---------|
@@ -107,62 +92,39 @@ import { VideoPlayer } from '@tiwz/react-video-player'
107
92
 
108
93
  ---
109
94
 
110
- ## 🎥 Player Behavior
111
-
112
- - Auto-hide controls after 2.5s inactivity
113
- - Smooth seek stacking (+10, +20, -10, etc)
114
- - Buffered range visualization
115
- - Smart fullscreen orientation lock (landscape when video is wide)
116
-
117
- ---
118
-
119
- ## 🖥 Fullscreen Support
95
+ ## 🖥 Fullscreen
120
96
 
121
- Supports:
97
+ Supports all modern browsers including:
122
98
 
123
- - Standard Fullscreen API
124
- - WebKit
125
- - Mozilla
126
- - MS prefixed APIs
99
+ - Chrome
100
+ - Edge
101
+ - Firefox
102
+ - Safari
103
+ - Mobile Safari
104
+ - Chrome Android
127
105
 
128
- With auto orientation lock on mobile landscape videos.
106
+ Includes automatic **orientation lock** for landscape videos on mobile.
129
107
 
130
108
  ---
131
109
 
132
110
  ## 📺 Picture-in-Picture (PiP)
133
111
 
134
- Supported on modern browsers:
135
-
136
- ```ts
137
- document.pictureInPictureEnabled
138
- ```
139
-
140
- Auto fallback handling included.
141
-
142
- ---
143
-
144
- ## 🛠 TypeScript Support
112
+ Automatically enables PiP when supported by the browser.
145
113
 
146
- Fully typed out-of-the-box.
114
+ Works on:
147
115
 
148
- ```ts
149
- interface VideoPlayerProps {
150
- title?: string
151
- source: string | {
152
- link: string
153
- type?: 'video/mp4' | 'video/ogg' | 'video/webm'
154
- }
155
- }
156
- ```
116
+ - Chrome
117
+ - Edge
118
+ - Safari (desktop & iPadOS)
157
119
 
158
120
  ---
159
121
 
160
122
  ## ⚡ Performance
161
123
 
162
- - Throttled mouse move handling
163
- - Smart seek batching
164
- - Minimal re-renders
165
- - Zero unnecessary listeners on mobile
124
+ - Throttled mouse movement
125
+ - Optimized re-rendering
126
+ - Smart seek stacking
127
+ - Minimal event listeners
166
128
 
167
129
  ---
168
130
 
@@ -177,29 +139,6 @@ interface VideoPlayerProps {
177
139
 
178
140
  ---
179
141
 
180
- ## 🏗 Build
181
-
182
- ```bash
183
- npm run rollup
184
- ```
185
-
186
- Output:
187
-
188
- ```
189
- dist/
190
- ├── index.js
191
- ├── index.mjs
192
- └── index.d.ts
193
- ```
194
-
195
- ---
196
-
197
142
  ## 📄 License
198
143
 
199
144
  MIT © tiwz
200
-
201
- ---
202
-
203
- ## ⭐ Star the repo
204
-
205
- If this project helps you, please consider starring ⭐ the repository to support development.
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .VideoPlayer-module_hide__nwlly{display:none}.VideoPlayer-module_visit__PJEFg{visibility:visible}.VideoPlayer-module_invisit__A7jP6{visibility:hidden}.VideoPlayer-module_opacity0__M4VIz{opacity:0}.VideoPlayer-module_opacity1__wWDar{opacity:1}.VideoPlayer-module_absoluteCenter__A2KzN{cursor:pointer;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.VideoPlayer-module_wrapper__8iODY,.VideoPlayer-module_wrapper__8iODY *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.VideoPlayer-module_wrapper__8iODY{aspect-ratio:16/9;background-color:#000;color:#fff;display:block;position:relative;width:100%}.VideoPlayer-module_video__fcIYk{display:block;height:100%;width:100%}.VideoPlayer-module_controller__eyPIB{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:rgba(0,0,0,.5);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;width:100%}.VideoPlayer-module_title__oxKqS{font-size:1.1rem;font-weight:400;line-height:1.1rem;padding:1rem 0 0 1rem;width:100%}.VideoPlayer-module_center__arqa3{-webkit-box-flex:1;-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:row;flex-direction:row;width:100%;div{-webkit-box-flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}}.VideoPlayer-module_controls__OQ23e{display:-webkit-box;display:-ms-flexbox;display:flex;gap:.6em;padding:.8em 1em;width:100%}.VideoPlayer-module_controls__OQ23e button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff0;border:0;color:#fff;cursor:pointer;padding:.25em;-webkit-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s}.VideoPlayer-module_controls__OQ23e button:hover{background-color:#00b2ff;border-radius:5px}.VideoPlayer-module_timeWrapper__fpsFx{-webkit-box-flex:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-family:monospace;font-size:1rem;gap:.6em;padding-inline:.3em;article{font-size:1em}}.VideoPlayer-module_timeControl__sz7qH{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.VideoPlayer-module_backProcess__I5ZGe{background-color:#fff5;border-radius:2em;height:4px;width:100%}.VideoPlayer-module_progressBar__v-AQM{background-color:#fffa;border-radius:2em;height:4px;left:0;position:absolute;top:0;width:100%}.VideoPlayer-module_rangeTime__Sp6FM{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:2em;height:4px;left:0;position:absolute;top:0;width:100%}.VideoPlayer-module_rangeTime__Sp6FM::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:2em;height:1em;width:1em}.VideoPlayer-module_rangeTime__Sp6FM:hover{cursor:pointer}.VideoPlayer-module_rangeTime__Sp6FM::-webkit-slider-thumb:hover{-webkit-box-shadow:0 0 1px 3px #fff4;box-shadow:0 0 1px 3px #fff4}.VideoPlayer-module_volumeWrapper__QBYAa{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:.1em}.VideoPlayer-module_rangeVolume__koFUe{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:2em;cursor:pointer;height:4px;width:4em}.VideoPlayer-module_rangeVolume__koFUe::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:2em;height:1em;width:1em}.VideoPlayer-module_rangeVolume__koFUe::-webkit-slider-thumb:hover{-webkit-box-shadow:0 0 1px 3px #fff4;box-shadow:0 0 1px 3px #fff4}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{font-size:1.6rem;position:absolute;text-shadow:0 0 2px #0004;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.VideoPlayer-module_seekLeft__494Gh{left:20%}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{-webkit-animation:VideoPlayer-module_shaking__mp-kJ .2s;animation:VideoPlayer-module_shaking__mp-kJ .2s}.VideoPlayer-module_seekRight__Wq-Br{right:20%}@-webkit-keyframes VideoPlayer-module_shaking__mp-kJ{0%{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}50%{-webkit-transform:translateY(-50%) scale(2);transform:translateY(-50%) scale(2)}to{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}}@keyframes VideoPlayer-module_shaking__mp-kJ{0%{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}50%{-webkit-transform:translateY(-50%) scale(2);transform:translateY(-50%) scale(2)}to{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}}@media (max-width:640px){.VideoPlayer-module_hideOnMobile__-bl4X{display:none}}@media (min-width:640px){.VideoPlayer-module_rangeVolume__koFUe{width:6em}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{font-size:3rem}}.VideoPlayer-module_loadingContainer__H2pCH{display:block;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:12%;svg{color:#fff;display:block;width:100%}}.VideoPlayer-module_playFirstContainer__iHyIf{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#000;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;button{background-color:transparent;border:0;cursor:pointer;margin:0;padding:.6em;svg{color:#fff}}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react");function l({name:t,bigger:l,className:i,onClick:r}){return"loading"===t?e.jsxs("svg",{version:"1.1",id:"L1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",xmlSpace:"preserve",children:[e.jsx("title",{children:"loading"}),e.jsx("circle",{fill:"none",stroke:"currentColor",strokeWidth:"6",strokeMiterlimit:"15",strokeDasharray:"14.2472,14.2472",cx:"50",cy:"50",r:"47",children:e.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})}),e.jsx("circle",{fill:"none",stroke:"currentColor",strokeWidth:"1",strokeMiterlimit:"10",strokeDasharray:"10,10",cx:"50",cy:"50",r:"39",children:e.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"-360 50 50",repeatCount:"indefinite"})}),e.jsxs("g",{fill:"currentColor",children:[e.jsx("rect",{x:"30",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.1"})}),e.jsx("rect",{x:"40",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.2"})}),e.jsx("rect",{x:"50",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.3"})}),e.jsx("rect",{x:"60",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.4"})}),e.jsx("rect",{x:"70",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.5"})})]})]}):"hide"===t?e.jsx(e.Fragment,{}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,onClick:r,className:i,style:{display:"block",width:(l?"5":"1.6")+"em"},stroke:"currentColor",children:[e.jsx("title",{children:t}),"play"===t&&e.jsx("path",{fill:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}),"pause"===t&&e.jsx("path",{strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",d:"M16.4 5.25v13.5m-8.5-13.5v13.5"}),"fullscreen"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"}),"unfullscreen"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"}),"pip"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}),"muted"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"volume"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"restart"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})]})}var i="VideoPlayer-module_visit__PJEFg",r="VideoPlayer-module_invisit__A7jP6",c="VideoPlayer-module_opacity0__M4VIz",o="VideoPlayer-module_opacity1__wWDar",n="VideoPlayer-module_absoluteCenter__A2KzN",a="VideoPlayer-module_wrapper__8iODY",s="VideoPlayer-module_video__fcIYk",d="VideoPlayer-module_controller__eyPIB",u="VideoPlayer-module_title__oxKqS",x="VideoPlayer-module_center__arqa3",b="VideoPlayer-module_controls__OQ23e",Q="VideoPlayer-module_timeWrapper__fpsFx",m="VideoPlayer-module_timeControl__sz7qH",G="VideoPlayer-module_backProcess__I5ZGe",F="VideoPlayer-module_progressBar__v-AQM",X="VideoPlayer-module_rangeTime__Sp6FM",B="VideoPlayer-module_volumeWrapper__QBYAa",y="VideoPlayer-module_rangeVolume__koFUe",p="VideoPlayer-module_seekLeft__494Gh",U="VideoPlayer-module_seekRight__Wq-Br",Z="VideoPlayer-module_hideOnMobile__-bl4X",N="VideoPlayer-module_loadingContainer__H2pCH",L="VideoPlayer-module_playFirstContainer__iHyIf";!function(e,t){void 0===t&&(t={});var l=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===l&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".VideoPlayer-module_hide__nwlly{display:none}.VideoPlayer-module_visit__PJEFg{visibility:visible}.VideoPlayer-module_invisit__A7jP6{visibility:hidden}.VideoPlayer-module_opacity0__M4VIz{opacity:0}.VideoPlayer-module_opacity1__wWDar{opacity:1}.VideoPlayer-module_absoluteCenter__A2KzN{cursor:pointer;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.VideoPlayer-module_wrapper__8iODY,.VideoPlayer-module_wrapper__8iODY *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.VideoPlayer-module_wrapper__8iODY{aspect-ratio:16/9;background-color:#000;color:#fff;display:block;position:relative;width:100%}.VideoPlayer-module_video__fcIYk{display:block;height:100%;width:100%}.VideoPlayer-module_controller__eyPIB{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:rgba(0,0,0,.5);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;width:100%}.VideoPlayer-module_title__oxKqS{font-size:1.1rem;font-weight:400;line-height:1.1rem;padding:1rem 0 0 1rem;width:100%}.VideoPlayer-module_center__arqa3{-webkit-box-flex:1;-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:row;flex-direction:row;width:100%;div{-webkit-box-flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}}.VideoPlayer-module_controls__OQ23e{display:-webkit-box;display:-ms-flexbox;display:flex;gap:.6em;padding:.8em 1em;width:100%}.VideoPlayer-module_controls__OQ23e button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff0;border:0;color:#fff;cursor:pointer;padding:.25em;-webkit-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s}.VideoPlayer-module_controls__OQ23e button:hover{background-color:#00b2ff;border-radius:5px}.VideoPlayer-module_timeWrapper__fpsFx{-webkit-box-flex:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-family:monospace;font-size:1rem;gap:.6em;padding-inline:.3em;article{font-size:1em}}.VideoPlayer-module_timeControl__sz7qH{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.VideoPlayer-module_backProcess__I5ZGe{background-color:#fff5;border-radius:2em;height:4px;width:100%}.VideoPlayer-module_progressBar__v-AQM{background-color:#fffa;border-radius:2em;height:4px;left:0;position:absolute;top:0;width:100%}.VideoPlayer-module_rangeTime__Sp6FM{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:2em;height:4px;left:0;position:absolute;top:0;width:100%}.VideoPlayer-module_rangeTime__Sp6FM::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:2em;height:1em;width:1em}.VideoPlayer-module_rangeTime__Sp6FM:hover{cursor:pointer}.VideoPlayer-module_rangeTime__Sp6FM::-webkit-slider-thumb:hover{-webkit-box-shadow:0 0 1px 3px #fff4;box-shadow:0 0 1px 3px #fff4}.VideoPlayer-module_volumeWrapper__QBYAa{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:.1em}.VideoPlayer-module_rangeVolume__koFUe{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:2em;cursor:pointer;height:4px;width:4em}.VideoPlayer-module_rangeVolume__koFUe::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:2em;height:1em;width:1em}.VideoPlayer-module_rangeVolume__koFUe::-webkit-slider-thumb:hover{-webkit-box-shadow:0 0 1px 3px #fff4;box-shadow:0 0 1px 3px #fff4}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{font-size:1.6rem;position:absolute;text-shadow:0 0 2px #0004;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.VideoPlayer-module_seekLeft__494Gh{left:20%}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{-webkit-animation:VideoPlayer-module_shaking__mp-kJ .2s;animation:VideoPlayer-module_shaking__mp-kJ .2s}.VideoPlayer-module_seekRight__Wq-Br{right:20%}@-webkit-keyframes VideoPlayer-module_shaking__mp-kJ{0%{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}50%{-webkit-transform:translateY(-50%) scale(2);transform:translateY(-50%) scale(2)}to{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}}@keyframes VideoPlayer-module_shaking__mp-kJ{0%{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}50%{-webkit-transform:translateY(-50%) scale(2);transform:translateY(-50%) scale(2)}to{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}}@media (max-width:640px){.VideoPlayer-module_hideOnMobile__-bl4X{display:none}}@media (min-width:640px){.VideoPlayer-module_rangeVolume__koFUe{width:6em}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{font-size:3rem}}.VideoPlayer-module_loadingContainer__H2pCH{display:block;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:12%;svg{color:#fff;display:block;width:100%}}.VideoPlayer-module_playFirstContainer__iHyIf{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#000;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;button{background-color:transparent;border:0;cursor:pointer;margin:0;padding:.6em;svg{color:#fff}}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlZpZGVvUGxheWVyLm1vZHVsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT0EsZ0NBQ0MsWUFDRCxDQUVBLGlDQUNDLGtCQUNELENBRUEsbUNBQ0MsaUJBQ0QsQ0FFQSxvQ0FDQyxTQUNEL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b2ludGVyO1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdHN2ZyB7XG5cdFx0XHRjb2xvcjogd2hpdGU7XG5cdFx0fVxuXHR9XG59XG4iXX0= */"),exports.VideoPlayer=function({source:V,title:g}){const h="string"==typeof V?V:V.link,W="object"==typeof V&&"string"==typeof V.type?V.type:"video/mp4",C=t.useRef(null),k=t.useRef(null),D=t.useRef(null),w=t.useRef(null),f=t.useRef(0),[R,H]=t.useState(!0),[I,Y]=t.useState(0),[E,v]=t.useState(!1),[M,_]=t.useState(!1),[J,T]=t.useState(!1),[O,j]=t.useState(!1),[z,A]=t.useState(!1),[S,P]=t.useState(!1),[K,q]=t.useState(!1),[$,ee]=t.useState(!0),[te,le]=t.useState(!1),[ie,re]=t.useState(1),[ce,oe]=t.useState(0),[ne,ae]=t.useState(0);function se(e){if(void 0===e||Number.isNaN(e)||e<0)return"00:00";const t=Math.floor(e),l=t%60;return`${Math.floor(t/60).toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}`}async function de(e,t){e.current&&await t(e.current)}t.useEffect(()=>{j(!1),q(!1),A(!1),oe(0),ae(0),Y(0),v(!1)},[h]),t.useEffect(()=>()=>{C.current&&(clearTimeout(C.current),C.current=null),k.current&&(clearTimeout(k.current),k.current=null)},[]);const ue=t.useCallback(()=>{k.current&&(clearTimeout(k.current),k.current=null),v(!0),k.current=setTimeout(()=>{v(!1),Y(0),k.current=null},1500)},[]),xe=t.useCallback(()=>{de(D,async e=>{try{e.paused?await e.play():e.pause()}catch{return}})},[]),be=t.useCallback(e=>{de(D,t=>{Y(l=>{const i="+"===e?l<0?10:l+10:l>0?-10:l-10;return t.currentTime+="+"===e?10:-10,i}),ue()})},[ue]);function Qe(){const e=document;!!(e.fullscreenEnabled||e.webkitFullscreenEnabled||e.mozFullScreenEnabled||e.msFullscreenEnabled)&&de(w,e=>{document.fullscreenElement?async function(){const e=document,t=e.exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen;if(t)try{await t.call(e)}catch{return void console.error("Failed to exit fullscreen")}}():async function(e){const t=e,l=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitEnterFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(l)try{await l.call(t)}catch{return void console.error("Failed to enter fullscreen")}}(e)})}function me(){"pictureInPictureEnabled"in document&&"requestPictureInPicture"in HTMLVideoElement.prototype&&de(D,e=>{document.pictureInPictureElement?async function(e){if(!1===e.disablePictureInPicture&&"pictureInPictureElement"in document&&document.pictureInPictureElement)try{await document.exitPictureInPicture()}catch{return void console.error("Failed to exit Picture-in-Picture")}}(e):async function(e){if(!("pictureInPictureEnabled"in document)||"function"!=typeof e.requestPictureInPicture)return console.error("Picture-in-Picture is not supported in this browser"),null;try{return e.paused&&await e.play().catch(()=>{console.warn("Auto-play was prevented")}),await e.requestPictureInPicture()}catch{return console.error("Failed to enter Picture-in-Picture"),null}}(e)})}function Ge(e,t){de(D,l=>{"time"===e?(ae(t),l.currentTime=t):(re(t),l.volume=t,l.muted&&(l.muted=!1,P(!1)))})}function Fe(e=2500){$||(C.current&&(clearTimeout(C.current),C.current=null),_(!0),C.current=setTimeout(()=>{te||_(!1),C.current=null},e))}t.useEffect(()=>{const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobi/i.test(window.navigator.userAgent);async function t(){if(w.current&&D.current){const e=document.fullscreenElement===w.current;T(document.fullscreenEnabled&&e);const t=D.current.videoWidth>D.current.videoHeight;if("undefined"!=typeof window&&window.screen&&"orientation"in window.screen&&window.screen.orientation&&"lock"in window.screen.orientation&&"function"==typeof window.screen.orientation.lock&&t&&e)try{await window.screen.orientation.lock("landscape")}catch{return!1}}}function l(e){[" ","f","p","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault(),de(D,t=>{switch(e.key){case" ":xe();break;case"f":Qe();break;case"p":me();break;case"ArrowLeft":Y(e=>{const l=e>0?-10:e-10;return t.currentTime-=10,l}),ue();break;case"ArrowRight":Y(e=>{const l=e<0?10:e+10;return t.currentTime+=10,l}),ue()}})}return H(e),document.addEventListener("fullscreenchange",t),!e&&window.addEventListener("keydown",l),()=>{document.removeEventListener("fullscreenchange",t),!e&&window.removeEventListener("keydown",l)}},[h,xe,ue]);const Xe=t.useCallback(function(e,t){let l=null,i=0;return function(...r){const c=Date.now();i?(l&&clearTimeout(l),l=setTimeout(()=>{c-i>=t&&(e.apply(this,r),i=c)},t-(c-i))):(e.apply(this,r),i=c)}}(()=>{$||Fe()},200),[$,te]),Be=t.useCallback(()=>{_(!1),C.current&&(clearTimeout(C.current),C.current=null)},[]);t.useEffect(()=>{te&&Fe(1e3)},[te]);const ye=t.useCallback(e=>{const t=e.currentTarget.currentTime;(Math.floor(t)!==Math.floor(ne)||Math.abs(t-ne)>1)&&ae(t)},[ne]),pe=t.useMemo(()=>{if(!D.current||!ce)return 0;const e=D.current.buffered;if(0===e.length)return 0;let t=0;for(let l=0;l<e.length;l++)if(e.start(l)<=ne&&e.end(l)>ne){t=e.end(l);break}return t/ce*100},[ne,ce]),Ue=t.useMemo(()=>ce>0?ne/ce*100:0,[ne,ce]),Ze=t.useCallback(e=>{if(!R)return;const t=Date.now(),l=t-f.current;(l>0&&l<300||E)&&(E||v(!0),be(e)),f.current=t},[R,E,be]);return e.jsxs("div",{className:a,ref:w,onMouseMove:Xe,onMouseLeave:Be,children:[e.jsx("video",{playsInline:!0,preload:"none",ref:D,controls:!1,onTimeUpdate:ye,onLoadedMetadata:e=>oe(e.currentTarget.duration),onVolumeChange:e=>re(e.currentTarget.volume),onCanPlayThrough:()=>A(!1),onWaiting:()=>A(!0),onLoadStart:()=>q(!1),onEnded:()=>q(!0),onPlay:()=>{q(!1),ee(!1),j(!0)},onPause:()=>ee(!0),className:s,children:e.jsx("source",{src:h,type:W})}),e.jsxs("div",{className:`${d} ${R?$||M?i:r:$||M?o:c}`,children:[e.jsx("h1",{className:u,children:g}),e.jsxs("div",{className:x,onClick:R?void 0:xe,children:[e.jsx("div",{onClick:()=>Ze("-")}),e.jsx("div",{onClick:()=>Ze("+")})]}),e.jsxs("div",{className:b,children:[e.jsxs("div",{className:Q,children:[e.jsx("article",{children:se(ne)}),e.jsxs("div",{className:m,children:[e.jsx("div",{className:G}),e.jsx("div",{className:F,style:{width:`${pe}%`}}),e.jsx("input",{type:"range",step:"any",max:ce,value:ne,onFocus:e=>e.currentTarget.blur(),className:X,onPointerDown:()=>le(!0),onPointerUp:()=>le(!1),onPointerCancel:()=>le(!1),onChange:e=>Ge("time",+e.currentTarget.value),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${Ue}%, #0000 ${Ue}%)`}})]}),e.jsx("article",{children:se(ce)})]}),e.jsxs("div",{className:B,children:[e.jsx("button",{type:"button",onClick:function(){de(D,e=>{e.muted=!e.muted,P(e.muted)})},onFocus:e=>e.currentTarget.blur(),children:e.jsx(l,{name:S||0===ie?"muted":"volume"})}),e.jsx("input",{max:1,type:"range",step:"any",value:S?0:ie,onFocus:e=>e.currentTarget.blur(),className:y+(R?` ${Z}`:""),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${S?0:100*ie}%, #fff5 ${S?0:100*ie}%)`},onChange:e=>Ge("volume",+e.currentTarget.value)})]}),e.jsx("div",{children:e.jsx("button",{type:"button",onClick:me,onFocus:e=>e.currentTarget.blur(),children:e.jsx(l,{name:"pip"})})}),e.jsx("div",{children:e.jsx("button",{type:"button",onClick:Qe,onFocus:e=>e.currentTarget.blur(),children:e.jsx(l,{name:J?"unfullscreen":"fullscreen"})})})]}),e.jsx(l,{name:z?"hide":K?"restart":$?"play":"pause",bigger:!0,className:n,onClick:xe})]}),I<0&&e.jsx("div",{inert:!0,className:p,children:I.toString()},I),I>0&&e.jsx("div",{inert:!0,className:U,children:`+${I.toString()}`},I),z&&e.jsx("div",{className:N,children:e.jsx(l,{name:"loading"})}),!O&&e.jsx("div",{className:L,children:e.jsx("button",{type:"button",onFocus:e=>e.currentTarget.blur(),onClick:()=>{j(!0),de(D,async e=>{try{await e.play()}catch{return}})},children:e.jsx(l,{name:"play",bigger:!0})})})]},h)};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react");function r({name:t,bigger:r,className:n,onClick:i}){return"loading"===t?e.jsxs("svg",{version:"1.1",id:"L1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",xmlSpace:"preserve",children:[e.jsx("title",{children:"loading"}),e.jsx("circle",{fill:"none",stroke:"currentColor",strokeWidth:"6",strokeMiterlimit:"15",strokeDasharray:"14.2472,14.2472",cx:"50",cy:"50",r:"47",children:e.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})}),e.jsx("circle",{fill:"none",stroke:"currentColor",strokeWidth:"1",strokeMiterlimit:"10",strokeDasharray:"10,10",cx:"50",cy:"50",r:"39",children:e.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"-360 50 50",repeatCount:"indefinite"})}),e.jsxs("g",{fill:"currentColor",children:[e.jsx("rect",{x:"30",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.1"})}),e.jsx("rect",{x:"40",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.2"})}),e.jsx("rect",{x:"50",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.3"})}),e.jsx("rect",{x:"60",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.4"})}),e.jsx("rect",{x:"70",y:"35",width:"5",height:"30",children:e.jsx("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.5"})})]})]}):"hide"===t?e.jsx(e.Fragment,{}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,onClick:i,className:n,style:{display:"block",width:(r?"5":"1.6")+"em"},stroke:"currentColor",children:[e.jsx("title",{children:t}),"play"===t&&e.jsx("path",{fill:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}),"pause"===t&&e.jsx("path",{strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",d:"M16.4 5.25v13.5m-8.5-13.5v13.5"}),"fullscreen"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"}),"unfullscreen"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"}),"pip"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}),"muted"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"volume"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"restart"===t&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})]})}var n="VideoPlayer-module_visit__PJEFg",i="VideoPlayer-module_invisit__A7jP6",o="VideoPlayer-module_opacity0__M4VIz",a="VideoPlayer-module_opacity1__wWDar",l="VideoPlayer-module_absoluteCenter__A2KzN",s="VideoPlayer-module_wrapper__8iODY",u="VideoPlayer-module_video__fcIYk",c="VideoPlayer-module_controller__eyPIB",d="VideoPlayer-module_title__oxKqS",m="VideoPlayer-module_center__arqa3",f="VideoPlayer-module_controls__OQ23e",h="VideoPlayer-module_timeWrapper__fpsFx",p="VideoPlayer-module_timeControl__sz7qH",y="VideoPlayer-module_backProcess__I5ZGe",x="VideoPlayer-module_progressBar__v-AQM",v="VideoPlayer-module_rangeTime__Sp6FM",g="VideoPlayer-module_volumeWrapper__QBYAa",b="VideoPlayer-module_rangeVolume__koFUe",j="VideoPlayer-module_seekLeft__494Gh",k="VideoPlayer-module_seekRight__Wq-Br",w="VideoPlayer-module_hideOnMobile__-bl4X",_="VideoPlayer-module_loadingContainer__H2pCH",P="VideoPlayer-module_playFirstContainer__iHyIf";exports.VideoPlayer=function({source:M,title:C}){const T="string"==typeof M?M:M.link,L="object"==typeof M&&"string"==typeof M.type?M.type:"video/mp4",V=t.useRef(null),N=t.useRef(null),F=t.useRef(null),S=t.useRef(null),E=t.useRef(0),[I,A]=t.useState(!0),[H,q]=t.useState(0),[R,$]=t.useState(!1),[W,B]=t.useState(!1),[D,z]=t.useState(!1),[O,X]=t.useState(!1),[Z,Q]=t.useState(!1),[U,Y]=t.useState(!1),[G,K]=t.useState(!1),[J,ee]=t.useState(!0),[te,re]=t.useState(!1),[ne,ie]=t.useState(1),[oe,ae]=t.useState(0),[le,se]=t.useState(0);function ue(e){if(void 0===e||Number.isNaN(e)||e<0)return"00:00";const t=Math.floor(e),r=t%60;return`${Math.floor(t/60).toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}async function ce(e,t){e.current&&await t(e.current)}t.useEffect(()=>{X(!1),K(!1),Q(!1),ae(0),se(0),q(0),$(!1)},[T]),t.useEffect(()=>()=>{V.current&&(clearTimeout(V.current),V.current=null),N.current&&(clearTimeout(N.current),N.current=null)},[]);const de=t.useCallback(()=>{N.current&&(clearTimeout(N.current),N.current=null),$(!0),N.current=setTimeout(()=>{$(!1),q(0),N.current=null},1500)},[]),me=t.useCallback(()=>{ce(F,async e=>{try{e.paused?await e.play():e.pause()}catch{return}})},[]),fe=t.useCallback(e=>{ce(F,t=>{q(r=>{const n="+"===e?r<0?10:r+10:r>0?-10:r-10;return t.currentTime+="+"===e?10:-10,n}),de()})},[de]);function he(){const e=document;!!(e.fullscreenEnabled||e.webkitFullscreenEnabled||e.mozFullScreenEnabled||e.msFullscreenEnabled)&&ce(S,e=>{document.fullscreenElement?async function(){const e=document,t=e.exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen;if(t)try{await t.call(e)}catch{return void console.error("Failed to exit fullscreen")}}():async function(e){const t=e,r=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitEnterFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(r)try{await r.call(t)}catch{return void console.error("Failed to enter fullscreen")}}(e)})}function pe(){"pictureInPictureEnabled"in document&&"requestPictureInPicture"in HTMLVideoElement.prototype&&ce(F,e=>{document.pictureInPictureElement?async function(e){if(!1===e.disablePictureInPicture&&"pictureInPictureElement"in document&&document.pictureInPictureElement)try{await document.exitPictureInPicture()}catch{return void console.error("Failed to exit Picture-in-Picture")}}(e):async function(e){if(!("pictureInPictureEnabled"in document)||"function"!=typeof e.requestPictureInPicture)return console.error("Picture-in-Picture is not supported in this browser"),null;try{return e.paused&&await e.play().catch(()=>{console.warn("Auto-play was prevented")}),await e.requestPictureInPicture()}catch{return console.error("Failed to enter Picture-in-Picture"),null}}(e)})}function ye(e,t){ce(F,r=>{"time"===e?(se(t),r.currentTime=t):(ie(t),r.volume=t,r.muted&&(r.muted=!1,Y(!1)))})}function xe(e=2500){J||(V.current&&(clearTimeout(V.current),V.current=null),B(!0),V.current=setTimeout(()=>{te||B(!1),V.current=null},e))}t.useEffect(()=>{const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobi/i.test(window.navigator.userAgent);async function t(){if(S.current&&F.current){const e=document.fullscreenElement===S.current;z(document.fullscreenEnabled&&e);const t=F.current.videoWidth>F.current.videoHeight;if("undefined"!=typeof window&&window.screen&&"orientation"in window.screen&&window.screen.orientation&&"lock"in window.screen.orientation&&"function"==typeof window.screen.orientation.lock&&t&&e)try{await window.screen.orientation.lock("landscape")}catch{return!1}}}function r(e){[" ","f","p","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault(),ce(F,t=>{switch(e.key){case" ":me();break;case"f":he();break;case"p":pe();break;case"ArrowLeft":q(e=>{const r=e>0?-10:e-10;return t.currentTime-=10,r}),de();break;case"ArrowRight":q(e=>{const r=e<0?10:e+10;return t.currentTime+=10,r}),de()}})}return A(e),document.addEventListener("fullscreenchange",t),!e&&window.addEventListener("keydown",r),()=>{document.removeEventListener("fullscreenchange",t),!e&&window.removeEventListener("keydown",r)}},[T,me,de]);const ve=t.useCallback(function(e,t){let r=null,n=0;return function(...i){const o=Date.now();n?(r&&clearTimeout(r),r=setTimeout(()=>{o-n>=t&&(e.apply(this,i),n=o)},t-(o-n))):(e.apply(this,i),n=o)}}(()=>{J||xe()},200),[J,te]),ge=t.useCallback(()=>{B(!1),V.current&&(clearTimeout(V.current),V.current=null)},[]);t.useEffect(()=>{te&&xe(1e3)},[te]);const be=t.useCallback(e=>{const t=e.currentTarget.currentTime;(Math.floor(t)!==Math.floor(le)||Math.abs(t-le)>1)&&se(t)},[le]),je=t.useMemo(()=>{if(!F.current||!oe)return 0;const e=F.current.buffered;if(0===e.length)return 0;let t=0;for(let r=0;r<e.length;r++)if(e.start(r)<=le&&e.end(r)>le){t=e.end(r);break}return t/oe*100},[le,oe]),ke=t.useMemo(()=>oe>0?le/oe*100:0,[le,oe]),we=t.useCallback(e=>{if(!I)return;const t=Date.now(),r=t-E.current;(r>0&&r<300||R)&&(R||$(!0),fe(e)),E.current=t},[I,R,fe]);return e.jsxs("div",{className:s,ref:S,onMouseMove:ve,onMouseLeave:ge,children:[e.jsx("video",{playsInline:!0,preload:"none",ref:F,controls:!1,onTimeUpdate:be,onLoadedMetadata:e=>ae(e.currentTarget.duration),onVolumeChange:e=>ie(e.currentTarget.volume),onCanPlayThrough:()=>Q(!1),onWaiting:()=>Q(!0),onLoadStart:()=>K(!1),onEnded:()=>K(!0),onPlay:()=>{K(!1),ee(!1),X(!0)},onPause:()=>ee(!0),className:u,children:e.jsx("source",{src:T,type:L})}),e.jsxs("div",{className:`${c} ${I?J||W?n:i:J||W?a:o}`,children:[e.jsx("h1",{className:d,children:C}),e.jsxs("div",{className:m,onClick:I?void 0:me,children:[e.jsx("div",{onClick:()=>we("-")}),e.jsx("div",{onClick:()=>we("+")})]}),e.jsxs("div",{className:f,children:[e.jsxs("div",{className:h,children:[e.jsx("article",{children:ue(le)}),e.jsxs("div",{className:p,children:[e.jsx("div",{className:y}),e.jsx("div",{className:x,style:{width:`${je}%`}}),e.jsx("input",{type:"range",step:"any",max:oe,value:le,onFocus:e=>e.currentTarget.blur(),className:v,onPointerDown:()=>re(!0),onPointerUp:()=>re(!1),onPointerCancel:()=>re(!1),onChange:e=>ye("time",+e.currentTarget.value),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${ke}%, #0000 ${ke}%)`}})]}),e.jsx("article",{children:ue(oe)})]}),e.jsxs("div",{className:g,children:[e.jsx("button",{type:"button",onClick:function(){ce(F,e=>{e.muted=!e.muted,Y(e.muted)})},onFocus:e=>e.currentTarget.blur(),children:e.jsx(r,{name:U||0===ne?"muted":"volume"})}),e.jsx("input",{max:1,type:"range",step:"any",value:U?0:ne,onFocus:e=>e.currentTarget.blur(),className:b+(I?` ${w}`:""),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${U?0:100*ne}%, #fff5 ${U?0:100*ne}%)`},onChange:e=>ye("volume",+e.currentTarget.value)})]}),e.jsx("div",{children:e.jsx("button",{type:"button",onClick:pe,onFocus:e=>e.currentTarget.blur(),children:e.jsx(r,{name:"pip"})})}),e.jsx("div",{children:e.jsx("button",{type:"button",onClick:he,onFocus:e=>e.currentTarget.blur(),children:e.jsx(r,{name:D?"unfullscreen":"fullscreen"})})})]}),e.jsx(r,{name:Z?"hide":G?"restart":J?"play":"pause",bigger:!0,className:l,onClick:me})]}),H<0&&e.jsx("div",{inert:!0,className:j,children:H.toString()},H),H>0&&e.jsx("div",{inert:!0,className:k,children:`+${H.toString()}`},H),Z&&e.jsx("div",{className:_,children:e.jsx(r,{name:"loading"})}),!O&&e.jsx("div",{className:P,children:e.jsx("button",{type:"button",onFocus:e=>e.currentTarget.blur(),onClick:()=>{X(!0),ce(F,async e=>{try{await e.play()}catch{return}})},children:e.jsx(r,{name:"play",bigger:!0})})})]},T)};
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{useRef as i,useState as r,useEffect as c,useCallback as o,useMemo as n}from"react";function a({name:i,bigger:r,className:c,onClick:o}){return"loading"===i?e("svg",{version:"1.1",id:"L1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",xmlSpace:"preserve",children:[t("title",{children:"loading"}),t("circle",{fill:"none",stroke:"currentColor",strokeWidth:"6",strokeMiterlimit:"15",strokeDasharray:"14.2472,14.2472",cx:"50",cy:"50",r:"47",children:t("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})}),t("circle",{fill:"none",stroke:"currentColor",strokeWidth:"1",strokeMiterlimit:"10",strokeDasharray:"10,10",cx:"50",cy:"50",r:"39",children:t("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"-360 50 50",repeatCount:"indefinite"})}),e("g",{fill:"currentColor",children:[t("rect",{x:"30",y:"35",width:"5",height:"30",children:t("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.1"})}),t("rect",{x:"40",y:"35",width:"5",height:"30",children:t("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.2"})}),t("rect",{x:"50",y:"35",width:"5",height:"30",children:t("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.3"})}),t("rect",{x:"60",y:"35",width:"5",height:"30",children:t("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.4"})}),t("rect",{x:"70",y:"35",width:"5",height:"30",children:t("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.5"})})]})]}):"hide"===i?t(l,{}):e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,onClick:o,className:c,style:{display:"block",width:(r?"5":"1.6")+"em"},stroke:"currentColor",children:[t("title",{children:i}),"play"===i&&t("path",{fill:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}),"pause"===i&&t("path",{strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",d:"M16.4 5.25v13.5m-8.5-13.5v13.5"}),"fullscreen"===i&&t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"}),"unfullscreen"===i&&t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"}),"pip"===i&&t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}),"muted"===i&&t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"volume"===i&&t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"restart"===i&&t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})]})}var d="VideoPlayer-module_visit__PJEFg",s="VideoPlayer-module_invisit__A7jP6",u="VideoPlayer-module_opacity0__M4VIz",b="VideoPlayer-module_opacity1__wWDar",Q="VideoPlayer-module_absoluteCenter__A2KzN",x="VideoPlayer-module_wrapper__8iODY",m="VideoPlayer-module_video__fcIYk",G="VideoPlayer-module_controller__eyPIB",F="VideoPlayer-module_title__oxKqS",X="VideoPlayer-module_center__arqa3",B="VideoPlayer-module_controls__OQ23e",p="VideoPlayer-module_timeWrapper__fpsFx",y="VideoPlayer-module_timeControl__sz7qH",U="VideoPlayer-module_backProcess__I5ZGe",Z="VideoPlayer-module_progressBar__v-AQM",N="VideoPlayer-module_rangeTime__Sp6FM",L="VideoPlayer-module_volumeWrapper__QBYAa",V="VideoPlayer-module_rangeVolume__koFUe",g="VideoPlayer-module_seekLeft__494Gh",h="VideoPlayer-module_seekRight__Wq-Br",W="VideoPlayer-module_hideOnMobile__-bl4X",C="VideoPlayer-module_loadingContainer__H2pCH",k="VideoPlayer-module_playFirstContainer__iHyIf";function D({source:l,title:D}){const w="string"==typeof l?l:l.link,H="object"==typeof l&&"string"==typeof l.type?l.type:"video/mp4",f=i(null),R=i(null),I=i(null),Y=i(null),E=i(0),[v,M]=r(!0),[_,J]=r(0),[T,O]=r(!1),[z,A]=r(!1),[j,P]=r(!1),[S,K]=r(!1),[q,$]=r(!1),[ee,te]=r(!1),[le,ie]=r(!1),[re,ce]=r(!0),[oe,ne]=r(!1),[ae,de]=r(1),[se,ue]=r(0),[be,Qe]=r(0);function xe(e){if(void 0===e||Number.isNaN(e)||e<0)return"00:00";const t=Math.floor(e),l=t%60;return`${Math.floor(t/60).toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}`}async function me(e,t){e.current&&await t(e.current)}c(()=>{K(!1),ie(!1),$(!1),ue(0),Qe(0),J(0),O(!1)},[w]),c(()=>()=>{f.current&&(clearTimeout(f.current),f.current=null),R.current&&(clearTimeout(R.current),R.current=null)},[]);const Ge=o(()=>{R.current&&(clearTimeout(R.current),R.current=null),O(!0),R.current=setTimeout(()=>{O(!1),J(0),R.current=null},1500)},[]),Fe=o(()=>{me(I,async e=>{try{e.paused?await e.play():e.pause()}catch{return}})},[]),Xe=o(e=>{me(I,t=>{J(l=>{const i="+"===e?l<0?10:l+10:l>0?-10:l-10;return t.currentTime+="+"===e?10:-10,i}),Ge()})},[Ge]);function Be(){const e=document;!!(e.fullscreenEnabled||e.webkitFullscreenEnabled||e.mozFullScreenEnabled||e.msFullscreenEnabled)&&me(Y,e=>{document.fullscreenElement?async function(){const e=document,t=e.exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen;if(t)try{await t.call(e)}catch{return void console.error("Failed to exit fullscreen")}}():async function(e){const t=e,l=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitEnterFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(l)try{await l.call(t)}catch{return void console.error("Failed to enter fullscreen")}}(e)})}function pe(){"pictureInPictureEnabled"in document&&"requestPictureInPicture"in HTMLVideoElement.prototype&&me(I,e=>{document.pictureInPictureElement?async function(e){if(!1===e.disablePictureInPicture&&"pictureInPictureElement"in document&&document.pictureInPictureElement)try{await document.exitPictureInPicture()}catch{return void console.error("Failed to exit Picture-in-Picture")}}(e):async function(e){if(!("pictureInPictureEnabled"in document)||"function"!=typeof e.requestPictureInPicture)return console.error("Picture-in-Picture is not supported in this browser"),null;try{return e.paused&&await e.play().catch(()=>{console.warn("Auto-play was prevented")}),await e.requestPictureInPicture()}catch{return console.error("Failed to enter Picture-in-Picture"),null}}(e)})}function ye(e,t){me(I,l=>{"time"===e?(Qe(t),l.currentTime=t):(de(t),l.volume=t,l.muted&&(l.muted=!1,te(!1)))})}function Ue(e=2500){re||(f.current&&(clearTimeout(f.current),f.current=null),A(!0),f.current=setTimeout(()=>{oe||A(!1),f.current=null},e))}c(()=>{const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobi/i.test(window.navigator.userAgent);async function t(){if(Y.current&&I.current){const e=document.fullscreenElement===Y.current;P(document.fullscreenEnabled&&e);const t=I.current.videoWidth>I.current.videoHeight;if("undefined"!=typeof window&&window.screen&&"orientation"in window.screen&&window.screen.orientation&&"lock"in window.screen.orientation&&"function"==typeof window.screen.orientation.lock&&t&&e)try{await window.screen.orientation.lock("landscape")}catch{return!1}}}function l(e){[" ","f","p","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault(),me(I,t=>{switch(e.key){case" ":Fe();break;case"f":Be();break;case"p":pe();break;case"ArrowLeft":J(e=>{const l=e>0?-10:e-10;return t.currentTime-=10,l}),Ge();break;case"ArrowRight":J(e=>{const l=e<0?10:e+10;return t.currentTime+=10,l}),Ge()}})}return M(e),document.addEventListener("fullscreenchange",t),!e&&window.addEventListener("keydown",l),()=>{document.removeEventListener("fullscreenchange",t),!e&&window.removeEventListener("keydown",l)}},[w,Fe,Ge]);const Ze=o(function(e,t){let l=null,i=0;return function(...r){const c=Date.now();i?(l&&clearTimeout(l),l=setTimeout(()=>{c-i>=t&&(e.apply(this,r),i=c)},t-(c-i))):(e.apply(this,r),i=c)}}(()=>{re||Ue()},200),[re,oe]),Ne=o(()=>{A(!1),f.current&&(clearTimeout(f.current),f.current=null)},[]);c(()=>{oe&&Ue(1e3)},[oe]);const Le=o(e=>{const t=e.currentTarget.currentTime;(Math.floor(t)!==Math.floor(be)||Math.abs(t-be)>1)&&Qe(t)},[be]),Ve=n(()=>{if(!I.current||!se)return 0;const e=I.current.buffered;if(0===e.length)return 0;let t=0;for(let l=0;l<e.length;l++)if(e.start(l)<=be&&e.end(l)>be){t=e.end(l);break}return t/se*100},[be,se]),ge=n(()=>se>0?be/se*100:0,[be,se]),he=o(e=>{if(!v)return;const t=Date.now(),l=t-E.current;(l>0&&l<300||T)&&(T||O(!0),Xe(e)),E.current=t},[v,T,Xe]);return e("div",{className:x,ref:Y,onMouseMove:Ze,onMouseLeave:Ne,children:[t("video",{playsInline:!0,preload:"none",ref:I,controls:!1,onTimeUpdate:Le,onLoadedMetadata:e=>ue(e.currentTarget.duration),onVolumeChange:e=>de(e.currentTarget.volume),onCanPlayThrough:()=>$(!1),onWaiting:()=>$(!0),onLoadStart:()=>ie(!1),onEnded:()=>ie(!0),onPlay:()=>{ie(!1),ce(!1),K(!0)},onPause:()=>ce(!0),className:m,children:t("source",{src:w,type:H})}),e("div",{className:`${G} ${v?re||z?d:s:re||z?b:u}`,children:[t("h1",{className:F,children:D}),e("div",{className:X,onClick:v?void 0:Fe,children:[t("div",{onClick:()=>he("-")}),t("div",{onClick:()=>he("+")})]}),e("div",{className:B,children:[e("div",{className:p,children:[t("article",{children:xe(be)}),e("div",{className:y,children:[t("div",{className:U}),t("div",{className:Z,style:{width:`${Ve}%`}}),t("input",{type:"range",step:"any",max:se,value:be,onFocus:e=>e.currentTarget.blur(),className:N,onPointerDown:()=>ne(!0),onPointerUp:()=>ne(!1),onPointerCancel:()=>ne(!1),onChange:e=>ye("time",+e.currentTarget.value),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${ge}%, #0000 ${ge}%)`}})]}),t("article",{children:xe(se)})]}),e("div",{className:L,children:[t("button",{type:"button",onClick:function(){me(I,e=>{e.muted=!e.muted,te(e.muted)})},onFocus:e=>e.currentTarget.blur(),children:t(a,{name:ee||0===ae?"muted":"volume"})}),t("input",{max:1,type:"range",step:"any",value:ee?0:ae,onFocus:e=>e.currentTarget.blur(),className:V+(v?` ${W}`:""),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${ee?0:100*ae}%, #fff5 ${ee?0:100*ae}%)`},onChange:e=>ye("volume",+e.currentTarget.value)})]}),t("div",{children:t("button",{type:"button",onClick:pe,onFocus:e=>e.currentTarget.blur(),children:t(a,{name:"pip"})})}),t("div",{children:t("button",{type:"button",onClick:Be,onFocus:e=>e.currentTarget.blur(),children:t(a,{name:j?"unfullscreen":"fullscreen"})})})]}),t(a,{name:q?"hide":le?"restart":re?"play":"pause",bigger:!0,className:Q,onClick:Fe})]}),_<0&&t("div",{inert:!0,className:g,children:_.toString()},_),_>0&&t("div",{inert:!0,className:h,children:`+${_.toString()}`},_),q&&t("div",{className:C,children:t(a,{name:"loading"})}),!S&&t("div",{className:k,children:t("button",{type:"button",onFocus:e=>e.currentTarget.blur(),onClick:()=>{K(!0),me(I,async e=>{try{await e.play()}catch{return}})},children:t(a,{name:"play",bigger:!0})})})]},w)}!function(e,t){void 0===t&&(t={});var l=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===l&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".VideoPlayer-module_hide__nwlly{display:none}.VideoPlayer-module_visit__PJEFg{visibility:visible}.VideoPlayer-module_invisit__A7jP6{visibility:hidden}.VideoPlayer-module_opacity0__M4VIz{opacity:0}.VideoPlayer-module_opacity1__wWDar{opacity:1}.VideoPlayer-module_absoluteCenter__A2KzN{cursor:pointer;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.VideoPlayer-module_wrapper__8iODY,.VideoPlayer-module_wrapper__8iODY *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.VideoPlayer-module_wrapper__8iODY{aspect-ratio:16/9;background-color:#000;color:#fff;display:block;position:relative;width:100%}.VideoPlayer-module_video__fcIYk{display:block;height:100%;width:100%}.VideoPlayer-module_controller__eyPIB{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:rgba(0,0,0,.5);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;width:100%}.VideoPlayer-module_title__oxKqS{font-size:1.1rem;font-weight:400;line-height:1.1rem;padding:1rem 0 0 1rem;width:100%}.VideoPlayer-module_center__arqa3{-webkit-box-flex:1;-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:row;flex-direction:row;width:100%;div{-webkit-box-flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}}.VideoPlayer-module_controls__OQ23e{display:-webkit-box;display:-ms-flexbox;display:flex;gap:.6em;padding:.8em 1em;width:100%}.VideoPlayer-module_controls__OQ23e button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff0;border:0;color:#fff;cursor:pointer;padding:.25em;-webkit-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s}.VideoPlayer-module_controls__OQ23e button:hover{background-color:#00b2ff;border-radius:5px}.VideoPlayer-module_timeWrapper__fpsFx{-webkit-box-flex:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-family:monospace;font-size:1rem;gap:.6em;padding-inline:.3em;article{font-size:1em}}.VideoPlayer-module_timeControl__sz7qH{-webkit-box-flex:1;-ms-flex:1;flex:1;position:relative}.VideoPlayer-module_backProcess__I5ZGe{background-color:#fff5;border-radius:2em;height:4px;width:100%}.VideoPlayer-module_progressBar__v-AQM{background-color:#fffa;border-radius:2em;height:4px;left:0;position:absolute;top:0;width:100%}.VideoPlayer-module_rangeTime__Sp6FM{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:2em;height:4px;left:0;position:absolute;top:0;width:100%}.VideoPlayer-module_rangeTime__Sp6FM::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:2em;height:1em;width:1em}.VideoPlayer-module_rangeTime__Sp6FM:hover{cursor:pointer}.VideoPlayer-module_rangeTime__Sp6FM::-webkit-slider-thumb:hover{-webkit-box-shadow:0 0 1px 3px #fff4;box-shadow:0 0 1px 3px #fff4}.VideoPlayer-module_volumeWrapper__QBYAa{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:.1em}.VideoPlayer-module_rangeVolume__koFUe{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:2em;cursor:pointer;height:4px;width:4em}.VideoPlayer-module_rangeVolume__koFUe::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:2em;height:1em;width:1em}.VideoPlayer-module_rangeVolume__koFUe::-webkit-slider-thumb:hover{-webkit-box-shadow:0 0 1px 3px #fff4;box-shadow:0 0 1px 3px #fff4}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{font-size:1.6rem;position:absolute;text-shadow:0 0 2px #0004;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.VideoPlayer-module_seekLeft__494Gh{left:20%}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{-webkit-animation:VideoPlayer-module_shaking__mp-kJ .2s;animation:VideoPlayer-module_shaking__mp-kJ .2s}.VideoPlayer-module_seekRight__Wq-Br{right:20%}@-webkit-keyframes VideoPlayer-module_shaking__mp-kJ{0%{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}50%{-webkit-transform:translateY(-50%) scale(2);transform:translateY(-50%) scale(2)}to{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}}@keyframes VideoPlayer-module_shaking__mp-kJ{0%{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}50%{-webkit-transform:translateY(-50%) scale(2);transform:translateY(-50%) scale(2)}to{-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}}@media (max-width:640px){.VideoPlayer-module_hideOnMobile__-bl4X{display:none}}@media (min-width:640px){.VideoPlayer-module_rangeVolume__koFUe{width:6em}.VideoPlayer-module_seekLeft__494Gh,.VideoPlayer-module_seekRight__Wq-Br{font-size:3rem}}.VideoPlayer-module_loadingContainer__H2pCH{display:block;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:12%;svg{color:#fff;display:block;width:100%}}.VideoPlayer-module_playFirstContainer__iHyIf{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#000;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;button{background-color:transparent;border:0;cursor:pointer;margin:0;padding:.6em;svg{color:#fff}}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlZpZGVvUGxheWVyLm1vZHVsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT0EsZ0NBQ0MsWUFDRCxDQUVBLGlDQUNDLGtCQUNELENBRUEsbUNBQ0MsaUJBQ0QsQ0FFQSxvQ0FDQyxTQUNELENBRUEsb0NBQ0MsU0FDRCxDQUVBLDBDQUdDLGNBQWUsQ0FEZixRQUFTLENBRVQsaUJBQWtCLENBSGxCLE9BQVEsQ0FJUixzQ0FBd0MsQ0FDeEMsa0NBQW9DLENBQ3BDLDhCQUNELENBRUEsd0VBUUMsNkJBQThCLENBQzlCLHFCQUFzQixDQVB0QixRQUFTLENBQ1QsU0FBVSxDQUNWLHdCQUF5QixDQUN6QixxQkFBc0IsQ0FDdEIsb0JBQXFCLENBQ3JCLGdCQUdELENBRUEsbUNBS0MsaUJBQW9CLENBQ3BCLHFCQUF1QixDQUp2QixVQUFZLENBQ1osYUFBYyxDQUNkLGlCQUFrQixDQUhsQixVQU1ELENBRUEsaUNBR0MsYUFBYyxDQURkLFdBQVksQ0FEWixVQUdELENBRUEsc0NBU0Msd0JBQXlCLENBQ3pCLHFCQUFzQixDQUt0QiwyQkFBNEIsQ0FDNUIsNEJBQTZCLENBRzdCLHVCQUF3QixDQUN4QixvQkFBcUIsQ0FUckIsa0JBQW1CLENBV25CLCtCQUFvQyxDQWpCcEMsbUJBQW9CLENBQ3BCLG1CQUFvQixDQUNwQixZQU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3BsYXk6IC13ZWJraXQtYm94O1xuXHRkaXNwbGF5OiAtbXMtZmxleGJveDtcblx0ZGlzcGxheTogZmxleDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQtd2Via2l0LWJveC1hbGlnbjogY2VudGVyO1xuXHQtbXMtZmxleC1hbGlnbjogY2VudGVyO1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHQtd2Via2l0LWJveC1wYWNrOiBjZW50ZXI7XG5cdC1tcy1mbGV4LXBhY2s6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGJhY2tncm91bmQtY29sb3I6IGJsYWNrO1xuXHRidXR0b24ge1xuXHRcdGJvcmRlcjogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0cGFkZGluZzogMC42ZW07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdHN2ZyB7XG5cdFx0XHRjb2xvcjogd2hpdGU7XG5cdFx0fVxuXHR9XG59XG4iXX0= */");export{D as VideoPlayer};
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useRef as n,useState as i,useEffect as o,useCallback as a,useMemo as l}from"react";function c({name:n,bigger:i,className:o,onClick:a}){return"loading"===n?e("svg",{version:"1.1",id:"L1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",xmlSpace:"preserve",children:[r("title",{children:"loading"}),r("circle",{fill:"none",stroke:"currentColor",strokeWidth:"6",strokeMiterlimit:"15",strokeDasharray:"14.2472,14.2472",cx:"50",cy:"50",r:"47",children:r("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})}),r("circle",{fill:"none",stroke:"currentColor",strokeWidth:"1",strokeMiterlimit:"10",strokeDasharray:"10,10",cx:"50",cy:"50",r:"39",children:r("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"5s",from:"0 50 50",to:"-360 50 50",repeatCount:"indefinite"})}),e("g",{fill:"currentColor",children:[r("rect",{x:"30",y:"35",width:"5",height:"30",children:r("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.1"})}),r("rect",{x:"40",y:"35",width:"5",height:"30",children:r("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.2"})}),r("rect",{x:"50",y:"35",width:"5",height:"30",children:r("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.3"})}),r("rect",{x:"60",y:"35",width:"5",height:"30",children:r("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.4"})}),r("rect",{x:"70",y:"35",width:"5",height:"30",children:r("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:"0 5 ; 0 -5; 0 5",repeatCount:"indefinite",begin:"0.5"})})]})]}):"hide"===n?r(t,{}):e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,onClick:a,className:o,style:{display:"block",width:(i?"5":"1.6")+"em"},stroke:"currentColor",children:[r("title",{children:n}),"play"===n&&r("path",{fill:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}),"pause"===n&&r("path",{strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",d:"M16.4 5.25v13.5m-8.5-13.5v13.5"}),"fullscreen"===n&&r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"}),"unfullscreen"===n&&r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"}),"pip"===n&&r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}),"muted"===n&&r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"volume"===n&&r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}),"restart"===n&&r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})]})}var u="VideoPlayer-module_visit__PJEFg",s="VideoPlayer-module_invisit__A7jP6",d="VideoPlayer-module_opacity0__M4VIz",m="VideoPlayer-module_opacity1__wWDar",h="VideoPlayer-module_absoluteCenter__A2KzN",p="VideoPlayer-module_wrapper__8iODY",f="VideoPlayer-module_video__fcIYk",y="VideoPlayer-module_controller__eyPIB",v="VideoPlayer-module_title__oxKqS",g="VideoPlayer-module_center__arqa3",w="VideoPlayer-module_controls__OQ23e",_="VideoPlayer-module_timeWrapper__fpsFx",b="VideoPlayer-module_timeControl__sz7qH",k="VideoPlayer-module_backProcess__I5ZGe",P="VideoPlayer-module_progressBar__v-AQM",M="VideoPlayer-module_rangeTime__Sp6FM",T="VideoPlayer-module_volumeWrapper__QBYAa",C="VideoPlayer-module_rangeVolume__koFUe",L="VideoPlayer-module_seekLeft__494Gh",V="VideoPlayer-module_seekRight__Wq-Br",N="VideoPlayer-module_hideOnMobile__-bl4X",x="VideoPlayer-module_loadingContainer__H2pCH",F="VideoPlayer-module_playFirstContainer__iHyIf";function E({source:t,title:E}){const I="string"==typeof t?t:t.link,A="object"==typeof t&&"string"==typeof t.type?t.type:"video/mp4",H=n(null),S=n(null),j=n(null),q=n(null),$=n(0),[W,B]=i(!0),[D,z]=i(0),[R,O]=i(!1),[X,Z]=i(!1),[Q,U]=i(!1),[Y,G]=i(!1),[K,J]=i(!1),[ee,re]=i(!1),[te,ne]=i(!1),[ie,oe]=i(!0),[ae,le]=i(!1),[ce,ue]=i(1),[se,de]=i(0),[me,he]=i(0);function pe(e){if(void 0===e||Number.isNaN(e)||e<0)return"00:00";const r=Math.floor(e),t=r%60;return`${Math.floor(r/60).toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}async function fe(e,r){e.current&&await r(e.current)}o(()=>{G(!1),ne(!1),J(!1),de(0),he(0),z(0),O(!1)},[I]),o(()=>()=>{H.current&&(clearTimeout(H.current),H.current=null),S.current&&(clearTimeout(S.current),S.current=null)},[]);const ye=a(()=>{S.current&&(clearTimeout(S.current),S.current=null),O(!0),S.current=setTimeout(()=>{O(!1),z(0),S.current=null},1500)},[]),ve=a(()=>{fe(j,async e=>{try{e.paused?await e.play():e.pause()}catch{return}})},[]),ge=a(e=>{fe(j,r=>{z(t=>{const n="+"===e?t<0?10:t+10:t>0?-10:t-10;return r.currentTime+="+"===e?10:-10,n}),ye()})},[ye]);function we(){const e=document;!!(e.fullscreenEnabled||e.webkitFullscreenEnabled||e.mozFullScreenEnabled||e.msFullscreenEnabled)&&fe(q,e=>{document.fullscreenElement?async function(){const e=document,r=e.exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen;if(r)try{await r.call(e)}catch{return void console.error("Failed to exit fullscreen")}}():async function(e){const r=e,t=r.requestFullscreen||r.webkitRequestFullscreen||r.webkitEnterFullscreen||r.mozRequestFullScreen||r.msRequestFullscreen;if(t)try{await t.call(r)}catch{return void console.error("Failed to enter fullscreen")}}(e)})}function _e(){"pictureInPictureEnabled"in document&&"requestPictureInPicture"in HTMLVideoElement.prototype&&fe(j,e=>{document.pictureInPictureElement?async function(e){if(!1===e.disablePictureInPicture&&"pictureInPictureElement"in document&&document.pictureInPictureElement)try{await document.exitPictureInPicture()}catch{return void console.error("Failed to exit Picture-in-Picture")}}(e):async function(e){if(!("pictureInPictureEnabled"in document)||"function"!=typeof e.requestPictureInPicture)return console.error("Picture-in-Picture is not supported in this browser"),null;try{return e.paused&&await e.play().catch(()=>{console.warn("Auto-play was prevented")}),await e.requestPictureInPicture()}catch{return console.error("Failed to enter Picture-in-Picture"),null}}(e)})}function be(e,r){fe(j,t=>{"time"===e?(he(r),t.currentTime=r):(ue(r),t.volume=r,t.muted&&(t.muted=!1,re(!1)))})}function ke(e=2500){ie||(H.current&&(clearTimeout(H.current),H.current=null),Z(!0),H.current=setTimeout(()=>{ae||Z(!1),H.current=null},e))}o(()=>{const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobi/i.test(window.navigator.userAgent);async function r(){if(q.current&&j.current){const e=document.fullscreenElement===q.current;U(document.fullscreenEnabled&&e);const r=j.current.videoWidth>j.current.videoHeight;if("undefined"!=typeof window&&window.screen&&"orientation"in window.screen&&window.screen.orientation&&"lock"in window.screen.orientation&&"function"==typeof window.screen.orientation.lock&&r&&e)try{await window.screen.orientation.lock("landscape")}catch{return!1}}}function t(e){[" ","f","p","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault(),fe(j,r=>{switch(e.key){case" ":ve();break;case"f":we();break;case"p":_e();break;case"ArrowLeft":z(e=>{const t=e>0?-10:e-10;return r.currentTime-=10,t}),ye();break;case"ArrowRight":z(e=>{const t=e<0?10:e+10;return r.currentTime+=10,t}),ye()}})}return B(e),document.addEventListener("fullscreenchange",r),!e&&window.addEventListener("keydown",t),()=>{document.removeEventListener("fullscreenchange",r),!e&&window.removeEventListener("keydown",t)}},[I,ve,ye]);const Pe=a(function(e,r){let t=null,n=0;return function(...i){const o=Date.now();n?(t&&clearTimeout(t),t=setTimeout(()=>{o-n>=r&&(e.apply(this,i),n=o)},r-(o-n))):(e.apply(this,i),n=o)}}(()=>{ie||ke()},200),[ie,ae]),Me=a(()=>{Z(!1),H.current&&(clearTimeout(H.current),H.current=null)},[]);o(()=>{ae&&ke(1e3)},[ae]);const Te=a(e=>{const r=e.currentTarget.currentTime;(Math.floor(r)!==Math.floor(me)||Math.abs(r-me)>1)&&he(r)},[me]),Ce=l(()=>{if(!j.current||!se)return 0;const e=j.current.buffered;if(0===e.length)return 0;let r=0;for(let t=0;t<e.length;t++)if(e.start(t)<=me&&e.end(t)>me){r=e.end(t);break}return r/se*100},[me,se]),Le=l(()=>se>0?me/se*100:0,[me,se]),Ve=a(e=>{if(!W)return;const r=Date.now(),t=r-$.current;(t>0&&t<300||R)&&(R||O(!0),ge(e)),$.current=r},[W,R,ge]);return e("div",{className:p,ref:q,onMouseMove:Pe,onMouseLeave:Me,children:[r("video",{playsInline:!0,preload:"none",ref:j,controls:!1,onTimeUpdate:Te,onLoadedMetadata:e=>de(e.currentTarget.duration),onVolumeChange:e=>ue(e.currentTarget.volume),onCanPlayThrough:()=>J(!1),onWaiting:()=>J(!0),onLoadStart:()=>ne(!1),onEnded:()=>ne(!0),onPlay:()=>{ne(!1),oe(!1),G(!0)},onPause:()=>oe(!0),className:f,children:r("source",{src:I,type:A})}),e("div",{className:`${y} ${W?ie||X?u:s:ie||X?m:d}`,children:[r("h1",{className:v,children:E}),e("div",{className:g,onClick:W?void 0:ve,children:[r("div",{onClick:()=>Ve("-")}),r("div",{onClick:()=>Ve("+")})]}),e("div",{className:w,children:[e("div",{className:_,children:[r("article",{children:pe(me)}),e("div",{className:b,children:[r("div",{className:k}),r("div",{className:P,style:{width:`${Ce}%`}}),r("input",{type:"range",step:"any",max:se,value:me,onFocus:e=>e.currentTarget.blur(),className:M,onPointerDown:()=>le(!0),onPointerUp:()=>le(!1),onPointerCancel:()=>le(!1),onChange:e=>be("time",+e.currentTarget.value),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${Le}%, #0000 ${Le}%)`}})]}),r("article",{children:pe(se)})]}),e("div",{className:T,children:[r("button",{type:"button",onClick:function(){fe(j,e=>{e.muted=!e.muted,re(e.muted)})},onFocus:e=>e.currentTarget.blur(),children:r(c,{name:ee||0===ce?"muted":"volume"})}),r("input",{max:1,type:"range",step:"any",value:ee?0:ce,onFocus:e=>e.currentTarget.blur(),className:C+(W?` ${N}`:""),style:{backgroundImage:`linear-gradient(to right, #00b2ff ${ee?0:100*ce}%, #fff5 ${ee?0:100*ce}%)`},onChange:e=>be("volume",+e.currentTarget.value)})]}),r("div",{children:r("button",{type:"button",onClick:_e,onFocus:e=>e.currentTarget.blur(),children:r(c,{name:"pip"})})}),r("div",{children:r("button",{type:"button",onClick:we,onFocus:e=>e.currentTarget.blur(),children:r(c,{name:Q?"unfullscreen":"fullscreen"})})})]}),r(c,{name:K?"hide":te?"restart":ie?"play":"pause",bigger:!0,className:h,onClick:ve})]}),D<0&&r("div",{inert:!0,className:L,children:D.toString()},D),D>0&&r("div",{inert:!0,className:V,children:`+${D.toString()}`},D),K&&r("div",{className:x,children:r(c,{name:"loading"})}),!Y&&r("div",{className:F,children:r("button",{type:"button",onFocus:e=>e.currentTarget.blur(),onClick:()=>{G(!0),fe(j,async e=>{try{await e.play()}catch{return}})},children:r(c,{name:"play",bigger:!0})})})]},I)}export{E as VideoPlayer};
package/package.json CHANGED
@@ -1,38 +1,12 @@
1
1
  {
2
2
  "name": "@tiwz/react-video-player",
3
- "version": "0.0.1",
4
- "description": "A React component for playing video",
5
- "keywords": [
6
- "react",
7
- "video",
8
- "player",
9
- "media"
10
- ],
11
- "homepage": "https://github.com/TiwPhiraphan/react-video-player#readme",
12
- "bugs": {
13
- "url": "https://github.com/TiwPhiraphan/react-video-player/issues"
14
- },
3
+ "version": "1.0.0",
4
+ "author": "tiwz",
15
5
  "repository": {
16
6
  "type": "git",
17
7
  "url": "git+https://github.com/TiwPhiraphan/react-video-player.git"
18
8
  },
19
- "license": "MIT",
20
- "author": "tiwz",
21
- "type": "module",
22
- "main": "src/index.ts",
23
- "exports": {
24
- ".": {
25
- "types": "./dist/index.d.ts",
26
- "import": "./dist/index.mjs",
27
- "require": "./dist/index.js"
28
- }
29
- },
30
- "scripts": {
31
- "rollup": "rollup -c --bundleConfigAsCjs"
32
- },
33
- "files": [
34
- "dist"
35
- ],
9
+ "style": "dist/index.css",
36
10
  "devDependencies": {
37
11
  "@rollup/plugin-commonjs": "^29.0.0",
38
12
  "@rollup/plugin-json": "^6.1.0",
@@ -41,6 +15,7 @@
41
15
  "@rollup/plugin-typescript": "^12.3.0",
42
16
  "@types/node": "^25.0.10",
43
17
  "@types/react": "^19.2.9",
18
+ "postcss": "^8.5.6",
44
19
  "rollup": "^4.57.0",
45
20
  "rollup-plugin-dts": "^6.3.0",
46
21
  "rollup-plugin-peer-deps-external": "^2.2.4",
@@ -50,5 +25,34 @@
50
25
  },
51
26
  "peerDependencies": {
52
27
  "react": ">=18"
53
- }
28
+ },
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.mjs",
33
+ "require": "./dist/index.js"
34
+ },
35
+ "./style": {
36
+ "default": "./dist/index.css"
37
+ }
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/TiwPhiraphan/react-video-player/issues"
41
+ },
42
+ "description": "A React component for playing video",
43
+ "files": [
44
+ "dist"
45
+ ],
46
+ "homepage": "https://github.com/TiwPhiraphan/react-video-player#readme",
47
+ "keywords": [
48
+ "react",
49
+ "video",
50
+ "player",
51
+ "media"
52
+ ],
53
+ "license": "MIT",
54
+ "scripts": {
55
+ "rollup": "rollup -c --bundleConfigAsCjs"
56
+ },
57
+ "type": "module"
54
58
  }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export { default as VideoPlayer } from './components/VideoPlayer'