Package: kotti_media
This is an extension to the Kotti CMS that allows you to add audio and video to your Kotti site.Find out more about Kottikotti_mediausesMediaElementJSfor video and audio views and thus supports native HTML5 playback on all platforms that support this.
Each video can have multiple formats (MP4 (.h264 baseline profile), WebM, Ogg/Theora) to achieve this goal. For audio, supported formats include mp3 and wav.
For older PlatformsMediaElementJSincludes a Adobe Flash / MS Silverlight plugin fallback, so that every resopurce can be played on every platform if all supported formats are uploaded.CompatibilityFor Kotti >= 0.10 use the latest release ofkotti_media.For Kotti < 0.10 usekotti_video< 0.6.For Kotti < 0.7 usekotti_video< 0.2.SetupTo activate thekotti_mediaadd-on in your Kotti site, you need to add an entry to thekotti.configuratorssetting in your Paste Deploy config.
If you don’t have akotti.configuratorsoption, add one.
The line in your[app:main]section could then look like this:kotti.configurators = kotti_media.kotti_configureWith this, you’ll be able to add video and audio items in your site.
Video and Audio content types are containers, into which you add specific media file types.In your settings file, setkotti_media.asset_overridesto a list of asset specifications.
This allows you to set up a directory in your package that will mirror kotti_media’s own and that allows you to override kotti_media’s templates on a case by case basis.You can also setkotti_media.use_fanstaticto afalse value(false,0,no, and so on) to disable theneed()call.
This is especially useful if your application is built with modern frontend development tools like Grunt, Gulp and Bower and you manage your Javascript dependencies with them.
This setting is not needed if you completely disable Fanstatic for your application.UsageA standard way to use kotti_media is to first create a Document in your content tree; this document will become the media section of your application. Then you can add childs to your media section by appending audio/video content to it.kotti_mediacomes with a handymedia_folder_viewthat can be used to display your ‘media section’ Document (that is to display every media attached to it).Registration is done like this:fromkotti.resourcesimportDocumentfromkotti.utilimport_defincludeme(config):Document.type_info.add_selectable_default_view("media_folder_view",_("Media Folder"))You will then be able to select that view for your media section Document in the user interface.Work in progresskotti_mediais considered alpha software, not yet suitable for use in production environments.
The current state of the project is in no way feature complete nor API stable.
If you really want to use it in your project(s), make sure to pin the exact version in your requirements.
Not doing so will likely break your project when future releases become available.DevelopmentContributions tokotti_mediaare highly welcome.
Just clone itsGithub repositoryand submit your contributions as pull requests.Testingkotti_mediaaims for complete test coverage.
Please make sure that you add tests for new features and that all tests pass before submitting pull requests.
Running the test suite is as easy as runningpy.testfrom the source directory (you might need to runpython setup.py devto have all the test requirements installed in your virtualenv).TODOadd i18nadd/verify support for subtitles and chapter marksAUTHORSkotti_mediawas created by Andreas Kaiser (disko).Initial audio support has been contibuted by Jeff Pittman (geojeff).CHANGES0.6 - 2014-11-11Migrate to Bootstrap 3.
This requiresKotti>=0.10b1and is abackward incompatible change if you have customized any template!Remove the size settings from the player options.
They didn’t work at all.
Players scale to their containers now.Add a populator for development.Add a setting to disable calls Fanstatic’s need methods.
See README for the rationale.0.5.2 - 2014-11-10Enable overriding of assets using kotti_media.asset_overrides
configuration variable.  [cazino]0.5.1 - 2013-07-12Don’t check for data if unnecessary as it causes full loading of that
column which is particular bad with media files.  This is a huge
performance boost on related views.0.5 - 2013-04-25Upgrade to Kotti>=0.8.  This breaks backward compatibility.  Pin
kotti_media to “<0.5dev” if you are on Kotti 0.7.x.Use Kotti’s pytest plugin.0.4Make player options user configurable.0.3.2Bugfix: respect permissions when iterating over children in
media_folder_view0.3.1Fix documentation.0.3Rename package to kotti_media (was: kotti_video).Add tests (100% coverage from now on).Add audio support.Add external URL support for CDN storage / delivery of file data.Addmedia_folder_viewfor contextkotti.resources.Document.0.2Release for Kotti >= 0.7dev.0.1Initial release.