Player APIs (BrightScript & Ja...
...
Object Reference
Networking Objects

roPtp

5min
this object can be used to retrieve information about the network ptp state of the player the javascript equivalent is hostconfiguration docid\ p1dkloqhlm9wxsswmpeek object creation this object is created with no additional parameters ptp = createobject("roptp") ifuserdata setuserdata(user data as object) sets the user data that will be returned when events are raised getuserdata() as object returns the user data that has previously been set via setuserdata() it will return invalid if no data has been set ifmessageport setport(port as romessageport) posts messages of the type roptpevent to the attached message port ifptp getptpstatus() as roassociativearray returns an associative array containing information about the network ptp state of the player state a string indicating the current ptp state of the player values can be "master", "slave", or "uncalibrated" timestamp a value indicating when the ptp state was last changed this value is measured in seconds since the player booted this value can be compared against the total uptime of the player, which is retrieved by calling uptime(0)