API_LOGOUT
This JavaScript API is deprecated since version 1.55.
Users has been removed from the IceViewer HTML5 from version 1.55.
This function attempts to sign out from IceViewer HTML5.
| API function name: | api_logout() |
| Parameters: | |
| Return Type: |
Promise PromiseResult will be true, if the logout was successful, otherwise false. |
| Programmer notes: | |
| Code Example: | |
|
<div class="actions"> <div> <div id="login">Login (Guest)</div> <div id="logout">Logout</div> </div> <div> <iframe id="IceViewer" src="http://192.168.0.44:808/Default.cshtml"></iframe> </div> </div> <script> var iframeID = "IceViewer"; // IFRAME ID $("#login").click(function () { let success = document.getElementById(iframeID).contentWindow.api_login("Guest", "QwE"); // built-in user login console.log(success); // writing Promise to the console }); $("#logout").click(function () { let success = document.getElementById(iframeID).contentWindow.api_logout(); console.log(success); // writing Promise to the console }); </script> |
|
