Example: Add new item - Advanced configuration

Demonstrates how to further configure the "Add item" tab. Introduces the "list" configuration block where list settings are managed.

Key features

  • Customisable button labels - rename "Playlist" tab, "Add item > New item", "Add item > New item > Preview item", "Add item > New item > Add as last" and "Add item > New item > Add as next" to whatever you like.
  • Customise the "New item" form - modify the field order, labels and default values
  • Override the default "Type" field behaviour - allow custom types
  • Add additional fields to the "New item" form



  <div id="player_wrapper">
    <div id="example"></div>

Setup code

    "plugins": {
          "label":"My playlist"
          "shuffle":{"enabled":true,"label":"Mix it up!"},
            "label":"Add item",
                "label":"New item",
                  "mediaid":{"label":"Media ID:","type":"hidden"},
                  "title":{"label":"Title:","value":"Example: JW Player promo"},
                  "description":{"label":"Description:","value":"Example: Your video solution starts with JW Player"},
                  "image":{"label":"Image URL:","value":"http://content.jwplatform.com/thumbs/HkauGhRi-640.jpg"},
                  "file":{"label":"File URL:","value":"http://content.jwplatform.com/videos/HkauGhRi-640.mp4"},
                      "custom_1":{"label":"Custom value 1","checked":true},
                      "custom_2":{"label":"Custom value 2","checked":false},
                      "custom_3":{"label":"Custom value 3","checked":true}
                  "next":{"enabled":true,"label":"Add as next"},
                  "last":{"enabled":true,"label":"Add as last"},
                  "preview":{"enabled":true,"label":"Preview item"},
                  "custom_button":{"enabled":true,"label":"Custom button","action":function(a,b){