description | Interface for controlling PowerPoint slideshows through WebSocket |
last change | Sat, 6 Nov 2021 01:08:13 +0000 (12:08 +1100) |
An interface for controlling PowerPoint slideshows over the network using WebSocket. With the included HTTP frontend, this package can essentially replicate PowerPoint's presenter view on any computer on the local network, with very low processing latency for commands.
This was originally designed for controlling a PowerPoint slideshow from an instance of OBS (Open Broadcaster Software) running on the same computer (removing the need for an extra monitor to show presenter view).
This package includes three main components:
Due to the implementation's use of pywin32
for COM communication, this daemon only works on Windows (but the HTTP and WebSocket interfaces can be accessed from any device).
The server and the OBS script are written for Python 3.6, since at the time of writing, OBS only supports 3.6 for scripts. The source module for the built-in HTTP server from 3.9 is included in this project, since the 3.6 module does not allow for setting a custom server root (this feature was introduced in 3.7). If you are not using the OBS script (or if you don't mind dealing with multiple versions of Python on the same system), the daemon should work fine on 3.9 in theory, but this is not fully tested. When OBS eventually provides support for >=3.7, this package will be updated to use the native HTTP server module, and support for pre-3.7 will be dropped.
This package also requires pywin32, websockets and pystray (all three are required for the server, but only websockets
is required for the OBS script).
pip install ppt-control
will install all three components. You can then start the daemon by running
python -m ppt_control
from a command prompt (note the underscore). On first run, Windows Defender will show a warning and attempt to block Python from starting the server. You can safely allow the program through the firewall. You can now start a PowerPoint slideshow and navigate to the server by IP address/hostname (http://localhost
if on the same machine) and control the slideshow.
There are a few steps to set the package up fully:
There are several ways to start a Python program at login. Here is one method:
pythonw
executable in Explorer (usually in C:\Program Files\Python36
- run python -c "import sys, print(sys.executable)"
to check)pythonw.exe
and click "Create shortcut"-m ppt_control
(after the quotes, including an initial space). You can also change the name and icon of the shortcut if you like.%AppData%\Microsoft\Windows\Start Menu\Programs\Startup
). To quickly navigate to this folder, open an Explorer window and type startup
in the address bar.To view the HTTP interface from within OBS, you can add a "custom browser dock" (View -> Docks -> Custom Browser Docks). The location should be the hostname and port number of the daemon (http://localhost
by default). You can refresh the custom browser dock with Ctrl+R.
Keyboard shortcuts in OBS browser docks only work when the browser dock is focused by clicking in it (there is actually no indication of focus in the interface, but if you click away from the browser dock the shortcuts will not work). To resolve this, there is another Python script called ppt_control_obs.py
which can be added as a custom script in OBS. This script will listen for specific keys (configured in OBS's Hotkeys settings) and send commands to the daemon directly over WebSocket (no HTTP involved). To add the custom script, go to Tools -> Scripts, then click the + and choose the script. This will be located in the package directory which can be found with
pip show ppt-control
It is a good idea to turn off the keyboard shortcuts in the HTTP interface after loading the OBS hotkey script, otherwise commands will be sent to the daemon twice when the browser dock is focused.
Various settings can be changed in %AppData%\ppt-control\ppt-control.ini
. This file is populated with the defaults for all possible settings at installation.
presentation
instance__debug__
flag2021-11-06 | • | bump version | diff | tree |
2021-11-06 | • | add config file comments, minor JS refactoring | diff | tree |
2021-08-22 | • | update todos in readme | diff | tree |
2021-08-22 | • | multi-presentation support in JS client, etc. | diff | tree |
2021-08-15 | • | Major rewrite of main module | diff | tree |
2021-08-08 | • | replace notify_state timer with PPT async events | diff | tree |
2021-05-22 | • | bump version | diff | tree |
2021-05-22 | • | temporarily disable settings - unstable | diff | tree |
2021-05-22 | • | fix UI threading bugs | diff | tree |
2021-05-22 | • | change default log level in OBS script | diff | tree |
2021-05-22 | • | implement systray status | diff | tree |
2021-05-22 | • | clients attempt reconnection after socket close | diff | tree |
2021-05-22 | • | UI bugfixing | diff | tree |
2021-05-22 | • | add stop function to systray icon | diff | tree |
2021-05-22 | • | rewrite readme instructions for starting daemon at... | diff | tree |
2021-05-08 | • | bump version | diff | tree |
show all commits |
2 years ago | v0.0.4 | | commit | shortlog | log | ||
2 years ago | v0.0.3 | | commit | shortlog | log | ||
2 years ago | v0.0.2 | | commit | shortlog | log | ||
2 years ago | v0.0.1 | | commit | shortlog | log |
2 years ago | master | shortlog | log | tree |