max_width = integer(default=180)
max_height = integer(default=180)
-[media_type:mediagoblin.media_types.video]
-# Should we keep the original file?
-keep_original = boolean(default=False)
-
-# 0 means autodetect, autodetect means number_of_CPUs - 1
-vp8_threads = integer(default=0)
-# Range: 0..10
-vp8_quality = integer(default=8)
-# Range: -0.1..1
-vorbis_quality = float(default=0.3)
-
-# Autoplay the video when page is loaded?
-auto_play = boolean(default=False)
-
-[[skip_transcode]]
-mime_types = string_list(default=list("video/webm"))
-container_formats = string_list(default=list("Matroska"))
-video_codecs = string_list(default=list("VP8 video"))
-audio_codecs = string_list(default=list("Vorbis"))
-dimensions_match = boolean(default=True)
-
[media_type:mediagoblin.media_types.audio]
keep_original = boolean(default=True)
# vorbisenc quality
--- /dev/null
+[plugin_spec]
+# Should we keep the original file?
+keep_original = boolean(default=False)
+
+# 0 means autodetect, autodetect means number_of_CPUs - 1
+vp8_threads = integer(default=0)
+# Range: 0..10
+vp8_quality = integer(default=8)
+# Range: -0.1..1
+vorbis_quality = float(default=0.3)
+
+# Autoplay the video when page is loaded?
+auto_play = boolean(default=False)
+
+[[skip_transcode]]
+mime_types = string_list(default=list("video/webm"))
+container_formats = string_list(default=list("Matroska"))
+video_codecs = string_list(default=list("VP8 video"))
+audio_codecs = string_list(default=list("Vorbis"))
+dimensions_match = boolean(default=True)
+
+
def common_setup(self):
self.video_config = mgg \
- .global_config['media_type:mediagoblin.media_types.video']
+ .global_config['plugins'][MEDIA_TYPE]
# Pull down and set up the processing file
self.process_filename = get_process_filename(
Returns True if the video matches the requirements in the configuration.
'''
- config = mgg.global_config['media_type:mediagoblin.media_types.video']\
+ config = mgg.global_config['plugins']['mediagoblin.media_types.video']\
['skip_transcode']
medium_config = mgg.global_config['media:medium']
{% set display_type, display_path = media.get_display_media() %}
<video controls
- {% if global_config['media_type:mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
+ {% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
preload="auto" class="video-js vjs-mg-skin"
data-setup='{"height": {{ media.media_data.height }},
"width": {{ media.media_data.width }} }'>