skip to Main Content

my error

I’ve been trying to play a simple audio file since one day but I couldn’t

2

Answers


  1. You cannot play from a string. You can play from an AssetSource though:

    oynitici.play(AssetSource('assets/clap1.wav'));
    
    Login or Signup to reply.
  2. Try:

    oynitici.setAssets("assets/clap1.wav");
    oynitici.play();
    

    we need to set music file as the asset first and then we would be able to play that music file. Questioner was skipping setting asset step.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search