"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!"
the pgn4web project
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, endlessFlag)
parameters:
If you set stepFlag, please note that the autoplay delay is set by SetAutoplayDelay(delay)
, where no more than 2000ms should be used for live broadcasts. In addition, it's recommended to disable shortcut keys and row 2 of shortcut squares in order to avoid users changing the delay value.
By default, polling for new moves stops once all games are finished; a game is deemed finished when the Result header tag is different from "*"); when endlessFlag is set, the polling for new moves continues endlessly.
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:
GameLiveStatus
will be shown as a string like 1 = 3
meaning one live game out of three games in total Clicking on the H6 square will force a games refresh.
Clicking on the A6/B6 squares will pause/restart the automatic 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, stepFlag, endlessFlag)
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.
Alternatively, for a more realistic simulation, the bash shell script live-simulation.sh
slowly updates the live.pgn
file, simulating a real event.
To setup a live broadcast please use any of the live*.html
files. The live*.html
files typically accept these parameters:
For instance, make sure that the file myGames.pgn
on your server is periodically refreshed with the live games, then add the following iframe to your page:
<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.
Each live*.html
file is customized to a different purpose and provides specific configuration parameters.
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.
Please note the size of the live broadcast demo page is optimized for small displays as with smartphones; for instance, it works nicely on my Blackberry 8900 with a 480x360 screen, but be careful with wireless data usage due to the constant refresh of the PGN games.
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
.
The live-mosaic.html
file offers a layout with multiple live boards on the same page.
The dynamic frame can also be used for live game broadcast, especially for fullscreen applications as shown for example in this live fullscreen demo.
Read a tutorial about replacing with a broadly supported technology a well known live chess broadcast client based on the adobe flash technology and therefore not supported by mobile devices such as android phones and tablets, the iphone and the ipad.
Wiki: BoardWidget_instructions
Wiki: BoardWidget_live
Wiki: DynamicFrame_LiveFullscreen
Wiki: DynamicFrame_summary
Wiki: Features_Limitations_Bugs
Wiki: HowTo
Wiki: Index
Wiki: ReadMeFirst_Deployment
Wiki: ServiceAvailability
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: pa...@casaschi.net
Hint: check the new engine analysis option added to the live mosaic page!
Click on square E8 to invoke the engine analysis popup window; read all the details at the blog.