-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lacking documentation on how to change volume #164
Comments
FYI - I am setting up my bucket with And I notice this from the documentation: "NOTE: Multiple playbacks comes with a caveat. In Video playback, audio focus is an important aspect. The client needs to not only respect the audio focus given by system, but also to respect the audio focuses among a Video with the others in the same Application. Therefore, when the client enable MULTI_PLAYER Strategy, the library will forcefully mute the audio of all available Playbacks, regardless the number of Playbacks selected by the Selector. Changing to SINGLE_PLAYER or NO_PLAYER Strategy will switch everything back to normal." Does this imply that you can not have audio playing if using strategy MULTI_PLAYER? Because to me, this implies that by default all videos will be muted, but doesn't indicate that I can't override this default behaviour via calls to |
Hmmm, can confirm, if I set the strategy to This is... unfortunate, as the requirement for our feature is that we should allow multiple videos to play at once, but only one of the videos should be able to have it's audio active at any given moment. I.e. if there are 2 videos on screen, both start muted. User unmutes video 1, video 1 audio starts playing. User unmutes video 2, video 1 audio stops (ideally "automagically" via this library) and video 2 audio starts. Could you be open to implementing such functionality? Would you consider reviewing a PR if I was to figure out how to make this work and open one? (I'd like to know this before I actually attempt this). |
@pal-tcook Regarding volume control, you can take a look here: https://github.com/eneim/kohii/tree/dev-v1/kohii-sample/src/main/java/kohii/v1/sample/ui/echo This example demos how you can control the volume for each Playback individually, and store that info across config change. To control the volume of the whole screen, you can take a look at Facebook example:
I understand your concern about the lack document. I wish I have better time management to improve that. -- Regarding the volume control in multiple player mode, you are correct that all the videos will be muted once you use the multiple player mode. I understand that you may want to have more Videos to play, and only one of them has Volume available. The challenge is to design a mechanism to support that from the library point of view. I can think about how it can be done (maybe adding some flags so that the client can switch to gain the control, but then it is your responsibility to manage the audio/audio focus effectively). |
Hey @eneim - the lack of documentation (or rather, the lack of it being easily findable) on this specific feature is understandable given the complexity of the library and the fact it's a 1 man dev team, so don't take my comments as disparaging. I will be running this "issue" past our product owner/designers to see if they can live with not having audio for videos on the parts of the app where we need MULTI_PLAYER functionality. It'd be a shame if this is a concrete requirement on our end, because it will mean we probably can not move forward with using this library (which then leaves us with the problem of "how to properly manage ExoPlayer instances for our videos which appear in a recycler view"). |
@pal-tcook I see. Let me see how I can handle this. But it might be in a beta build so please consider the trade-off. Although it is understandable if you go with another solution, but I will try to give the user more choices. |
@pal-tcook Anyway, can you tell me ther version that you are using? It might be better to start investigating from there. |
Hey @eneim - sorry for the slow reply! I'm using version "1.2.0.2011008" |
Hello, I want to mute my video with kohii how can do ? . Please help me to doing it. Without any buttons. |
Sorry for the lack of document, and also a late reply. You can use
|
@eneim Used applyVolumsInfo but still not fixed.
|
Hello, I'm adding a mute/unmute button to custom controls.
I've added custom controls to my layout file, and have provided a controller implementation to the kohii.setup lambda.
I've hooked up click listeners on 2 custom controls at the moment; a play button (that calls playback.manager.pause/play respectively) and a mute button which should update the volume info of a given video for which the mute button was called on.
I've checked out the documentation here:
https://eneim.github.io/kohii/
And couldn't find any examples of how to set the volume on playbacks.
However, I can see there is an API for setting volume, via the
playback.manager.applyVolumeInfo
.Having read the documentation on this API, I'm a bit confused.
Say I want to unmute the video, I have been using this call:
playback.manager.applyVolumeInfo( VolumeInfo.DEFAULT_ACTIVE, playback, Scope.PLAYBACK )
Which, as far as I understand the source code, should be setting the volume on just this playback instance (because using Scope.Playback and passing playback as the target). However, the volume doesn't update to 1f (which I can see through debugging).
Could you provide information/documentation on how to do this?
p.s. I've also poked around in your sample apps, and couldn't find any usages of this part of the API either...
The text was updated successfully, but these errors were encountered: