--- a/buildout.cfg Mon Sep 11 13:46:31 2017 +0200
+++ b/buildout.cfg Mon Sep 11 15:33:50 2017 +0200
@@ -20,7 +20,10 @@
src = src
develop =
.
+ ../pyams_catalog
../pyams_file
+ ../pyams_form
+ ../pyams_i18n
../pyams_pagelet
../pyams_skin
../pyams_template
@@ -71,4 +74,4 @@
eggs = pyams_media [test]
[versions]
-pyams_media = 0.1.5
+pyams_media = 0.1.6
--- a/docs/HISTORY.txt Mon Sep 11 13:46:31 2017 +0200
+++ b/docs/HISTORY.txt Mon Sep 11 15:33:50 2017 +0200
@@ -1,6 +1,12 @@
History
=======
+0.1.6
+-----
+ - force audio channels to 2 in every converter
+ - added check on content-type when adding conversion
+ - added action to restart medias conversions
+
0.1.5
-----
- changed vocabularies declarations
--- a/setup.py Mon Sep 11 13:46:31 2017 +0200
+++ b/setup.py Mon Sep 11 15:33:50 2017 +0200
@@ -22,7 +22,7 @@
README = os.path.join(DOCS, 'README.txt')
HISTORY = os.path.join(DOCS, 'HISTORY.txt')
-version = '0.1.5'
+version = '0.1.6'
long_description = open(README).read() + '\n\n' + open(HISTORY).read()
tests_require = []
Binary file src/pyams_media/locales/fr/LC_MESSAGES/pyams_media.mo has changed
--- a/src/pyams_media/locales/fr/LC_MESSAGES/pyams_media.po Mon Sep 11 13:46:31 2017 +0200
+++ b/src/pyams_media/locales/fr/LC_MESSAGES/pyams_media.po Mon Sep 11 15:33:50 2017 +0200
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2015-12-02 17:33+0100\n"
+"POT-Creation-Date: 2017-09-07 15:49+0200\n"
"PO-Revision-Date: 2015-08-28 13:59+0200\n"
"Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
"Language-Team: French\n"
@@ -16,47 +16,76 @@
"Generated-By: Lingua 3.8\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: src/pyams_media/converter.py:103
+#: src/pyams_media/converter.py:105
msgid "WAV audio converter"
msgstr "Conversion audio WAV"
-#: src/pyams_media/converter.py:111
+#: src/pyams_media/converter.py:113
msgid "MP3 audio converter"
msgstr "Conversion audio MP3"
-#: src/pyams_media/converter.py:119
+#: src/pyams_media/converter.py:121
msgid "OGG audio converter"
msgstr "Conversion audio OGG"
-#: src/pyams_media/converter.py:180
+#: src/pyams_media/converter.py:181
msgid "FLV (Flash Video) video converter"
msgstr "Conversion vidéo FLV (Flash)"
-#: src/pyams_media/converter.py:196
+#: src/pyams_media/converter.py:197
msgid "MP4 (HTML5) video converter"
msgstr "Conversion vidéo MP4 (HTML5)"
-#: src/pyams_media/converter.py:216
+#: src/pyams_media/converter.py:217
msgid "OGG video converter"
msgstr "Conversion vidéo OGG"
-#: src/pyams_media/converter.py:224
+#: src/pyams_media/converter.py:225
msgid "WebM video converter"
msgstr "Conversion vidéo WebM"
-#: src/pyams_media/zmi/media.py:49
-msgid "Video conversions..."
-msgstr "Conversions vidéos..."
+#: src/pyams_media/zmi/media.py:52
+msgid "Cancel"
+msgstr "Fermer"
+
+#: src/pyams_media/zmi/media.py:53
+msgid "Restart missing conversions"
+msgstr "Relancer les conversions"
#: src/pyams_media/zmi/media.py:60
+msgid ""
+"Several formats are required to handle different browsers and screen "
+"resolutions.\n"
+" \n"
+"Conversion process may require some time based on media format and duration; "
+"this dashboard gives\n"
+"you indications about required conversions."
+msgstr ""
+"Différents formats sont nécessaires pour assurer une prise en charge correcte des "
+"différents navigateurs et des différents supports (smarphone, tablette...).\n"
+"\n"
+"Le processus de conversion nécessite un temps de traitement variable en fonction du "
+"poids et du format du média d'origine.\n"
+"\n"
+"Ce tableau de bord vous indique l'état d'avancement des différentes conversions."
+
+#: src/pyams_media/zmi/media.py:76
+msgid "Video conversions..."
+msgstr "Conversions vidéos"
+
+#: src/pyams_media/zmi/media.py:88
msgid "Selected video conversions"
msgstr "Conversions vidéo du média"
-#: src/pyams_media/zmi/media.py:118
+#: src/pyams_media/zmi/media.py:122 src/pyams_media/zmi/media.py:219
+msgid "Media conversions restarted!"
+msgstr "Les conversions du média ont été relancées."
+
+#: src/pyams_media/zmi/media.py:173
msgid "Audio conversions..."
-msgstr "Conversions audio..."
+msgstr "Conversions audio"
-#: src/pyams_media/zmi/media.py:129
+#: src/pyams_media/zmi/media.py:185
msgid "Selected audio conversions"
msgstr "Conversions audio du média"
@@ -68,35 +97,51 @@
msgid "Video conversion"
msgstr "Conversion vidéo"
-#: src/pyams_media/zmi/__init__.py:87
+#: src/pyams_media/zmi/__init__.py:88
msgid "Audio conversion"
msgstr "Conversion audio"
-#: src/pyams_media/zmi/__init__.py:107
+#: src/pyams_media/zmi/__init__.py:108
msgid "Test process connection..."
msgstr "Tester la connexion..."
-#: src/pyams_media/zmi/__init__.py:130
+#: src/pyams_media/zmi/__init__.py:118 src/pyams_media/zmi/video.py:65
+msgid "Close"
+msgstr "Fermer"
+
+#: src/pyams_media/zmi/__init__.py:119
+msgid "Test connection"
+msgstr "Tester la connexion"
+
+#: src/pyams_media/zmi/__init__.py:131
msgid "Test medias converter process connection"
msgstr "Tester la connexion au processus de conversion"
-#: src/pyams_media/zmi/__init__.py:117 src/pyams_media/zmi/video.py:71
-msgid "Close"
-msgstr "Fermer"
+#: src/pyams_media/zmi/video.py:55
+msgid "Select thumbnail..."
+msgstr "Sélectionner l'illustration"
-#: src/pyams_media/zmi/__init__.py:118
-msgid "Test connection"
-msgstr "Tester la connexion"
+#: src/pyams_media/zmi/video.py:66
+msgid "Select thumbnail"
+msgstr "Sélectionner cette illustration"
-#: src/pyams_media/zmi/video.py:61
-msgid "Select thumbnail..."
-msgstr "Sélectionner l'illustration..."
+#: src/pyams_media/zmi/video.py:72
+msgid "Thumbnail timestamp"
+msgstr "Position de l'illustration"
-#: src/pyams_media/zmi/video.py:87
+#: src/pyams_media/zmi/video.py:81
msgid "Select video thumbnail"
msgstr "Sélection de l'illustration"
-#: src/pyams_media/zmi/video.py:144
+#: src/pyams_media/zmi/video.py:121
+msgid "Thumbnail selected successfully."
+msgstr "L'illustration a été générée avec succès."
+
+#: src/pyams_media/zmi/video.py:124
+msgid "An error occurred. No created thumbnail."
+msgstr "Une erreur est intervenue. L'illustration n'a pas pu être générée."
+
+#: src/pyams_media/zmi/video.py:138
msgid ""
"You can play the video until you display the image you want.\n"
"\n"
@@ -104,26 +149,13 @@
"selected frame will be used as\n"
"video illustration."
msgstr ""
-"Pour sélectionner l'illustration de cette vidéo, lancez sa lecture et au "
-"moment souhaité, mettez-la en pause.\n"
-"Le bouton ''Sélectionner cette illustration'' permet alors de générer "
-"l'image qui sera utilisée comme illustration."
-
-#: src/pyams_media/zmi/video.py:72
-msgid "Select thumbnail"
-msgstr "Sélectionner cette illustration"
-
-#: src/pyams_media/zmi/video.py:78
-msgid "Thumbnail timestamp"
-msgstr "Position de l'illustration"
-
-#: src/pyams_media/zmi/video.py:127
-msgid "Thumbnail selected successfully."
-msgstr "L'illustration a été générée avec succès."
-
-#: src/pyams_media/zmi/video.py:130
-msgid "An error occurred. No created thumbnail."
-msgstr "Une erreur est intervenue. L'illustration n'a pas pu être générée."
+"Cette image est celle présentée au lancement de la vidéo.\n"
+"\n"
+"Une image est sélectionnée par défaut : elle est capturée à la 5e seconde.\n"
+"\n"
+"S'il est opportun de capturer une autre image, lancez la lecture, mettez-la "
+"en pause au moment souhaité et cliquez sur \"Sélectionner cette illustration"
+"\". Vous pouvez modifier votre choix autant que nécessaire."
#: src/pyams_media/zmi/templates/audio-conversions.pt:5
msgid "Status"
@@ -145,83 +177,83 @@
msgid "Original size"
msgstr "Taille d'origine"
-#: src/pyams_media/interfaces/__init__.py:167
+#: src/pyams_media/interfaces/__init__.py:172
msgid "ZEO connection name"
msgstr "Connexion ZEO"
-#: src/pyams_media/interfaces/__init__.py:168
+#: src/pyams_media/interfaces/__init__.py:173
msgid "Name of ZEO connection utility defining converter connection"
msgstr "Nom de la connexion ZEO utilisée par le processus de conversion"
-#: src/pyams_media/interfaces/__init__.py:173
+#: src/pyams_media/interfaces/__init__.py:178
msgid "Video formats conversions"
msgstr "Formats de conversion vidéo"
-#: src/pyams_media/interfaces/__init__.py:174
+#: src/pyams_media/interfaces/__init__.py:179
msgid "Published video files will be automatically converted to this format"
msgstr "Les vidéos publiées seront automatiquement converties dans ces formats"
-#: src/pyams_media/interfaces/__init__.py:178
+#: src/pyams_media/interfaces/__init__.py:183
msgid "Video frames size"
msgstr "Taille de l'image"
-#: src/pyams_media/interfaces/__init__.py:179
+#: src/pyams_media/interfaces/__init__.py:184
msgid "Leave empty to keep original frame size..."
msgstr "Indiquez ici les différentes résolutions qui seront générées..."
-#: src/pyams_media/interfaces/__init__.py:183
+#: src/pyams_media/interfaces/__init__.py:188
msgid "Video bitrate"
msgstr "Débit vidéo"
-#: src/pyams_media/interfaces/__init__.py:184
+#: src/pyams_media/interfaces/__init__.py:189
msgid "In kilo-bytes per second. Leave empty to keep original value"
msgstr ""
"En kilo-octets par seconde. Laissez cette zone vide pour garder la valeur du "
"média d'origine."
-#: src/pyams_media/interfaces/__init__.py:187
+#: src/pyams_media/interfaces/__init__.py:192
msgid "Video quantisation scale"
msgstr "Quantification vidéo"
-#: src/pyams_media/interfaces/__init__.py:188
+#: src/pyams_media/interfaces/__init__.py:193
msgid "Lower value indicates higher quality"
msgstr "Une valeur faible indique une qualité plus élevée"
-#: src/pyams_media/interfaces/__init__.py:192
+#: src/pyams_media/interfaces/__init__.py:197
msgid "Video audio frequency"
msgstr "Fréquence audio"
-#: src/pyams_media/interfaces/__init__.py:193
-#: src/pyams_media/interfaces/__init__.py:207
+#: src/pyams_media/interfaces/__init__.py:198
+#: src/pyams_media/interfaces/__init__.py:212
msgid "A common value is 22050. Leave empty to keep original value."
msgstr ""
"Une valeur courante est 22050. Laissez cette zone vide pour garder la valeur "
"du média d'origine."
-#: src/pyams_media/interfaces/__init__.py:196
+#: src/pyams_media/interfaces/__init__.py:201
msgid "Video audio bitrate"
msgstr "Débit audio"
-#: src/pyams_media/interfaces/__init__.py:197
-#: src/pyams_media/interfaces/__init__.py:211
+#: src/pyams_media/interfaces/__init__.py:202
+#: src/pyams_media/interfaces/__init__.py:216
msgid "In kilo-bytes per second. Leave empty to keep original value."
msgstr ""
"En kilo-octets par seconde. Laissez cette zone vide pour garder la valeur du "
"média d'origine."
-#: src/pyams_media/interfaces/__init__.py:201
+#: src/pyams_media/interfaces/__init__.py:206
msgid "Audio formats conversions"
msgstr "Formats de conversion audio"
-#: src/pyams_media/interfaces/__init__.py:202
+#: src/pyams_media/interfaces/__init__.py:207
msgid "Published audio files will be automatically converted to this format"
msgstr ""
"Les fichiers audios publiés seront automatiquement convertis dans ces formats"
-#: src/pyams_media/interfaces/__init__.py:206
+#: src/pyams_media/interfaces/__init__.py:211
msgid "Audio frequency"
msgstr "Fréquence audio"
-#: src/pyams_media/interfaces/__init__.py:210
+#: src/pyams_media/interfaces/__init__.py:215
msgid "Audio bitrate"
msgstr "Débit audio"
--- a/src/pyams_media/locales/pyams_media.pot Mon Sep 11 13:46:31 2017 +0200
+++ b/src/pyams_media/locales/pyams_media.pot Mon Sep 11 15:33:50 2017 +0200
@@ -1,12 +1,12 @@
-#
+#
# SOME DESCRIPTIVE TITLE
# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2015-12-02 17:33+0100\n"
+"POT-Creation-Date: 2017-09-07 15:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,49 +14,69 @@
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Lingua 3.10.dev0\n"
+"Generated-By: Lingua 4.13\n"
-#: ./src/pyams_media/converter.py:103
+#: ./src/pyams_media/converter.py:105
msgid "WAV audio converter"
msgstr ""
-#: ./src/pyams_media/converter.py:111
+#: ./src/pyams_media/converter.py:113
msgid "MP3 audio converter"
msgstr ""
-#: ./src/pyams_media/converter.py:119
+#: ./src/pyams_media/converter.py:121
msgid "OGG audio converter"
msgstr ""
-#: ./src/pyams_media/converter.py:180
+#: ./src/pyams_media/converter.py:181
msgid "FLV (Flash Video) video converter"
msgstr ""
-#: ./src/pyams_media/converter.py:196
+#: ./src/pyams_media/converter.py:197
msgid "MP4 (HTML5) video converter"
msgstr ""
-#: ./src/pyams_media/converter.py:216
+#: ./src/pyams_media/converter.py:217
msgid "OGG video converter"
msgstr ""
-#: ./src/pyams_media/converter.py:224
+#: ./src/pyams_media/converter.py:225
msgid "WebM video converter"
msgstr ""
-#: ./src/pyams_media/zmi/media.py:49
-msgid "Video conversions..."
+#: ./src/pyams_media/zmi/media.py:52
+msgid "Cancel"
+msgstr ""
+
+#: ./src/pyams_media/zmi/media.py:53
+msgid "Restart missing conversions"
msgstr ""
#: ./src/pyams_media/zmi/media.py:60
+msgid ""
+"Several formats are required to handle different browsers and screen resolutions.\n"
+" \n"
+"Conversion process may require some time based on media format and duration; this dashboard gives\n"
+"you indications about required conversions."
+msgstr ""
+
+#: ./src/pyams_media/zmi/media.py:76
+msgid "Video conversions..."
+msgstr ""
+
+#: ./src/pyams_media/zmi/media.py:88
msgid "Selected video conversions"
msgstr ""
-#: ./src/pyams_media/zmi/media.py:118
+#: ./src/pyams_media/zmi/media.py:122 ./src/pyams_media/zmi/media.py:219
+msgid "Media conversions restarted!"
+msgstr ""
+
+#: ./src/pyams_media/zmi/media.py:173
msgid "Audio conversions..."
msgstr ""
-#: ./src/pyams_media/zmi/media.py:129
+#: ./src/pyams_media/zmi/media.py:185
msgid "Selected audio conversions"
msgstr ""
@@ -68,35 +88,51 @@
msgid "Video conversion"
msgstr ""
-#: ./src/pyams_media/zmi/__init__.py:87
+#: ./src/pyams_media/zmi/__init__.py:88
msgid "Audio conversion"
msgstr ""
-#: ./src/pyams_media/zmi/__init__.py:107
+#: ./src/pyams_media/zmi/__init__.py:108
msgid "Test process connection..."
msgstr ""
-#: ./src/pyams_media/zmi/__init__.py:130
+#: ./src/pyams_media/zmi/__init__.py:118 ./src/pyams_media/zmi/video.py:65
+msgid "Close"
+msgstr ""
+
+#: ./src/pyams_media/zmi/__init__.py:119
+msgid "Test connection"
+msgstr ""
+
+#: ./src/pyams_media/zmi/__init__.py:131
msgid "Test medias converter process connection"
msgstr ""
-#: ./src/pyams_media/zmi/__init__.py:117 ./src/pyams_media/zmi/video.py:71
-msgid "Close"
-msgstr ""
-
-#: ./src/pyams_media/zmi/__init__.py:118
-msgid "Test connection"
-msgstr ""
-
-#: ./src/pyams_media/zmi/video.py:61
+#: ./src/pyams_media/zmi/video.py:55
msgid "Select thumbnail..."
msgstr ""
-#: ./src/pyams_media/zmi/video.py:87
+#: ./src/pyams_media/zmi/video.py:66
+msgid "Select thumbnail"
+msgstr ""
+
+#: ./src/pyams_media/zmi/video.py:72
+msgid "Thumbnail timestamp"
+msgstr ""
+
+#: ./src/pyams_media/zmi/video.py:81
msgid "Select video thumbnail"
msgstr ""
-#: ./src/pyams_media/zmi/video.py:144
+#: ./src/pyams_media/zmi/video.py:121
+msgid "Thumbnail selected successfully."
+msgstr ""
+
+#: ./src/pyams_media/zmi/video.py:124
+msgid "An error occurred. No created thumbnail."
+msgstr ""
+
+#: ./src/pyams_media/zmi/video.py:138
msgid ""
"You can play the video until you display the image you want.\n"
"\n"
@@ -104,22 +140,6 @@
"video illustration."
msgstr ""
-#: ./src/pyams_media/zmi/video.py:72
-msgid "Select thumbnail"
-msgstr ""
-
-#: ./src/pyams_media/zmi/video.py:78
-msgid "Thumbnail timestamp"
-msgstr ""
-
-#: ./src/pyams_media/zmi/video.py:127
-msgid "Thumbnail selected successfully."
-msgstr ""
-
-#: ./src/pyams_media/zmi/video.py:130
-msgid "An error occurred. No created thumbnail."
-msgstr ""
-
#: ./src/pyams_media/zmi/templates/audio-conversions.pt:5
msgid "Status"
msgstr ""
@@ -140,76 +160,76 @@
msgid "Original size"
msgstr ""
-#: ./src/pyams_media/interfaces/__init__.py:167
+#: ./src/pyams_media/interfaces/__init__.py:172
msgid "ZEO connection name"
msgstr ""
-#: ./src/pyams_media/interfaces/__init__.py:168
+#: ./src/pyams_media/interfaces/__init__.py:173
msgid "Name of ZEO connection utility defining converter connection"
msgstr ""
-#: ./src/pyams_media/interfaces/__init__.py:173
-msgid "Video formats conversions"
-msgstr ""
-
-#: ./src/pyams_media/interfaces/__init__.py:174
-msgid "Published video files will be automatically converted to this format"
-msgstr ""
-
#: ./src/pyams_media/interfaces/__init__.py:178
-msgid "Video frames size"
+msgid "Video formats conversions"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:179
-msgid "Leave empty to keep original frame size..."
+msgid "Published video files will be automatically converted to this format"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:183
-msgid "Video bitrate"
+msgid "Video frames size"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:184
-msgid "In kilo-bytes per second. Leave empty to keep original value"
-msgstr ""
-
-#: ./src/pyams_media/interfaces/__init__.py:187
-msgid "Video quantisation scale"
+msgid "Leave empty to keep original frame size..."
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:188
-msgid "Lower value indicates higher quality"
+msgid "Video bitrate"
+msgstr ""
+
+#: ./src/pyams_media/interfaces/__init__.py:189
+msgid "In kilo-bytes per second. Leave empty to keep original value"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:192
-msgid "Video audio frequency"
+msgid "Video quantisation scale"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:193
-#: ./src/pyams_media/interfaces/__init__.py:207
-msgid "A common value is 22050. Leave empty to keep original value."
-msgstr ""
-
-#: ./src/pyams_media/interfaces/__init__.py:196
-msgid "Video audio bitrate"
+msgid "Lower value indicates higher quality"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:197
-#: ./src/pyams_media/interfaces/__init__.py:211
-msgid "In kilo-bytes per second. Leave empty to keep original value."
+msgid "Video audio frequency"
+msgstr ""
+
+#: ./src/pyams_media/interfaces/__init__.py:198
+#: ./src/pyams_media/interfaces/__init__.py:212
+msgid "A common value is 22050. Leave empty to keep original value."
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:201
-msgid "Audio formats conversions"
+msgid "Video audio bitrate"
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:202
-msgid "Published audio files will be automatically converted to this format"
+#: ./src/pyams_media/interfaces/__init__.py:216
+msgid "In kilo-bytes per second. Leave empty to keep original value."
msgstr ""
#: ./src/pyams_media/interfaces/__init__.py:206
+msgid "Audio formats conversions"
+msgstr ""
+
+#: ./src/pyams_media/interfaces/__init__.py:207
+msgid "Published audio files will be automatically converted to this format"
+msgstr ""
+
+#: ./src/pyams_media/interfaces/__init__.py:211
msgid "Audio frequency"
msgstr ""
-#: ./src/pyams_media/interfaces/__init__.py:210
+#: ./src/pyams_media/interfaces/__init__.py:215
msgid "Audio bitrate"
msgstr ""
--- a/src/pyams_media/skin/resources/js/pyams_media.js Mon Sep 11 13:46:31 2017 +0200
+++ b/src/pyams_media/skin/resources/js/pyams_media.js Mon Sep 11 15:33:50 2017 +0200
@@ -35,7 +35,7 @@
return;
}
var video = player.video;
- if (!video.time) {
+ if (!video.time && player.conf.flowplayer) {
video = player.conf.flowplayer.video;
}
if (video && video.time) {
--- a/src/pyams_media/skin/resources/js/pyams_media.min.js Mon Sep 11 13:46:31 2017 +0200
+++ b/src/pyams_media/skin/resources/js/pyams_media.min.js Mon Sep 11 15:33:50 2017 +0200
@@ -1,1 +1,1 @@
-(function(c,b){var d=b.MyAMS;var a={initPlayer:function(){var g=c(this);d.dialog.registerShownCallback(a.initPlayerDialog,g);var e=g.flowplayer();var f=g.data("ams-flowplayer-events");if(f){for(var h in f){if(!f.hasOwnProperty(h)){continue}e.on(h,d.getFunctionByName(f[h]))}}d.dialog.registerHideCallback(a.shutdownPlayerDialog,g)},initPlayerDialog:function(){var e=c(this);c(".modal-viewport",e).removeAttr("style").removeClass("modal-viewport")},getPlayerTime:function(l,i){var h=c(this);var g=h.data("flowplayer");if(g.playing){return}var k=g.video;if(!k.time){k=g.conf.flowplayer.video}if(k&&k.time){var f=k.time;var j=h.parents("form");c('INPUT[name="form.widgets.time"]',j).val(f)}},shutdownPlayerDialog:function(){var f=c(this);var e=c(".flowplayer",f).data("flowplayer");e.shutdown()}};b.PyAMS_media=a})(jQuery,this);
\ No newline at end of file
+(function(c,b){var d=b.MyAMS;var a={initPlayer:function(){var g=c(this);d.dialog.registerShownCallback(a.initPlayerDialog,g);var e=g.flowplayer();var f=g.data("ams-flowplayer-events");if(f){for(var h in f){if(!f.hasOwnProperty(h)){continue}e.on(h,d.getFunctionByName(f[h]))}}d.dialog.registerHideCallback(a.shutdownPlayerDialog,g)},initPlayerDialog:function(){var e=c(this);c(".modal-viewport",e).removeAttr("style").removeClass("modal-viewport")},getPlayerTime:function(l,i){var h=c(this);var g=h.data("flowplayer");if(g.playing){return}var k=g.video;if(!k.time&&g.conf.flowplayer){k=g.conf.flowplayer.video}if(k&&k.time){var f=k.time;var j=h.parents("form");c('INPUT[name="form.widgets.time"]',j).val(f)}},shutdownPlayerDialog:function(){var f=c(this);var e=c(".flowplayer",f).data("flowplayer");e.shutdown()}};b.PyAMS_media=a})(jQuery,this);
\ No newline at end of file