(e: any, player: any)
| 56 | } |
| 57 | } |
| 58 | function changeCurrentTimeOnClick(e: any, player: any) { |
| 59 | const timelineContainer = document.querySelector('#timeline-container'); |
| 60 | |
| 61 | const rect = timelineContainer && timelineContainer?.getBoundingClientRect(); |
| 62 | let percent; |
| 63 | if (rect) { |
| 64 | percent = Math.min(Math.max(0, e?.x - rect?.x), rect?.width) / rect?.width; |
| 65 | player?.currentTime(percent * player?.duration()); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | function setCurrentLabel( |
| 70 | e: any, |