⚠️ This repository is not meant to be used for local development but serves as source for the code samples shown at bitmovin.com/demos.
Welcome to Bitmovin demos. Our demo page is hosted at bitmovin.com/demos.
If you wish to test a demo, you can either browse one of our demos hosted on our demo page or navigate to a demo inside one of our products, for example player/4k and follow these steps:
- Copy the
index.html
- Replace the
${code:setup.js}
(depending on the demo name may vary) with the contents, wrapping it with a<script>
tag - Open your custom webpage
In order to create a new demo, you need to create a new folder (with new demo name) in either the demos/analytics, demos/encoding or demos/player folder, depending on the category of the demo, with the following contents:
info.yaml
(required) - Demo configurationindex.html
(optional) - Entry point of the demoicon.svg
(optional) - The demo iconcss/
(optional) - Add custom.css
files withing this folderjs/
(optional) - Add custom.js
files within this folder
This section will explain what information in your YAML file will be processed and how to create your own Take an example xml like this one player/drm/info.xml
title: Hello World
executable:
executable: false
indexfile: index.html
The title is used to display the demo in the overview and is rendered in the detail view as a header
An optional short description which will be displayed in the overview. In the detail view this description will only be rendered if there is no <div class="description">
in the demo's index.html
file
A mandatory section defining the contents of the demo detail page
executable
:true
orfalse
Specifies if the files should be rendered in native html and contain code that will be replaced during compilationindexfile
: e.g.index.html
Sets the root file which is rendered as the content of the demo
An optional section giving information about the code snippets which will be displayed on the demo detail page.
show_code
:true
orfalse
Should code snippets be includedlanguage
: e.g.,js
,java
,c
The default language of the code snippets which will be used for the markup, supported languages can be found here: https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexersfiles
a list of files which should be included as code snippets (not actually executed, but displayed in raw text. JavaScript code to be executed must go intojs/
). These snippets will be displayed automatically at the end of the demo page, unless not specified elsewhere (see Template Patterns).
An optional list of tags which are used to filter the overview. Categories will be automatically added as tag.
If your demo should show up in more than one category in the overview you can add the additional categories here.
The original category (the folder the demo lies in) is always included automatically.
Possible values are analytics
, encoding
, and player
The optional configuration that affects sorting. Defaults to 0
.
Remove the link to the GitHub repository by setting this to true
. Defaults to false
.
Add a list of buttons, where each entry should have the following data:
name
A unique identifiertext
Display texturl
Go there on button clickname
An icon name
The following placeholders will be replaced in the demo's index.html
page:
To specify the location of code snippets (defined in code.files
of info.yaml
) to be displayed, use the following:
${code:myFile.css:css}
While the
:css
part may be omitted, it can be used to overwrite the default, set incode.language
ofinfo.yaml
.
If the demo template contains this element for the title, it will overwrite title
from info.yaml
Also description
of info.yaml
may be overwritten with a custom element.