|
Live_Broadcast
Live games broadcast"Always use the latest release of pgn4web; when using pgn4web for official events and for live broadcasts, read this first and don't hesitate contacting the pgn4web project for support!" By setting the SetLiveBroadcast(delay, alertFlag, demoFlag) option in the HTML file, pgn4web will periodically refresh the PGN file, showing the live progress of the games. PGN files produced by the DGT chessboards are supported. SetLiveBroadcast(delay, alertFlag, demoFlag, stepFlag) parameters:
The bash shell script live-grab.sh, executed on your server allows for grabbing updated game source from anywhere on the Internet to your server. The live broadcast stops refreshing once all games are ended. Clock information as provided by the DGT chessboards in PGN move comments, such as {[%clk 1:59:59]}, and in the PGN header, such as [WhiteClock "2:00:00"], [BlackClock "2:00:00"] and [Clock "W/1:59:59"] is displayed in the following sections: <div id="GameWhiteClock"></div> <div id="GameBlackClock"></div> The status of the live broadcast is displayed in the following sections: <div id="GameLiveStatus"></div> <div id="GameLiveLastRefreshed"></div> <div id="GameLiveLastReceived"></div> <div id="GameLiveLastModifiedServer"></div> Notes:
Clicking on the H6 square will force a games refresh. The file live-template.html shows a very basic example. A demo facility is available to test the live broadcast functionality. If the demo flag is set in SetLiveBroadcast(delay, alertFlag, demoFlag) and a set of full games is provided, the tool will simulate a slow progress of the game. Set the proper flag in live-template.html for an example. Please note, even during a demo, the PGN file is actually refreshed from the server for a more accurate testing. The easiest way to setup a live broadcast is to use the live-compact.html file. The HTML file accepts these parameters:
<iframe frameborder=0 width=480 height=360 src=live-compact.html?pgnData=myGames.pgn> </iframe> Please refrain from using a value for refreshMinutes shorter than 1 minute; a more frequent refresh does not serve any real purpose and shorter values can impact the performance of the live broadcast; values shorter than 1 minutes are allowed but intended only for demo purposes. Of course live-compact.html can be edited to customize colors, layout and every detail. The live-mosaic-viewer.html file has been designed in a similar way, while offering a layout with multiple live boards on the same page. http://pgn4web-live.casaschi.net will occasionally broadcast live major chess events. See below a demo simulation of the live broadcasting functionality. In this example the board is updated every 15 seconds and a random number of new moves (from 0 to 3) is added to each game at every update. While live-compact.html provides a very sophisticated user interface for live games broadcast, the board widget can be used as well for this purpose, as shown for example in this board widget live demo. Using the board widget the look and feel of the chessboard can be modified much easier than when using live-compact.html. Similary, the dynamic frame can also be used for live game broadcast, especially for fullscreen applications as shown for example in this live fullscreen demo. example: singe board
example: multiple boards | |