Skip to content
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

playback speed #7

Closed
rastaman111 opened this issue Apr 8, 2020 · 11 comments
Closed

playback speed #7

rastaman111 opened this issue Apr 8, 2020 · 11 comments
Labels
question Further information is requested

Comments

@rastaman111
Copy link

Hi

How can I change the playback speed of the player? x1, x1.5, x2

How can I start the player from a certain second?
Start player to 1min25sek

@yoheimuta
Copy link
Owner

@rastaman111

Thank you for reaching out.

How can I change the playback speed of the player? x1, x1.5, x2

While the library doesn't support it natively, you can get AVPlayer through the player property of the RxMusicPlayer. See the below example.

player.rx.playerIndex()
            .do(onNext: { index in
                player.player?.rate = 2
            })
            .drive()
            .disposed(by: disposeBag)

How can I start the player from a certain second?

I guess you can use the below steps in a row to implement it at the moment.

  1. Run a play command
  2. Wait for completing preparation by watching canSendCommand(seek command)
  3. Run a seek command

If this workaround still has a problem, let me know.
Plus, if it's a common use case, I'm willing to support a new command.

@yoheimuta yoheimuta added the question Further information is requested label Apr 9, 2020
@rastaman111
Copy link
Author

thanks for the answer, today I’ll definitely check it out. And another question, I found 2 bugs: 1) I have 2VC, 1 is the audio category, and 2 is the audio itself, following how I do it: I go into 1 group and turn on 1 song, statuses are written in the console (download and then ready) , after the end of the audio, I switch to category 2 and so turn on 1 song, listen to the end and after automatically switching to a new track, both the new track and the old one from category 1 are turned on, 2 times loading and 2 times ready are written in the console, it turns out 2 players

  1. this is when you rewind the progress bar to the max value then a glitch occurs and 2 audio are turned on

I hope you understand the essence of the problem :)

@rastaman111
Copy link
Author

please help, why 2 audio are turned on at the same time

@yoheimuta
Copy link
Owner

@rastaman111 Sorry for the late reply.

  1. I have 2VC, 1 is the audio category, and 2 is the audio itself, following how I do it: I go into 1 group and turn on 1 song, statuses are written in the console (download and then ready) , after the end of the audio, I switch to category 2 and so turn on 1 song, listen to the end and after automatically switching to a new track, both the new track and the old one from category 1 are turned on, 2 times loading and 2 times ready are written in the console, it turns out 2 players

Is this the first bug you have mentioned?

While I didn't understand accurately yet, RxMusicPlayer has no direct relation with VC. It's likely that the way to release VCs has something wrong.
For example, I have pointed out previously that a misstep disposing of RxMusicPlayer accounts for unintentional two players.

this is when you rewind the progress bar to the max value then a glitch occurs and 2 audio are turned on

And, this is the second bug, right?
The above comment format may be confusing me a bit.

@rastaman111
Copy link
Author

we can somehow contact, for example TeamViewer that would be mobile to resolve this issue?

I would quickly explain what the problem is

@yoheimuta
Copy link
Owner

@rastaman111 Although I understand what you mean, it seems a bit difficult to support the issue beyond the scope. In general, you can share more detailed hints, such as video and reproducible simple project/snippet that I can find out the cause.

Or, if you send me an email(see my profile) with your entire project and steps that produce the problem, I can look over it and may resolve it.

@rastaman111
Copy link
Author

Can’t I contact TeamViewer?

@rastaman111
Copy link
Author

I sent you an example code

@rastaman111
Copy link
Author

and 1 more question, if Music plays with me and I wanted to watch the video in the application, I send a command for the player to stop, and when the video ends and the video player closes, the audio starts automatically, why is that?

@yoheimuta
Copy link
Owner

@rastaman111 Thank you for your inconvenience.

I added a note about the "Bug Report."

Since I'm afraid I found out that it's not practical to pinpoint and reproduce the problem in my local through emails, I want you to prepare a concise reproducible project.

And if you have more problems, please create issues for each so that nothing is missed.

@rastaman111
Copy link
Author

@yoheimuta hello, you can close this question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants