Example: Add new item

Demonstrates how to enable the "Add item" tab which allows you to specify the parameters for a new playlist item, preview using "Preview item", and add the item to the current playlist using "Add as last" or "Add as next".

Key features

  • Customisable button label - rename "Add item" to whatever you like
  • "Type" field only offers media types which the rendered player / browser supports
  • "Preview item" allows you to check your settings are correct before adding to the playlist
  • When the previewed item finishes, the playlist resumes back at the previously interrupted item
  • Add a new item as either the next or last item in the playlist


CSS

HTML

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

Setup code

  jwplayer("example").setup({
    "playlist":[{...}],
    "width":"100%",
    "aspectratio":"16:9",
    "plugins": {
      "listy.js":{
        "features":{
          "shuffle":{"enabled":true,"label":"Mix it up!"},
          "search":{"enabled":true},
          "edit":{
            "enabled":true,
            "label":"Edit",
            "buttons":{
              "move_up":{"enabled":true},
              "remove":{"enabled":true,"label":"REMOVE"},
              "move_down":{"enabled":true}
            }
          },
          "add":{
            "enabled":true,
            "label":"Add item"
          }
        }
      }
    }
  });