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

Unable to launch player from recyclerView #22

Open
ervinod opened this issue May 21, 2018 · 2 comments
Open

Unable to launch player from recyclerView #22

ervinod opened this issue May 21, 2018 · 2 comments

Comments

@ervinod
Copy link

ervinod commented May 21, 2018

I am launching AudioWife when user click on item, when i click on item nothing happens just recyclerview stops scrolling for a while.
I am doing like this in onBindViewHolder:
AudioWife.getInstance().init(context, Uri.parse(consersation.getListMessageData().get(position).text))
.useDefaultUi(mPlayerContainer, getLayoutInflater());
Please help me to resolve this issue.....

@emadbagheri96
Copy link

emadbagheri96 commented Jun 29, 2018

copy all the elements from ax_player.xml to your recycler view item's xml.
then find each of them by id like other elements in your ViewHolder.
then set each of them for the AudioWife in the onBindViewHolder() like this:

AudioWife audioWife = new AudioWife();
        myAudioWife.init(context, uri)
                .setPlayView(holder.mPlayerPlayBtn)
                .setPauseView(holder.mPlayerPauseBtn)
                .setSeekBar(holder.mPlayerSeekBar)
                .setTotalTimeView(holder.mTotalTimeTextView);

i had the same problem but this fixed it.

@afska
Copy link

afska commented Jul 5, 2019

Awesome! This is a nice library, it shouln't be broken as it is right now 🤔

After applying the patch of #11 and @emadbagheri96's solution, everything worked perfect

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

No branches or pull requests

3 participants