Skip to content

Commit

Permalink
Apply BufferListener of NuguOpusPlayer #2511
Browse files Browse the repository at this point in the history
  • Loading branch information
sangho.lee authored and shshshl09 committed Aug 20, 2024
1 parent cf51160 commit 50140a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.skt.nugu.sdk.agent.mediaplayer.MediaPlayerControlInterface
import com.skt.nugu.sdk.agent.mediaplayer.SourceId
import com.skt.nugu.sdk.core.interfaces.attachment.Attachment
import com.skt.nugu.sdk.core.utils.Logger
import com.skt.nugu.silvertray.player.BufferListener
import com.skt.nugu.silvertray.player.DurationListener
import com.skt.nugu.silvertray.player.EventListener
import com.skt.nugu.silvertray.player.Player
Expand Down Expand Up @@ -39,6 +40,15 @@ abstract class AbstractNuguOpusPlayer(protected val player: Player = Player()):
durationListener?.onRetrieved(currentSourceId, duration)
}
})
player.addBufferListener(object: BufferListener {
override fun onBufferRefilled() {
bufferEventListener?.onBufferRefilled(currentSourceId)
}

override fun onBufferUnderrun() {
bufferEventListener?.onBufferUnderrun(currentSourceId)
}
})
}

private fun handleStatusChanged(status: Status) {
Expand Down
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ext {
// SDK
keensenseVersion = "0.3.1"
jademarbleVersion = "0.2.7"
silvertrayVersion = "4.4.1"
silvertrayVersion = "4.5.0"

baseNuguVersionCode = 10712
baseNuguVersionName = "1.7.12"
Expand Down

0 comments on commit 50140a2

Please sign in to comment.