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

how to play sound in adilearning by command in terminal window? #186

Open
leechaowen opened this issue Sep 7, 2021 · 2 comments
Open

how to play sound in adilearning by command in terminal window? #186

leechaowen opened this issue Sep 7, 2021 · 2 comments

Comments

@leechaowen
Copy link

leechaowen commented Sep 7, 2021

how to play sound in adilearning by command ? i had installed the packages termux-api in python to call the termux.Media.play function , no help. and try to install mpv, no helpful too. but , it could helpful in termux . run command to play sound in termux by mpv or termux-api,it's helpful.

my phone is Readmi K40, android 11.

pip install termux-api
apt-get install mpv

@aidlearning
Copy link
Owner

you can using python code like this:
import android
droid=android.Android()
droid.mediaPlay('/sdcard/Download/1.mp3', 'beep', True)
(make sure the file 1.mp3 is in the sdcard... ^_^)

@aidlearning
Copy link
Owner

aidlearning commented Sep 26, 2021

using android module,Functions like mediaPlay, mediaPlayPause, mediaPlayClose, mediaPlaySeek,mediaPlayStart and mediaPlaySetLooping are used to control the media player.

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

2 participants