Ticket #1408 (closed feature: fixed)

Opened 22 months ago

Last modified 4 months ago

Allow changing default config options

Reported by: pablo Owned by: pablo
Priority: Normal Milestone: Player 6.2
Component: embedding Keywords:
Cc: Forum thread:

Description (last modified by pablo) (diff)

An easy way to change the default config (e.g. setting a skin by default, or setting the default dimensions to 320x180) will be great for users that want to setup the player style/behavior once and next only care about video/poster URLs.

A simple implementation would be to declare a jwplayer.defaults object and merge it into any jwplayer().setup() calls if it's defined. Declaring defaults would then look like this:

<head>
    <script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
    <script type="text/javascript">
        jwplayer.defaults = {
            width: 800,
            height: 400,
            skin: "stormtrooper",
            listbar: {
                size: 200,
                layout: "simple"
            }
        }
    </script>
</head>

<body>
    <div id="player"></div>
    <script type="text/javascript">
        jwplayer("player").setup({
            file: "video.mp4",
            listbar: {}
        });
    </script>
</body> 

Change History

comment:1 Changed 21 months ago by jeroen

This is quite a nice feature. It will also make our "Video Tag Embed" support guide more interesting.

It's basically nice for people that do progressive enhancement of video tags.

Last edited 21 months ago by jeroen (previous) (diff)

comment:2 Changed 21 months ago by jeroen

  • Priority set to Normal
  • Type changed from enhancement to feature

comment:3 Changed 21 months ago by jeroen

  • Owner set to pablo
  • Priority changed from Normal to Low

Set to low prio, b/c this is really a new feature.

comment:4 Changed 19 months ago by pablo

  • Milestone changed from Player 5.8 to Player 6.0

We should wait until HTML5 is the primary rendering mode to push the quick embed method

comment:5 Changed 10 months ago by jeroen

  • Description modified (diff)
  • Forum thread http://www.longtailvideo.com/support/forums/jw-player/player-development-and-customization/21157/changeother-default-settings deleted
  • Summary changed from Allow alternate player defaults for "quick embed" method to Allow changing default config options
  • Priority changed from Low to Normal
  • Milestone changed from Player 6.0 beta to Backlog
  • Type changed from feature to enhancement

comment:6 Changed 8 months ago by jeroen

  • Type changed from enhancement to feature

This is also useful around e.g. the player key. Some options are:

  • Insert in jwplayer.js, clearly marking the area
  • Insert as javascript object (e.g. right below player script tag)
  • Insert with a JSONP mechanism, loaded from server

comment:7 Changed 5 months ago by pablo

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Backlog to Player 6.2

Implemented in [3002]

comment:8 Changed 4 months ago by pablo

  • Description modified (diff)
Note: See TracTickets for help on using tickets.