compose-video icon indicating copy to clipboard operation
compose-video copied to clipboard

Set current seek position

Open jjfster opened this issue 1 year ago • 6 comments
trafficstars

I cannot seem to find a way to seek to a stored seek time/position when relaunching a video after playback and seek time is stored.

Can anyone assist?

jjfster avatar Jun 11 '24 22:06 jjfster

Not sure why this isn't working, or where else I am supposed to use seekTo:

` playerInstance = { // ExoPlayer instance (Experimental)

    //    this.setSeekParameters(CLOSEST_SYNC)
        this.seekTo(61000L)

) `

I'm also not sure if I need to add this somewhere, assuming it must be the default for this player instance since it scrubs inside the player:

// COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM,

I just need to get this working then I can be done. Is this project still maintained?

Please help.

jjfster avatar Jun 13 '24 15:06 jjfster

Hello @jjfster!

I think this issue is because of invoked seekTo method before playerItem is not prepared. I suggest register analyticsListener via addAnalyticsListener method (in playerInstance block), and override onLoadCompleted method.

In onLoadCompleted block, you can invoke seekTo method.

dsa28s avatar Jun 14 '24 05:06 dsa28s

Thanks for the feedback.

I ended up creating my own since I was in a time crunch.

jjfster avatar Jun 19 '24 18:06 jjfster

Hello sir,

Sorry to bother you again.

I just had a request for chromecast not long ago, and for my own player it is becoming a spaghetti mess.

I came back to your project, and I see on your github you support casting, but I see no way to achieve that.

btw: The oncomplete in the analyticslistener did fix the issue with getting seedtime (thank you!).

Also, how do we default to no subtitles when starting playback?

Do you have an API reference anywhere that can help. The sample code is a little lacking in these areas.

On Jun 14, 2024, at 1:37 AM, Sanghun Lee @.***> wrote:

Hello @jjfster https://github.com/jjfster!

I think this issue is because of invoked seekTo method before playerItem is not prepared. I suggest register analyticsListener via addAnalyticsListener method (in playerInstance block), and override onLoadCompleted method.

In onLoadCompleted block, you can invoke seekTo method.

— Reply to this email directly, view it on GitHub https://github.com/dsa28s/compose-video/issues/29#issuecomment-2167246351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMR76HSQNCR7BTX7IINPLZHJ6P7AVCNFSM6AAAAABJFGOHFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGI2DMMZVGE. You are receiving this because you were mentioned.

jjfster avatar Jun 29 '24 18:06 jjfster

So came back to this class and the analyticslistener did work. Thanks!

jjfster avatar Jun 29 '24 23:06 jjfster

Can you please help me with chromecasting and starting without subtitles?

On Jun 29, 2024, at 2:10 PM, j j @.***> wrote:

Hello sir,

Sorry to bother you again.

I just had a request for chromecast not long ago, and for my own player it is becoming a spaghetti mess.

I came back to your project, and I see on your github you support casting, but I see no way to achieve that.

btw: The oncomplete in the analyticslistener did fix the issue with getting seedtime (thank you!).

Also, how do we default to no subtitles when starting playback?

Do you have an API reference anywhere that can help. The sample code is a little lacking in these areas.

On Jun 14, 2024, at 1:37 AM, Sanghun Lee @.***> wrote:

Hello @jjfster https://github.com/jjfster!

I think this issue is because of invoked seekTo method before playerItem is not prepared. I suggest register analyticsListener via addAnalyticsListener method (in playerInstance block), and override onLoadCompleted method.

In onLoadCompleted block, you can invoke seekTo method.

— Reply to this email directly, view it on GitHub https://github.com/dsa28s/compose-video/issues/29#issuecomment-2167246351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMR76HSQNCR7BTX7IINPLZHJ6P7AVCNFSM6AAAAABJFGOHFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGI2DMMZVGE. You are receiving this because you were mentioned.

jjfster avatar Jul 01 '24 14:07 jjfster