--- title: "Player Simulator" slug: "player-simulator" updated: 2025-04-29T09:50:15Z published: 2025-04-29T09:50:15Z canonical: "support.dise.com/player-simulator" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.dise.com/llms.txt > Use this file to discover all available pages before exploring further. # Player Simulator This guide describes how to use the [Player Simulator](https://bitbucket.org/diseinc/playersimulator) to test and debug environment for Dise templates. The [Player Simulator](https://bitbucket.org/diseinc/playersimulator) is a light-weight implementation of the Dise Player API, suitable for running and debugging templates in a stand-alone environment, i.e. outside of the normal CMS/Player system. The dynamic data which would normally come from the CMS needs to be provided in local “mock” files. ### **Prerequisites** A suitable IDE is recommended: - Visual Studio Code. - Visual Studio. - any other IDE which supports TypeScript debugging. Debugging directly in a browser is possible, but not recommended if a proper IDE experience is available. ### Template Test File Structure Template repositories usually have this structure (with a single template, called “testTemplate” here): | Index.html | our launcher-file | | --- | --- | | PlayerSimulator/ | PlayerSim – an ES6-module in later versions of the framework | | TemplateFramework/ | a Git-link to TemplateFramework as a SubModule | | testTemplate/ | our template | | template.html | our template main-file for release | | debug.html | our template main-file with any development-changes | | … | any other files | | MockData/ | | | content.json | mock Playlist | | settings.json | template settings we would usually get from the CMS | | attributes.json | any initial attributes for testing | | … | any test-assets, like videos or images | The formats of the various files are described below. ### Settings.json The settings.json file is used to define settings which would normally be found in the [manifest file (template.json)](/docs/manifest) when the template is added to and used from the CMS. An example of a minimal settings.json: ```json { "settings": { "targetWidth": 1920, "targetHeight": 1080 } } ``` (defaults to allowReuse: true and scalePlayer: false) In most cases, a fallback-duration should be set, allowReuse, and scalePlayer: ```json { "id": "", "name": "Test Template", "settings": { "defaultDuration": 15, "targetWidth": 1920, "targetHeight": 1080, "allowReuse": false, "scalePlayer": true } } ``` ### Content.json The content.json file contains the mock playlist with content item(s) for testing the template. It is a simple JSON array with “any” objects: ```json [ { "text": "Hello world!", "someFile": { "url": https: //foo.bar.com/image.jpg } }, { "text": "Status update", "someFile": { "url": https: //foo.bar.com/status.png } } ] ``` When the template is used, this data will be provided by the CMS, in the same format. The template should check the format and data and handle any errors. ### Attributes.json The attributes.json file may contain any mock attributes (tags and triggers) to pass to the template as *metadata.attributes* for testing: ```json [ { "name": "static.MagicEnabled", "active": true }, { "name": "dyn.Observers", "active": true, "data": "[\"Zaphod Beeblebrox\"]" } ] ``` ### Index.html Launcher File The index.html file is the main entry point for running the template: ```plaintext