Showing
1 changed file
with
4 additions
and
4 deletions
| @@ -29,6 +29,7 @@ export struct PlayUIComponent { | @@ -29,6 +29,7 @@ export struct PlayUIComponent { | ||
| 29 | @Prop liveUrl: string | 29 | @Prop liveUrl: string |
| 30 | // 当前播放资源的状态 | 30 | // 当前播放资源的状态 |
| 31 | @Consume playSourceState: number | 31 | @Consume playSourceState: number |
| 32 | + @State time: number = -1 | ||
| 32 | 33 | ||
| 33 | manualClickPauseOrPlayBack?:(manualClickPauseOrPlay: boolean) => void | 34 | manualClickPauseOrPlayBack?:(manualClickPauseOrPlay: boolean) => void |
| 34 | 35 | ||
| @@ -37,16 +38,15 @@ export struct PlayUIComponent { | @@ -37,16 +38,15 @@ export struct PlayUIComponent { | ||
| 37 | this.contentDetailData?.liveInfo?.liveState === 'wait') { | 38 | this.contentDetailData?.liveInfo?.liveState === 'wait') { |
| 38 | return | 39 | return |
| 39 | } | 40 | } |
| 40 | - let time: number = 0 | 41 | + clearTimeout(this.time) |
| 41 | if (this.isMenuVisible) { | 42 | if (this.isMenuVisible) { |
| 42 | - setTimeout(() => { | 43 | + this.time = setTimeout(() => { |
| 43 | if(this.ispause){ | 44 | if(this.ispause){ |
| 44 | return | 45 | return |
| 45 | } | 46 | } |
| 46 | this.isMenuVisible = false | 47 | this.isMenuVisible = false |
| 48 | + clearTimeout(this.time) | ||
| 47 | }, 5 * 1000) | 49 | }, 5 * 1000) |
| 48 | - } else { | ||
| 49 | - clearTimeout(time) | ||
| 50 | } | 50 | } |
| 51 | } | 51 | } |
| 52 | 52 |
-
Please register or login to post a comment