(rootElement: HTMLElement)
| 151 | } |
| 152 | |
| 153 | onRenderHTML(rootElement: HTMLElement): void { |
| 154 | const {timeRange, step, formatLabel} = this.props; |
| 155 | const isPlaying = this.getPlaying(); |
| 156 | const currentTime = this.getTime(); |
| 157 | |
| 158 | rootElement.dataset.placement = this.props.placement; |
| 159 | |
| 160 | render( |
| 161 | <div className="deck-widget-button-group"> |
| 162 | {isPlaying ? ( |
| 163 | <IconButton |
| 164 | label="Pause" |
| 165 | className="deck-widget-timeline-pause" |
| 166 | onClick={this.handlePlayPause} |
| 167 | /> |
| 168 | ) : ( |
| 169 | <IconButton |
| 170 | label="Play" |
| 171 | className="deck-widget-timeline-play" |
| 172 | onClick={this.handlePlayPause} |
| 173 | /> |
| 174 | )} |
| 175 | <RangeInput |
| 176 | min={timeRange[0]} |
| 177 | max={timeRange[1]} |
| 178 | orientation="horizontal" |
| 179 | step={step} |
| 180 | value={[currentTime, currentTime]} |
| 181 | onChange={this.handleTimeChange} |
| 182 | decorations={[ |
| 183 | { |
| 184 | position: [currentTime, currentTime + step], |
| 185 | element: ( |
| 186 | <div className="deck-widget-timeline-label deck-widget-timeline-label--current"> |
| 187 | {formatLabel(currentTime)} |
| 188 | </div> |
| 189 | ) |
| 190 | } |
| 191 | ]} |
| 192 | /> |
| 193 | </div>, |
| 194 | rootElement |
| 195 | ); |
| 196 | } |
| 197 | |
| 198 | private handlePlayPause = (): void => { |
| 199 | const isPlaying = this.getPlaying(); |
nothing calls this directly
no test coverage detected