=== Conf_Jitsi ===
Contributors: f4awz
Tags: jitsi, video conference, visio, webconf
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html


Display visible participants from a Jitsi conference room with optional connection and disconnection sounds.

== Description ==

Conf_Jitsi displays the visible participants of a Jitsi conference room using a shortcode. It can optionally play sounds when participants join or leave.

The plugin opens a background Jitsi connection to receive conference events and participant information. This monitoring connection is named "Le Portier" and is excluded from the displayed participant list.

Participant changes are handled primarily through Jitsi join and leave events, with periodic synchronization as a safety mechanism.

== Shortcode ==

Use the following shortcode:

`[Conf_Jitsi]`

To use a different room:

`[Conf_Jitsi room="another-room"]`

== Elementor ==

Add an Elementor Shortcode widget and enter:

`[Conf_Jitsi]`

== Settings ==

Settings are available under **Settings > Conf_Jitsi**.

You can configure:

* The default Jitsi room.
* The connection sound.
* The disconnection sound.
* Whether to display the Webconf. link.
* The synchronization interval.
* The Jitsi iframe dimensions.

== Connection Log ==

The active monitoring connection records detected participant connections and disconnections.

Each entry contains:

* The date and time using the WordPress site timezone.
* The event type.
* The participant display name.
* The conference room.

The log is available under **Settings > Conf_Jitsi > Log**. The latest 500 entries are retained, and administrators can clear the log.

The monitoring connection itself is not recorded in the log.

== Installation ==

1. Upload the plugin ZIP from **Plugins > Add New > Upload Plugin**.
2. Activate **Conf_Jitsi**.
3. Open **Settings > Conf_Jitsi** and configure the plugin.
4. Add `[Conf_Jitsi]` to a page, post, or Elementor Shortcode widget.

== Frequently Asked Questions ==

= Why does the plugin open a Jitsi connection? =

The background connection is required to receive Jitsi conference events and participant information.

= Why is "Le Portier" not displayed as a participant? =

The plugin identifies its own monitoring participant and excludes it from the displayed list.

= Can I use a different room for one shortcode? =

Yes. Use `[Conf_Jitsi room="another-room"]`.

== Changelog ==

= 1.3.10 =
* Restored the Jitsi container element in the shortcode markup (kept for compatibility with cached scripts).
* Diagnostic mode (?cj_debug=1) is now also rendered server-side, so it reports when the plugin JavaScript does not start (cache or script error) and shows plugin PHP/JS versions.
* Front-end assets renamed (conf-jitsi-front.js / .css) to bypass caches that ignore version query strings.

= 1.3.9 =
* Adaptive connection: the historical method is tried first; if the room is not joined within a few seconds (Chrome and Firefox on Android), the plugin automatically falls back to mobile-friendly methods (Jitsi "open in app" page disabled, transparent on-screen container, no microphone/camera access). The working method is remembered per browser.
* Automatic reconnection (timeout, lost connection, page back in foreground, network back online).
* Sounds are unlocked on the first user gesture to satisfy mobile autoplay policies.
* Added a diagnostic mode: append ?cj_debug=1 to the page URL to display the connection status.
* The main script now declares the Jitsi External API script as a dependency.

= 1.3.7 =
* Fixed the WordPress text domain and synchronized the plugin version across its resources.

= 1.3.6 =
* Fixed the WordPress text domain format (`conf-jitsi`).
* Synchronized the plugin version constant and plugin header to 1.3.6.

= 1.3.2 =
* Fixed input sanitization warnings for AJAX log events.
* Added an explicit version to the external Jitsi API script.
* Updated the WordPress.org readme metadata and English plugin description.
* Standardized the plugin package directory while keeping the existing PHP identifiers/options for backward compatibility.

= 1.3.1 =
* Fixed a JavaScript character issue that prevented the script from loading correctly.
* Improved participant tracking and the monitoring connection behavior.
