Slideshow

To use the Slideshow, you can configure it via the web interface, the device interface, or the API. In the latter case, you must use the following endpoints.

Slideshow Settings

General Slideshow settings.

Parameters

  • slide_show_enabled (int): Enables/disables the slideshow. Values: “0” for disabled and “1” for enabled.
  • slide_show_interval (int): Display duration for each image (in milliseconds).

Request example

This request configures the Slideshow settings.

$.ajax({
    url: "/set_configuration.fcgi?session=" + session,
    type: 'POST', 
    contentType: 'application/json',
    data: JSON.stringify(
        {
            "video_player": {
                "slide_show_enabled": "1",
                "slide_show_interval": "5000"
            }
        }
    )
});

List Slideshow Images

To see which images have been uploaded and manage them, you can use the following command:

GET /get_slideshow_images_list.fcgi

Gets a list of images uploaded to the slideshow.

Parameters

  • This request has no parameters.

Response

  • images (array): An array of objects containing the filename of each image.
  • max_files (int): Indicates the maximum number of images.

Request example

$.ajax({
    url: "/get_slideshow_images_list.fcgi?session=" + session,
    type: 'GET'
});

Response example

{
    "images": ["myimage"],
    "max_files": 10 
}

Download a Slideshow Image

If the user wishes to obtain the images used in the slideshow, they can use the following command:

GET /get_slideshow_image.fcgi

Gets the file of the selected image.

Parameters

  • filename (string): File name.

Response

  • The image file.

Request example

$.ajax({
    url: "/get_slideshow_image.fcgi?filename=myimage&session=" + session,
    type: 'GET'
});

Upload Images to the Slideshow

If the user wishes, they can upload images to the Slideshow via the API. These images must be in JPEG/JPG format. To do so, use the following command:

POST /send_slideshow_images.fcgi

Uploads an image to the slideshow.

Parameters

  • filename (string): File name.
  • JPG/JPEG image to be uploaded to the device.

Response

  • success (boolean): Indicates the success of the operation.
  • filename (string): Submitted file name.

Request example

$.ajax({
    url: "/send_slideshow_images.fcgi?filename=image.jpeg&session=" + session,
    type: 'POST',
    contentType: 'application/octet-stream',
    processData: false,
    data: image
});

Response example

{
    "success": true,
    "filename": "image.jpeg"
}

Remove Images from the Slideshow

If the user wants to remove specific images from the slideshow, they can use the following command:

POST /delete_slideshow_image.fcgi

Deletes a slideshow image.

Parameters

  • filename (string): File name of the image to be deleted.

Response

  • success (boolean): Indicates the success of the operation.

Request example

$.ajax({
    url: "/delete_slideshow_image.fcgi?filename=image.jpeg&session=" + session,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({})
});

Response example

{
    "success": true
}

Remove All Images from the Slideshow

If the user wants to remove all images from the slideshow in a single operation, the following command can be used:

POST /remove_slideshow_images.fcgi

Deletes all slideshow images.

Parameters

  • This request has no parameters.

Response

  • success (boolean): Indicates the success of the operation.

Request example

$.ajax({
    url: "/remove_slideshow_images.fcgi?session=" + session,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({})
});

Response example

{
    "success": true
}