Is there any way I can get the total duration of an ongoing session ?...besides of course making my own timer in flash.
Solved! Go to Solution.
Views
Replies
Total Likes
There is a method in AccountManager called getRoomInfo(room). If you call it when a room is running it will return a snipped of XML with a bunch of information.
In there there are a few "dateTime" fields:
- dateCreated : the date/time the room started
- dateStarted : the date/time the first user succesfully entered the room
- dateEnded : the date/time the last user exited the room
- dateExpired : the date/time the room is going to "stop"
If the room has already stopped (and all the resources got released) you'll get an error when you call the method.
If the room is still running you can get your "session" time by looking at the current time compared with dateStarted.
If I have a chance I'll make this method return a more usable "object" before next SDK drop, but for now this should get you started.
Views
Replies
Total Likes
There is a method in AccountManager called getRoomInfo(room). If you call it when a room is running it will return a snipped of XML with a bunch of information.
In there there are a few "dateTime" fields:
- dateCreated : the date/time the room started
- dateStarted : the date/time the first user succesfully entered the room
- dateEnded : the date/time the last user exited the room
- dateExpired : the date/time the room is going to "stop"
If the room has already stopped (and all the resources got released) you'll get an error when you call the method.
If the room is still running you can get your "session" time by looking at the current time compared with dateStarted.
If I have a chance I'll make this method return a more usable "object" before next SDK drop, but for now this should get you started.
Views
Replies
Total Likes
Great, thanks
Views
Replies
Total Likes
stop sending me mail
Views
Replies
Total Likes
stop sending me mail
Views
Replies
Total Likes