import * as React from "react"; import {RecordingSummary, RecorderData, animationSpeed} from "../../../Shared/Shared"; export class ReproductionBar extends React.Component { cursor:JQuery=null; render(){ //let totaltime=this.props.Actions[0].time; let totalDuration=this.props.Summary!=null?this.props.Summary.duration:0; if(totalDuration==0) totalDuration=1; return(
{this.props.Summary!=null? this.props.Summary.ranges.map((range,index)=>{ return(
 
)}) :
}
{this.cursor=jQuery(element)}} style={{backgroundColor:'black',height:'25px',width:'1px',display:'inline-block',position:'absolute',left:'1px'}}> 
); } componentDidUpdate(prevProps: Readonly, prevState: Readonly, prevContext: any): void { } public StartPlaying() { if(this.cursor==null) return; this.cursor.stop(); this.cursor.css('left',0); this.cursor.animate({left:'100%'},this.props.Summary.duration*animationSpeed,'linear'); } } interface RecorderBarProps{ Summary:RecordingSummary; }