• Mail
  • twitter
  • rss

 
Table of Contents

Configuration parameters

General

In general Projekktor differentiates three types of config parameters:

E.g: “loop” (which makes the player loop all scheduled items permanently) affects the player. On the other hand “title” or “poster” is of interest on item-level only.

As such all config parameters shown below can be set on instantiation as described here. Parameters set this way will be used for the player and - where applicable - as defaults for all items in schedule.

You should know: All this mess is to avoid breaking the time/space continuum and prevent strange effects regarding the player itself.

Config options to be set prior initialization only

cookieName (String:'qwprojaaekktor')

Sets the name of the cookie to store userspecific, permanent information and settings in.

cookieExpiry (Integer:356)

Days to keep the cookie alive.

plugins (Array:['display', 'controlbar'])

Plugins to load on instance initialization. Plugins are automatically extending the projekktorPluginInterface class. The order how the plugins are set here is important because they are added from z-index 0 to n one by one to the player DOM. As such it is useful to add the “Display” plugin always first.

addplugins (Array:[])

Adds one plugin or more plugins to the player. Alternative to “plugins” above. Will be merged with it.

reelParser (function:function(data){return data;})

Projekktor can read external playlists loaded via Ajax. Those playlists can either be “XML” or “JSON formatted and should follow the Projekktor playlist scheme.

Nevertheless it´s possible to read different formats, e.g. RSS feeds. The incoming data must be reformatted to a valid playlist then. This is where “reelParser” comes in handy. Once the Ajax request was successful “reelParser” is called and gets the raw input data as parameter. Inside you can hack your alchemy and return a valid Projekktor playlist.

Don´t trigger any further asynchronous operations here. This will break iDevice-support instantly.

cssClassPrefix (String:'pp')

Prefix added to all css-classnames used by the player in order to avoid conflicts with existing CSS.1

platforms (Array:['browser', 'ios', 'native', 'flash'])

A prioritized collection of enabled platforms.

Background:

There are several “player models” available for Projekktor. A model handles all the stuff to create the and interact with a given media object. E.g. the model “FlashVideo” does the Flash-Embed mess, assigns appropriate parameter to the SWF-movie and handles the Javascript interaction via Flash´s “External Interface”.

The fact that the model uses Flash is indicated by a property called “platform”. In this example, guess what, this property has the value “flash”.

There are other models using other platforms. One model handles “ios” specific mechanics. “native” models handle media using the browser´s native <video> and <audio> elements and “browser”-models handle the common stuff like images, iframes and html markup (in fact the “browser”-models are special ones but this is an other story to be told later).

So, WTF?

The default value ['browser', 'ios', 'native', 'flash'] tells the player that it can use four different platforms. BUT let´s say we have a <video>-capable browser featuring the H.264 codec and with Flash installed. In fact we now have two possible platforms to handle this: “native” and “flash”. In our default setup “native” has a lower “platforms”-array index than “flash” and the player will use the native-platform instead of flash. Hence per default “Flash” is configured to be the worst case.

Lets say you want to make the player ignore Flash completely even if the client has the plugin installed you can rewrite “platforms” to ['browser', 'ios', 'native'] and all is good.

iframe (Boolean:false)

If set “true”, Projekktor assumes to live within an iframe and will act accordingly (used for embedding).

loop (Boolean:false)

Enables / disables playlist loop.

autoplay (Boolean:false)

Enables / disables autoplay / autostart.

ignoreAttributes (Boolean:false)

If Projekktor is pumped into an <audio> or <video> container usually the element-attributes will overwrite given configuration parameters. Setting this to “false” will turn this behavior off. Affected config parameters are “autoplay”, “controls”, “width” and “height”.

continuous (Boolean:true)

Enables / disables conitnuous playback. If enabled the player - once started - will play each playlist item one by one automatically and return to IDLE mode once all playlist items are played back and “loop” is “false”.

In case “continuous” is “false” the player will play the actual media item. Once finished it increases the internal playlist-position-pointer and sets the player to IDLE which brings up the poster for the new playlist item. So, one more user interaction is required to start the new video.

playlist (Array:[])

An array of objects featuring the Projekktor playlist scheme to schedule one or more media items.

height (Integer:0)

The height of the player in pixels. In case of “0” the player will use the destination´s container height but at least “minHeight”.

width (Integer:0)

The width of the player in pixels. In case of “0” the player will use the destination´s container width but at least “widthHeight”.

minHeight (Integer:40)

The minimum height of the player.

minWidth (Integer:40)

The minimum width of the player.

messages (Object:{... see below... })

A set of messages shown in case of errors / on testcards.

  
  // flash & native:
  0:'An error occurred.',
  1:'You aborted the media playback. ',
  2:'A network error caused the media download to fail part-way. ',
  3:'The media playback was aborted due to a corruption problem. ',
  4:'The media (%{file}) could not be loaded because the server or network failed.',
  5:'Sorry, your browser does not support the media format of the requested file (%{type}).',
  6:'Your client is in lack of the Flash Plugin V%{flashver} or higher.',
  7:'No media scheduled.',
  8: '! Invalid media model configured !',
  9: 'File (%{file}) not found.',
  97:'No media scheduled.',
  98:'Invalid or malformed playlist data!',
  99:'Click display to proceed. ',
  100: 'Placeholder', 
  
  // youtube errors:
  500: 'This Youtube video has been removed or set to private',
  501: 'The Youtube user owning this video disabled embedding.',
  502: 'Invalid Youtube Video-Id specified.'

Config options available per playlist item

ID (String:'0')

A unique itemID used for internal identification and tracking purposes. Randomly generated in case non is provided.

title (String:'')

A title is a title is a title.

poster (String:'')

URL to a poster image - will be overwritten by poster-attribute in case Projekktor is pumped into a <media> tag.

cover (String:'')

URL to a cover image shown on audio playback only. If “cover” is empty “poster” will be used instead.

controls (Boolean:false)

Enables / disables the controlbar plugin GUI.

duration (Integer:0)

Sets the duration of the played media item. Currently works for “images” only.

start (Integer:0)

start offset in seconds for randomly seekable media. (EXPERIMENTAL)

stop (Integer:0)

Stop endpoint in seconds for randomly seekable media. (EXPERIMENTAL)

volume (Float:0.5)

Initial player volume while 0 is mute and 1 is full throttle.

disablePause (Boolean:false)

Enables / disables the possibility to pause a video during playback via the GUI. JS API calls are not affected.

disallowSkip (Boolean:false)

Enables / disables the possibility to skip or search/scrub a video during playback via the GUI. JS API calls are not affected.

fixedVolume (Boolean:false)

Enables / disables the possibility to alter the player volume via the GUI. JS API calls are not affected.

imageScaling (String:'aspectratio'), videoScaling (String:'aspectratio')

Possible values are “fill”, “aspectratio” or “none”.

Configures how the cover, poster or the video is scaled within the display area. “fill” stretches the source to fit the display but may deform the image / video. “aspectratio” may result in black (empty) areas but keeps the source´s aspect ratio and “none” will just center either the image or video without resizing it. This may cause black areas or a cropped image.

playerFlashMP4 (String:'jarisplayer.swf'), playerFlashMP3 (String:'jarisplayer.swf')

Sets the URL to the (default) flash fallback component.

streamType (String:'file')

Defines the streaming method. The offical Projekktor-distro currently supports:

  • file - progressive download streaming (http, default)
  • http - http pseudo streaming
  • rtmp - RTMP streaming - requires “flashRTMPServer” to be set.

streamServer (String:'')

Sometimes required in combination with “streamType”.

useYTIframeAPI (Boolean: false)

Youtube offers two different player APIs: fLaSh and “iFrame” for HTML5 . Make your choice here. For mobile devices this is forced to TRUE

enableFlashFallback (Boolean: true)

:!: subject for changes Enable / Disable Flash fallback. OBSOLETE

enableNativePlayback (Boolean: true)

:!: subject for changes Enable / Disable native media playback. OBSOLETE

enableNativePlatform, enableFlashPlatform (Boolean: true)

Enable / Disable different playback methods. The most common ones are “native” (for the <video> and <audio> tags) and Flash. Setting “enable<platformname>Platform” to false is equal to strip a platform from the ”platform” config array.

enableKeyboard (Boolean: true)

Enable / Disable keyboard interactions with the player.

enableFullscreen (Boolean: true)

Enable / Disable fullscreen / full viewport. If disabled all GUI interactions forcing “fullscreen” will be discarded. JS API calls are not affected.

enableNativeFullscreen (Boolean: true)

Enable / Disable true HTML fullscreen.

enableTestcard (Boolean: true)

If testcard is disabled and in case no native-media or flash is available the player will force a filedowload. Otherwise (enableTestcard=true) a testcard with an errormessage is shown in case of any playback issue.

skipTestcard (Boolean: false)

If the scheduled playlist holds more than one item and “skipTestcard” is set TRUE in case of an error the player will proceed to the next item without showing a testcard / errormessage.

className (String:'')

Sets an additional CSS class to the player. If configured on “item” level the class is being removed and the original classes are restored once the internal playlist pointer changes.

playbackQualities (Array:[ ... see below ... ])

Configures automatic quality selection in case videos are provided in different resolutions and qualities. The details of this mechanics and how to use it are described here.

{key: 'small', minHeight: 240, minWidth: 240},
{key: 'medium', minHeight: 360, minWidth: [{ratio: 1.77, minWidth: 640}, {ratio: 1.33, minWidth: 480}]},
{key: 'large', minHeight: 480, minWidth: [{ratio: 1.77, minWidth: 853}, {ratio: 1.33, minWidth: 640}]},
{key: 'hd1080', minHeight: 1080, minWidth: [{ratio: 1.77, minWidth: 1920}, {ratio: 1.33, minWidth: 1440}]},
{key: 'hd720', minHeight: 720, minWidth: [{ratio: 1.77, minWidth: 1280}, {ratio: 1.33, minWidth: 960}]},
{key: 'highres', minHeight: 1081, minWidth: 0}           

Configuring Plugins

xxxx

 
configuration.txt · Last modified: 2012/05/11 15:45 by operator