{"id":14162,"date":"2019-11-07T06:04:16","date_gmt":"2019-11-07T06:04:16","guid":{"rendered":"http:\/\/www.wjst.de\/blog\/?p=14162"},"modified":"2019-11-25T10:36:13","modified_gmt":"2019-11-25T10:36:13","slug":"remote-control-your-reveal-js-presentation","status":"publish","type":"post","link":"https:\/\/www.wjst.de\/blog\/sciencesurf\/2019\/11\/remote-control-your-reveal-js-presentation\/","title":{"rendered":"Remote control your reveal.js presentation"},"content":{"rendered":"<p>Add this somewhere at the end of your <em>presentation.php<\/em><\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction sync() {\r\n$.ajax({url: &quot;position&quot;, success: function(e){\r\n      Reveal.slide(e);\r\n    }\r\n  });\r\n}\r\nif (!window.location.search.match( \/master\/gi ) ) {\r\n\tsetInterval(sync,1000);\r\n    Reveal.configure({\r\n  \t\tkeyboard: {\r\n    \t13: null,\r\n    \t23: null,\r\n        32: null,\r\n        37: null,\r\n        38: null,\r\n        39: null,\r\n        40: null,\r\n        68: null\r\n  \t\t}\r\n\t});\r\n}\r\nReveal.addEventListener( 'slidechanged', function(e) {\r\n\t $.ajax({\r\n\t \turl: &quot;write.php&quot;,\r\n\t \ttype: &quot;get&quot;,\r\n\t \tdata: {&quot;k&quot;:e.indexh}\t \t\r\n    });\r\n});\r\n<\/pre>\n<p><em>write.php<\/em><\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$fp = fopen('position', 'w+');\r\n$k=$get&#x5B;&quot;k&quot;];\r\nfwrite($fp, $k);\r\nfclose($fp);\r\n<\/pre>\n<p><em>presentation.php?master<\/em> will control the presentation. A simple <em>presentation.php<\/em> even at a dozen locations will show it.<\/p>\n\n<p>&nbsp;<\/p>\n<div class=\"bottom-note\">\n  <span class=\"mod1\">CC-BY-NC Science Surf , accessed 04.04.2026<\/span>\n <\/div>","protected":false},"excerpt":{"rendered":"<p>Add this somewhere at the end of your presentation.php function sync() { $.ajax({url: &quot;position&quot;, success: function(e){ Reveal.slide(e); } }); } if (!window.location.search.match( \/master\/gi ) ) { setInterval(sync,1000); Reveal.configure({ keyboard: { 13: null, 23: null, 32: null, 37: null, 38: null, 39: null, 40: null, 68: null } }); } Reveal.addEventListener( &#8216;slidechanged&#8217;, function(e) { $.ajax({ url: &hellip; <a href=\"https:\/\/www.wjst.de\/blog\/sciencesurf\/2019\/11\/remote-control-your-reveal-js-presentation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Remote control your reveal.js presentation<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[3301],"class_list":["post-14162","post","type-post","status-publish","format-standard","hentry","category-computer-software","tag-reveal-js"],"_links":{"self":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/14162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/comments?post=14162"}],"version-history":[{"count":12,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/14162\/revisions"}],"predecessor-version":[{"id":14427,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/14162\/revisions\/14427"}],"wp:attachment":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/media?parent=14162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/categories?post=14162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/tags?post=14162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}