{"id":55,"date":"2018-08-13T11:30:35","date_gmt":"2018-08-13T02:30:35","guid":{"rendered":"https:\/\/www.surfly.jp\/demoec\/?page_id=55"},"modified":"2022-07-19T14:16:06","modified_gmt":"2022-07-19T05:16:06","slug":"waitingroom","status":"publish","type":"page","link":"https:\/\/www.surfly.jp\/demo\/waitingroom\/","title":{"rendered":"\u30a4\u30f3\u30d0\u30a6\u30f3\u30c91"},"content":{"rendered":"<p><script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.9.1\/jquery.min.js\"><\/script><br \/>\n<script>\n    (function (s, u, r, f, l, y) {\n        s[f] = s[f] || { init: function () { s[f].q = arguments } };\n        l = u.createElement(r); y = u.getElementsByTagName(r)[0]; l.async = 1;\n        l.src = 'https:\/\/surfly.jp\/surfly.js'; y.parentNode.insertBefore(l, y);\n    })\n        (window, document, 'script', 'Surfly');\n    var settings = {\n        widgetkey: '9b09c56a3b26419791538291d8859821',\n        hide_until_agent_joins: true,\n        start_docked: true\n    };\n    window.addEventListener('DOMContentLoaded', function () {\n        document.getElementById(\"masthead\").classList.add(\"surfly-ignore\");\n        document.getElementById(\"main\").classList.add(\"surfly-ignore\");\n        document.getElementById(\"colophon\").classList.add(\"surfly-ignore\");\n        Surfly.init(settings, function (initResult) {\n            if (initResult.success) {\n                if (!Surfly.isInsideSession) {\n                    if (Surfly._allSessions.length > 0) {\n                        Surfly.listSessions().forEach(function (session) {\n                            session.end();\n                            location.reload();\n                        });\n                    };\n                    Surfly.session()\n                        .on('session_started', function (session) {\n                            \/\/ display the PIN of the current session\n                            document.getElementById(\"sessidtarget\").innerText = session.pin;\n                        })\n                        .on('viewer_joined', function (session, event) {\n                            \/\/ if a viewer joins and they are the first then redirect to a page of your choice\n                            if (event.count == 1) {\n                                session.relocate(\"https:\/\/www.surfly.jp\/\/demo\");\n                            }\n                        }).startLeader();\n                }\n            }\n        });\n    });\n    const getFillteringHistory = async() => {\n        await $.ajax({\n            url: \"https:\/\/surfly.jp\/v2\/history\/?api_key=7982d5dce19c4124abc5dfcdc74417a9&active_session=true\",\n            type: \"get\",\n            headers:{\n                \"Content-Type\": \"application\/json\",\n            },\n        }).then(\n            response => { let waiting =  response.results.filter(function(wait) {\n                              return wait.queued == true;\n                          });\n                          document.getElementById(\"waiting\").innerHTML = waiting.length;\n                        },\n            error => alert(\"Error:getFillteringHistory\")\n        )\n    };\n    setInterval(getFillteringHistory , 3000);\n<\/script><\/p>\n<div id=\"waitingroom\">\n<h1>Surfly\u30bb\u30c3\u30b7\u30e7\u30f3\u53d7\u4ed8\u30da\u30fc\u30b8<\/h1>\n<p>\u8868\u793a\u3055\u308c\u308b4\u6841\u306e\u304a\u5ba2\u69d8\u756a\u53f7\u3092\u30aa\u30da\u30ec\u30fc\u30bf\u30fc\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5ba2\u69d8\u756a\u53f7:<br \/>\n<span id=\"sessidtarget\" style=\"font-size: 20pt; color: red;\">&#8230;<\/span><\/p>\n<p>\u73fe\u5728\u304a\u5f85\u3061\u306e\u304a\u5ba2\u69d8\uff1a<span id=\"waiting\" style=\"font-size: 20pt; color: blue;\">&#8211;<\/span> \u540d<\/p>\n<\/div>\n<p>\u30fb\u30aa\u30da\u30ec\u30fc\u30bf\u30fc\u306e\u6307\u793a\u304c\u3042\u3063\u305f\u5834\u5408\u306e\u307f\u3054\u5229\u7528\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30fb\u672c\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u30d6\u30e9\u30a6\u30b6\u4e0a\u306e\u753b\u9762\u306e\u307f\u304c\u5171\u6709\u3055\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Surfly\u30bb\u30c3\u30b7\u30e7\u30f3\u53d7\u4ed8\u30da\u30fc\u30b8 \u8868\u793a\u3055\u308c\u308b4\u6841\u306e\u304a\u5ba2\u69d8\u756a\u53f7\u3092\u30aa\u30da\u30ec\u30fc\u30bf\u30fc\u306b\u9023\u7d61 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-55","page","type-page","status-publish"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/pages\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":2,"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/pages\/55\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/pages\/55\/revisions\/506"}],"wp:attachment":[{"href":"https:\/\/www.surfly.jp\/demo\/wp-json\/wp\/v2\/media?parent=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}