Commit 9e33abd9 authored by liujiaxin's avatar liujiaxin

1

parent b95990fe
......@@ -518,7 +518,7 @@ cc.Class({
// this._lrcNextLineTime = this._lrcData[this._lrcLineIndex] ? this._lrcData[this._lrcLineIndex].time : 0;
// return this._remainContent.shift();
// }
if (!time) {
if (!time || time < 0) {
time = 0;
}
let idx = 0;
......@@ -612,12 +612,12 @@ cc.Class({
let endIndex = nextLineObj.index;
while(line = this._lrcData[endIndex]) {
if (line.newLine || index === 0 ) {
return line.time
return line.time > 0 ? line.time : 0
}
endIndex -= 1;
}
return {
time: line.time,
time: line.time > 0 ? line.time : 0,
index: lineObj.index
};
},
......@@ -987,6 +987,9 @@ cc.Class({
this.resetLRC();
},
seek(time) {
if (time < 0) {
time = 0
}
const adSrc = this.getCurrentPlayingSource();
adSrc.setCurrentTime(time);
},
......@@ -1021,12 +1024,14 @@ cc.Class({
if (this._audioSource && this._audioSource.audio) {
this._audioSource.audio.stop()
this._audioSource.stop();
// this._audioSource.audio.destroy();
this._audioSource.audio = null;
// this._audioSource._destruct();
}
if (this._audioACSource && this._audioACSource.audio) {
this._audioACSource.audio.stop()
this._audioACSource.stop();
// this._audioACSource.audio.destroy();
this._audioACSource.audio = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment