Giter Site home page Giter Site logo

how to know progress for video?? about kohii HOT 5 CLOSED

eneim avatar eneim commented on May 22, 2024
how to know progress for video??

from kohii.

Comments (5)

eneim avatar eneim commented on May 22, 2024

@yongju-jin Do you mean the progress that is calculated by current position / video duration ?

Because Kohii is still in alpha, I cannot tell much, though I will eventually put a demo for that use case.

Right now, you can show the progress in the same way PlayerView shows the PlayerControlView where there is current position and video position, see here.

The concept will be: get current timeline information (position, duration), setup a Handler and execute it every second in a while to update your View that will show that information.

from kohii.

yongju-jin avatar yongju-jin commented on May 22, 2024

thanks for the reply.
and.. I have more question.

  1. how to volume control? (mute/unmute)
asPlayable = kohii?.setUp(videoUri)?.asPlayable()
asPlayable?.setVolumeInfo(
    kohii.media.VolumeInfo(              
     )
)

error occurred: Unresolved referenced: media

  1. can i play video from first when play is completed??
    i try
asPlayable?.playbackInfo?.resumePosition = TIME_UNSET
asPlayable?.play()

i know Kohii is alpha, but just wanna know Kohii supported
thanks,

from kohii.

eneim avatar eneim commented on May 22, 2024

@yongju-jin

About the Volume, this is a WIP in my local at the moment. The code base is significantly updated since this alpha actually. Managing volume is quite complicated. Considering Facebook: you mute one Video, all other Videos will be muted. In my latest strategy, I introduce the concept of "change Volume by Scope", which allows client to change volume of a Playback that will also change Volume of others depends on the scope (scope may be everything in the same RecyclerView, or just that one Playback).

The logic works well. But the challenge is to keep that change across config change, which I'm dealing with right now.

About the second question, you can set RepeatMode to the Player instance. I think this alpha doesn't have the method to set the RepeatMode from Playback instance or Playable instance, so you can access to the Player instance from PlayerView instance. My current source code has the method to set this from Playback instance and it will be there in production release.

from kohii.

yongju-jin avatar yongju-jin commented on May 22, 2024

thanks for the reply.
Thanks to Kohii, I finished my work.
thanks for your work.

from kohii.

eneim avatar eneim commented on May 22, 2024

@yongju-jin glad it helps

from kohii.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.