DETECT IF THERE IS AN MP3 FILE RUNNING - Forum

Forum Navigation
You need to log in to create posts and topics.

DETECT IF THERE IS AN MP3 FILE RUNNING

I am interested to know if there is a way to detect if there is an mp3 playing.

Let me explain: I have songs of different lengths, and I am interested, that when a song has finished playing, if the user enters a specific page, it detects in its code that there is no song playing (since it has finished) and then executes a new song.

Thank you very much.

*****

Me interesa saber si hay alguna forma de detectar si hay un mp3 sonando.

Me explico: Tengo canciones de diferente duración, y me interesa, que cuando una canción haya terminado de sonar, si entra en un página concreta, esta detecta en su código que no hay canción sonando (ya que ha terminado) y entonces ejecuta una nueva canción.

Muchas gracias.

 

 

@lemachinga

What command are you using to play your mp4 file ?

Apart from the native commands within VisualNEOWin, there is also a plugin called NeoDX that will enable you to enquire about various attributes of a file asked to be played; for details, see ...

 

 

Te muestro parte de la funcion callback de NeoMediaPlayer.

Imagino que vas a encontrar los eventos que necesitas para realizar tus procesos

*************************************************************************************

:Refresh_Status
.------------- Player Status ------------------
if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "0"
. do any for Undefined status
Endif

ifex "[ae_MediaPlayer_PlayerStatusNumeric]=1 AND [FlagStopped]=0"
. do any for Stopped status
Setvar "[FlagStopped]" "1"
.unset the Callback function
AE_MediaPlayer_SetCBFunction ""
.alertbox "" "Stopped"
Endif

if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "2"
. do any for Paused status
Endif

if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "3"
. do any for Playing status
If "[TrackBar1]" "=" "1"
AE_MediaPlayer_GetInfo
SetVar "[PubTitle]" "[ae_MediaPlayer_Info_Artist]: [ae_MediaPlayer_Info_Title] - NeoMediaPlayer 1.0"
AE_MediaPlayer_GetMediaLength
TrackBarSetMax "TrackBar1" "[ae_MediaPlayer_FileDuration]"
endif
Endif

if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "6"
. do any for Buffering status
Endif

if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "7"
. do any for Waiting status
Endif

if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "8"
. do any for MediaEnded status
Endif

if "[ae_MediaPlayer_PlayerStatusNumeric]" "=" "11"
. do any for Reconnecting status
Endif

.------------- Open Status ------------------
if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "8"
. do any for Changing status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "9"
. do any for Locating status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "10"
. do any for Connecting status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "11"
. do any for Loading status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "12"
. do any for Opening status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "13"
. do any for Open status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "20"
. do any for Waiting status
Endif

if "[ae_MediaPlayer_OpenStatusNumeric]" "=" "21"
. do any for OpeningUnknownURL status
Endif

return

 

Como verás, este plugin permite intervenir cada uno de esos eventos.

Mi devaluado centavo,

Muchas gracias.