==================
Projekktor Utility
==================

This utility provides the IProjekktorUtility interface

  >>> from collective.projekktor.interfaces import IProjekktorUtility

  >>> from collective.projekktor.interfaces import IProjekktorAudioConfig, IProjekktorVideoConfig

Let's start by logging in as a manager.

  >>> self.setRoles(['Manager'])

And get some tools

  >>> from zope.component import getUtility
  >>> from zope.browser.interfaces import IBrowserView 
  >>> from zope.publisher.browser import TestRequest

The Projekktor utility is used to store site-wide settings and defaults for projekktor.

  >>> utility = getUtility(IProjekktorUtility)
  >>> utility
  <ProjekktorUtility at /plone/portal_projekktor>

And test the provided interfaces

  >>> IProjekktorAudioConfig.providedBy(utility)
  True
  >>> IProjekktorVideoConfig.providedBy(utility)
  True

Get the the video mimetypes
    
  >>> utility.video_mimetypes
  [u'video/ogg', u'video/mpeg', u'video/mp4', u'video/m4v', u'video/flv', u'video/x-flv', u'video/quicktime']

Get the other video variables

  >>> utility.video_width
  u'480px'
  >>> utility.video_height
  u'270px'
  >>> utility.video_poster
  u'/media-video.png'

Get the the audio mimetypes
    
  >>> utility.audio_mimetypes
  [u'application/ogg', u'audio/ogg', u'audio/mpeg', u'audio/mp3', u'audio/x-mp3']

Get the other audio variables

  >>> utility.audio_width
  u'480px'
  >>> utility.audio_height
  u'270px'
  >>> utility.audio_poster
  u'/media-audio.png'


    
    


    


