XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 1:41 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Detecting Player State
PostPosted: April 24th, 2013, 12:01 am 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
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

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: April 27th, 2013, 3:20 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
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.


Top
 Profile  
 
PostPosted: April 28th, 2013, 5:35 am 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
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

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: April 29th, 2013, 2:19 pm 
Offline
User avatar

Joined: June 10th, 2012, 6:06 am
Posts: 17
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

_________________
facebook:http://www.facebook.com/ZhaoKenneth
weibo:http://weibo.com/102030456
twitter:http://twitter.com/colawings
DeviantArt:http://kenneth117.deviantart.com/


Top
 Profile  
 
PostPosted: April 30th, 2013, 9:10 pm 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
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.

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 53 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group