这是indexloc提供的服务,不要输入任何密码
Skip to content

Is ScrubbingMode possible with ImageOuptut? #2815

@StaehliJ

Description

@StaehliJ

I tried to use ExoPlayer.setScrubbingModelEnabled with an ImageOutput and a stream with tiled thumbnail
inside the stream and when scrubbing with the slider, only the thumbnail of the position when scrubbing occurs is displayed and never updated after.

Is it intended to work only with video tracks ?

My compose slider view with the logics, in my real codes I only set the ImageOutput when the streams has an image track.

Slider(
    value = sliderValue,
    onValueChange = {
        if (!isScrubbing) {
                player.trackSelectionParameters = player.trackSelectionParameters.buildUpon()
                        .setPrioritizeImageOverVideoEnabled(true)
                        .build()
                player.setImageOutput(imageOutput)
                    player.isScrubbingModeEnabled = true
        }
        sliderValue = it
        player.seekTo((it * duration).toLong())
            },
    onValueChangeFinished = {
        isScrubbing = false
        player.setImageOutput(null)
        player.isScrubbingModeEnabled = false
        player.trackSelectionParameters = player.trackSelectionParameters.buildUpon()
                .setPrioritizeImageOverVideoEnabled(false)
                .build()
            }
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions