XWidgetSoft Forum
https://www.bbs.xwidget.com/

Detecting Player State
https://www.bbs.xwidget.com/viewtopic.php?f=8&t=2985
Page 1 of 1

Author:  digigamer [ April 24th, 2013, 12:01 am ]
Post subject:  Detecting Player State

Hi everyone,
How can I detect player state whether it is playing or the user has paused or whether it is stopped?

I'm currently using the isPlaying variable but that doesn't distinguish between paused or stopped?
Is there something like isStopped.

If not then plz tell, i'll go to activex controls.

Regards,
Digigamer

Author:  qiancang [ April 27th, 2013, 3:20 am ]
Post subject:  Re: Detecting Player State

maybe you can use the %playtime to judge the player is paused or stopped.
when the isPlaying variable is false, if playtime == 0, we can treat it as isStopped.

Author:  digigamer [ April 28th, 2013, 5:35 am ]
Post subject:  Re: Detecting Player State

qiancang wrote:
maybe you can use the %playtime to judge the player is paused or stopped.
when the isPlaying variable is false, if playtime == 0, we can treat it as isStopped.

Thanks a lot.
But i'm afraid, it's not that effective. Since I intended to depend on this to show an animation but everytime a track changed, it also triggered the condition.

But anyways, thanks a lot. It helped me to detect another state. If media player is running.
Code:
if (!%ISPlaying) && (%title == ' ')
{
// then we can assume media not is loaded and player is not running.
}

So, now showing on off state instead of running or not running! :D

Regards,
digigamer

Author:  kenneth112 [ April 29th, 2013, 2:19 pm ]
Post subject:  Re: Detecting Player State

you can use the %IsPlaying tag to control the image components' src
The two buttons of the picture's file name are true.png and false.png
format core data: %IsPlaying.png

Attachment:
playerpauseplay.XWidgetPkg [11.98 KiB]
Downloaded 207 times

Author:  digigamer [ April 30th, 2013, 9:10 pm ]
Post subject:  Re: Detecting Player State

kenneth112 wrote:
you can use the %IsPlaying tag to control the image components' src
The two buttons of the picture's file name are true.png and false.png
format core data: %IsPlaying.png

Attachment:
playerpauseplay.XWidgetPkg


Thanks, but that's not what I was trying to achieve. I've already implemented that. I wanted to know wheter the track was paused or stopped. And that cannot be done without WMP ActiveX.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/