I’ve been trying to play a simple audio file since one day but I couldn’t
2
You cannot play from a string. You can play from an AssetSource though:
string
AssetSource
oynitici.play(AssetSource('assets/clap1.wav'));
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.
Click here to cancel reply.
2
Answers
You cannot play from a
string
. You can play from anAssetSource
though:Try:
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.