因?yàn)槔蠋熡玫氖桥f版的React,所以所用的API跟現(xiàn)在的版本不大相同,大家留意下就好。
2017-09-17
只需要
$('#player').jPlayer( "playHead", progress*100 );
就夠了
評(píng)論不能改動(dòng),有沒(méi)有大佬能說(shuō)一下為什么
$('#player').jPlayer( "playHead", progress*100 );
就夠了
評(píng)論不能改動(dòng),有沒(méi)有大佬能說(shuō)一下為什么
2017-09-15
$('#player').jPlayer( "playHead", progress*100 );
this.progress = progress
this.progress = progress
2017-09-15
聽(tīng)了要做什么之后,先去寫(xiě)寫(xiě)看,居然實(shí)現(xiàn)了,再繼續(xù)看視頻才是最騷的
2017-09-15
辛辛苦苦照著一路做下來(lái)到這兒就是在跟不上了,感覺(jué)漏聽(tīng)了一節(jié)課一樣,對(duì)于初學(xué)者來(lái)說(shuō)跳躍幅度那么大,坑比課程
2017-09-15
暫停時(shí)調(diào)整進(jìn)度會(huì)繼續(xù)播放解決方案。暫停時(shí)也能調(diào)整進(jìn)度。
progressChangeHandler(progress){
if(this.state.isPlay){
$('#player').jPlayer('play', duration * progress); //play調(diào)用了timeupdate,導(dǎo)致state更改,ui更改
}else{
$('#player').jPlayer('play', duration * progress);
$('#player').jPlayer('pause');
}
}
progressChangeHandler(progress){
if(this.state.isPlay){
$('#player').jPlayer('play', duration * progress); //play調(diào)用了timeupdate,導(dǎo)致state更改,ui更改
}else{
$('#player').jPlayer('play', duration * progress);
$('#player').jPlayer('pause');
}
}
2017-09-13
https://github.com/junhey/React-Music-Player 解決了一些bug,實(shí)現(xiàn)完整的音樂(lè)播放器。
2017-09-13
最新回答 / qq_顏色不一樣的煙火_2
找到了,progress.js里面的changeProgress方法里應(yīng)該是this.props.onProgressChange && this.props.onProgressChange(progress);
2017-09-12