# Live

A Live widget allows you to integrate a specific live stream into your product or website to deliver contextual education.

## Create a widget

To create a Live widget, click on the `New` button in the top right-hand corner, then on `Live`. A side panel for creating a new widget opens:

* Choose the rendering mode for your widget:
  * `Embed`: the widget is in the form of an embed, so you can integrate it anywhere on your site or application.
  * `Modal`: the widget is in a window that opens when a button is clicked.
  * `Drawer`: the widget is in a side panel that opens when a button is clicked.
* Enter a `title`. :bulb:  This title will not be visible in the widget integrated into your application.
* Select a live event using the search bar.
* Click on `Create`: your widget is now ready for integration! :point\_right:  [Find out more here](https://help.meltingspot.io/english/manage-spot/widget/implementation).

## Edit a widget

You can edit a widget in two different ways:

* From the widget list, by clicking on the three small dots to the right of a widget's card, then on `Edit`.
* From the Widget Preview window, by clicking on the `Edit` button.

### General tab

Into the edit drawer, from the `General` tab, you can modify:

* The **type of widget rendering**. <mark style="color:red;">Please note</mark> that changing the widget type means updating the code.
* Widget **title**.
* The **selected live**: to do this, simply click on the X button at the top right of the selected live and use the search bar to find the live of your choice.

Once you've made all your changes, click on the `Save` button.

### Statistics tab

From the `Statistics` tab, you can access your widget's usage data:

* A first box (`Widget data`) gives you usage figures relating to the widget as a whole:
  * `Views`: the number of times the widget has been viewed
  * `Last update` : the date the widget was last modified
* In the second box (`Live data`), you'll find data on the live in general:
  * `Registered`: the number of members registered for this live
  * `Attendees`: the number of members who took part in the live
  * `Average view time`: the average viewing time of the live over its effective duration.
  * `Last update`: the date on which the live was last modified

An `Open Live` button lets you access the live in the Spot.

## Widget preview

The widget preview depends on the widget's rendering type:

* If it's an `Embed` or `Modale` widget: When you click on the widget's card, a window opens. In this window, you can see a preview of how the widget will render in your application or site (in the case of an embed, gray areas show the content of your site).
* If it's a `Drawer` widget: when you click on a widget's card, a side panel opens. Here you can see a preview of how the widget will look in your application or site.

In the bottom area of the modal, there are several buttons:

* `Get code`: gives you the choice between sending the widget code directly by e-mail (with the `Send code` button) or retrieving and copying the widget code (with the `Copy code` button)
* `Edit`: opens the side panel for editing.

## Display widget

In your site or application, many members will be able to access your widget. Don't worry, they'll only be able to see the live event if they have access to it:

* If the member is logged in and has access to the live event, he or she will be able to:
  * see the live event and watch it or the replay.
  * access the `Info`, `Participants` and `Discussions` tabs and view their content (depending on the live event settings).
* If the member is not logged in and does not have access to the live stream, he/she will only see the live stream's cover image and will not have access to its content.

{% hint style="success" %}
If the member attends the live or sends a message into the chat from a widget, the corresponding activities will be taken into account, and you'll be able to find them in the `Dashboard` page of your Spot settings.
{% endhint %}

**To ensure that the user sees the widget content while logged in, we recommend that you set up SSO authentication in the widget integration space.**

{% content-ref url="../sso" %}
[sso](https://help.meltingspot.io/english/manage-spot/sso)
{% endcontent-ref %}

{% hint style="info" %}
Once SSO has been configured, the JWT token authenticating the user can be transmitted directly in the widget script. Find out more [here](https://help.meltingspot.io/english/sso#embed-widgets--sso).
{% endhint %}

## Delete a widget

To delete a widget, you have 2 options:

* From a widget's card, click on the three small dots to the right and then on `Delete`.
* From a widget's side edit panel, by clicking on the three small dots at the top right, then on `Delete`.

Clicking on either of these buttons opens a confirmation window.

{% hint style="danger" %}
Please note that all deletions are final!
{% endhint %}

{% hint style="info" %}
If you delete a widget in your Spot settings, we recommend that you also delete it in the code of your application or site - don't worry if you forget, your members will only see an empty insert 😉
{% endhint %}
