--- a/src/pyams_content/component/video/provider/interfaces.py Wed Apr 25 17:32:29 2018 +0200
+++ b/src/pyams_content/component/video/provider/interfaces.py Thu Apr 26 17:03:59 2018 +0200
@@ -20,11 +20,20 @@
# import packages
from pyams_utils.schema import ColorField
-from zope.schema import TextLine, Bool, Int, Choice
+from zope.schema import Text, TextLine, Bool, Int, Choice
from pyams_content import _
+class ICustomVideoSettings(IExternalVideoSettings):
+ """Custom external video provider settings"""
+
+ integration_code = Text(title=_("Integration code"),
+ description=_("Please select integration code provided by your video provider, "
+ "and paste it here"),
+ required=True)
+
+
class IYoutubeVideoSettings(IExternalVideoSettings):
"""Youtube video provider settings"""
@@ -33,20 +42,6 @@
"copy/paste the given URL here"),
required=True)
- width = Int(title=_("Video width"),
- description=_("Initial video frame width; mandatory for old browsers but may be overridden by "
- "presentation skin"),
- required=True,
- min=200,
- default=720)
-
- height = Int(title=_("Video height"),
- description=_("Initial video frame height; mandatory for old browsers but may be overridden by "
- "presentation skin"),
- required=True,
- min=200,
- default=405)
-
start_at = TextLine(title=_("Start at"),
description=_("Position at which to start video, in 'seconds' or 'minutes:seconds' format"),
required=False,
@@ -77,14 +72,14 @@
default=True)
hide_branding = Bool(title=_("Hide branding?"),
- description=_("If 'yes', Youtube branding won't be displayed"),
+ description=_("If 'no', Youtube branding will be displayed"),
required=True,
- default=False)
+ default=True)
show_related = Bool(title=_("Show related videos?"),
description=_("Show related videos when video end"),
required=True,
- default=True)
+ default=False)
allow_fullscreen = Bool(title=_("Allow full screen?"),
description=_("If 'yes', video can be displayed in full screen"),
@@ -96,15 +91,6 @@
required=True,
default=False)
-
-class IDailymotionVideoSettings(IExternalVideoSettings):
- """Dailymotion video provider settings"""
-
- video_id = TextLine(title=_("Video ID"),
- description=_("To get video ID, just use the 'Share' button in Dailymotion platform, "
- "click on \"Copy link\" and paste the given URL here"),
- required=True)
-
width = Int(title=_("Video width"),
description=_("Initial video frame width; mandatory for old browsers but may be overridden by "
"presentation skin"),
@@ -119,6 +105,15 @@
min=200,
default=405)
+
+class IDailymotionVideoSettings(IExternalVideoSettings):
+ """Dailymotion video provider settings"""
+
+ video_id = TextLine(title=_("Video ID"),
+ description=_("To get video ID, just use the 'Share' button in Dailymotion platform, "
+ "click on \"Copy link\" and paste the given URL here"),
+ required=True)
+
start_at = TextLine(title=_("Start at"),
description=_("Position at which to start video, in 'seconds' or 'minutes:seconds' format"),
required=False,
@@ -145,14 +140,14 @@
default='dark')
show_branding = Bool(title=_("Show branding?"),
- description=_("If 'no', Dailymotion branding won't be displayed"),
+ description=_("If 'yes', Dailymotion branding will be displayed"),
required=True,
- default=True)
+ default=False)
show_endscreen = Bool(title=_("Show end screen?"),
description=_("Show end screen when video end"),
required=True,
- default=True)
+ default=False)
allow_fullscreen = Bool(title=_("Allow full screen?"),
description=_("If 'yes', video can be displayed in full screen"),
@@ -164,15 +159,6 @@
required=True,
default=True)
-
-class IVimeoVideoSettings(IExternalVideoSettings):
- """Vimeo video provider settings"""
-
- video_id = TextLine(title=_("Video ID"),
- description=_("To get video ID, just use the 'Share' button in Vimeo platform, "
- "click on \"Link\" entry and copy/paste the given URL here"),
- required=True)
-
width = Int(title=_("Video width"),
description=_("Initial video frame width; mandatory for old browsers but may be overridden by "
"presentation skin"),
@@ -187,13 +173,22 @@
min=200,
default=405)
+
+class IVimeoVideoSettings(IExternalVideoSettings):
+ """Vimeo video provider settings"""
+
+ video_id = TextLine(title=_("Video ID"),
+ description=_("To get video ID, just use the 'Share' button in Vimeo platform, "
+ "click on \"Link\" entry and copy/paste the given URL here"),
+ required=True)
+
show_title = Bool(title=_("Show title?"),
description=_("If 'no', video title won't be displayed"),
required=True,
default=True)
show_signature = Bool(title=_("Show signature?"),
- description=_("If 'no', video signature won't be displayed"),
+ description=_("If 'no', video's author signature won't be displayed"),
required=True,
default=True)
@@ -216,3 +211,17 @@
description=_("If 'yes', video can be displayed in full screen"),
required=True,
default=True)
+
+ width = Int(title=_("Video width"),
+ description=_("Initial video frame width; mandatory for old browsers but may be overridden by "
+ "presentation skin"),
+ required=True,
+ min=200,
+ default=720)
+
+ height = Int(title=_("Video height"),
+ description=_("Initial video frame height; mandatory for old browsers but may be overridden by "
+ "presentation skin"),
+ required=True,
+ min=200,
+ default=405)