()
| 16 | |
| 17 | } |
| 18 | Storetime(){ |
| 19 | |
| 20 | audio.pause(); |
| 21 | audio.currentTime=0; |
| 22 | var n=this.timerID=setInterval(()=>{ |
| 23 | // let date=new Date(); |
| 24 | var y=this.state.selectedtime; |
| 25 | var t=((new Date()).toTimeString().substring(0,5)); |
| 26 | |
| 27 | x++; |
| 28 | if (y==(t)) { |
| 29 | //alert("hello bitches"); |
| 30 | // console.log("hey"); |
| 31 | audio.play(); |
| 32 | } |
| 33 | else if(x==300){ |
| 34 | audio.pause(); |
| 35 | audio.currentTime=0; |
| 36 | x=0; |
| 37 | clearInterval(n); |
| 38 | |
| 39 | }else { |
| 40 | |
| 41 | }},1000) |
| 42 | console.log(this.state.selectedtime); |
| 43 | } |
| 44 | |
| 45 | render(){ |
| 46 |