diff --git a/README.md b/README.md index 2fb91054e..1e30c18ac 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ Parse Dashboard is a standalone dashboard for managing your [Parse Server](https - [Pointer](#pointer) - [Link](#link) - [Image](#image) + - [Video](#video) - [Contributing](#contributing) # Getting Started @@ -1633,6 +1634,24 @@ Example: > [!Warning] > The URL will be directly invoked by the browser when trying to display the image. For security reasons, make sure you either control the full URL, including the image file name, or sanitize the URL before returning it to the dashboard. URLs containing `javascript:` or `` tag that includes playback controls. The content mode is always "scale to fit", meaning that the video maintains its aspect ratio within the specified dimensions. + +Example: + +```json +{ + "__type": "Video", + "url": "https://example.com/video.mp4", + "width": "320", + "height": "240" +} +``` + +> [!Warning] +> The URL will be directly invoked by the browser when trying to display the video. For security reasons, make sure you either control the full URL, including the video file name, or sanitize the URL before returning it to the dashboard. URLs containing `javascript:` or ` ); + } else if (type === 'Video') { + // Sanitize URL + let url = value.url; + if ( + !url || + url.match(/javascript/i) || + url.match(/