Skip to content

Commit

Permalink
now the configuration of the minimum window size of the plugins is in…
Browse files Browse the repository at this point in the history
… the configuration file. Fix #432
  • Loading branch information
ferserc1 committed Jul 15, 2019
1 parent d2637ea commit 4625dff
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 37 deletions.
33 changes: 16 additions & 17 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
"videoQualityStrategyParams":{ "maxAutoQualityRes":720 },
"reloadOnFullscreen": true,
"videoZoom": {
"enabled":true,
"max":800,
"minWindowSize":500
"enabled":false,
"max":800
},

"deprecated-methods":[{"name":"streaming","enabled":true},
Expand Down Expand Up @@ -79,28 +78,28 @@
"//**** For a list of available plugins and configuration, go to": "https://github.com/polimediaupv/paella/blob/master/doc/plugins.md",
"list":{
"//******* Button plugins": "",
"edu.harvard.dce.paella.flexSkipPlugin": {"enabled":true, "direction": "Rewind", "seconds": 10},
"edu.harvard.dce.paella.flexSkipPlugin": {"enabled":true, "direction": "Rewind", "seconds": 10, "minWindowSize": 510 },
"edu.harvard.dce.paella.flexSkipForwardPlugin": {"enabled":true, "direction": "Forward", "seconds": 30},
"es.upv.paella.captionsPlugin": {"enabled":true, "searchOnCaptions":true},
"es.upv.paella.extendedTabAdapterPlugin": {"enabled":true},
"es.upv.paella.extendedTabAdapterPlugin": {"enabled":true, "minWindowSize": 400},
"es.upv.paella.footprintsPlugin": {"enabled":false},
"es.upv.paella.frameControlPlugin": {"enabled": true, "showFullPreview": "auto", "showCaptions":true},
"es.upv.paella.frameControlPlugin": {"enabled": true, "showFullPreview": "auto", "showCaptions":true, "minWindowSize": 450 },
"es.upv.paella.fullScreenButtonPlugin": {"enabled":true, "reloadOnFullscreen":{ "enabled":true, "keepUserSelection":true }},
"es.upv.paella.helpPlugin": {"enabled":true, "langs":["en","es"]},
"es.upv.paella.multipleQualitiesPlugin": {"enabled":true, "showWidthRes":true},
"es.upv.paella.playbackRatePlugin": {"enabled":true, "availableRates": [0.75, 1, 1.25, 1.5]},
"es.upv.paella.helpPlugin": {"enabled":true, "langs":["en","es"], "minWindowSize": 650 },
"es.upv.paella.multipleQualitiesPlugin": {"enabled":true, "showWidthRes":true, "minWindowSize": 550 },
"es.upv.paella.playbackRatePlugin": {"enabled":true, "availableRates": [0.75, 1, 1.25, 1.5], "minWindowSize": 500 },
"es.upv.paella.playPauseButtonPlugin": {"enabled":true},
"es.upv.paella.searchPlugin": {"enabled":true, "sortType":"time", "colorSearch":false},
"es.upv.paella.socialPlugin": {"enabled":true},
"es.upv.paella.themeChooserPlugin": {"enabled":true},
"es.upv.paella.viewModePlugin": { "enabled": true },
"es.upv.paella.searchPlugin": {"enabled":true, "sortType":"time", "colorSearch":false, "minWindowSize": 550},
"es.upv.paella.socialPlugin": {"enabled":true, "minWindowSize": 600},
"es.upv.paella.themeChooserPlugin": {"enabled":true, "minWindowSize": 600},
"es.upv.paella.viewModePlugin": { "enabled": true, "minWindowSize": 300 },
"es.upv.paella.volumeRangePlugin":{"enabled":true, "showMasterVolume": true, "showSlaveVolume": false },
"es.upv.paella.pipModePlugin": { "enabled":true },
"es.upv.paella.ratePlugin": { "enabled":true },
"es.upv.paella.ratePlugin": { "enabled":true, "minWindowSize": 500 },
"es.upv.paella.videoZoomPlugin": { "enabled":true },
"es.upv.paella.audioSelector": { "enabled":true },
"es.upv.paella.videoZoomToolbarPlugin": { "enabled":false, "targetStreamIndex":0 },
"es.upv.paella.videoZoomTrack4kPlugin": { "enabled":true, "targetStreamIndex":0, "autoModeByDefault":false },
"es.upv.paella.audioSelector": { "enabled":true, "minWindowSize": 400 },
"es.upv.paella.videoZoomToolbarPlugin": { "enabled":false, "targetStreamIndex":0, "minWindowSize": 500 },
"es.upv.paella.videoZoomTrack4kPlugin": { "enabled":true, "targetStreamIndex":0, "autoModeByDefault":false, "minWindowSize": 500 },
"es.upv.paella.airPlayPlugin": { "enabled":true },

"//***** Video Overlay Button Plugins": "",
Expand Down
1 change: 0 additions & 1 deletion doc/developers/plugin_creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ example: helpPlugin.js (buttonPlugin)
getSubclass() { return "helpButton"; }
getIconClass() { return 'icon-help'; }
getName() { return "es.upv.paella.helpPlugin"; }
getMinWindowSize() { return 650; }

getDefaultToolTip() {
return base.dictionary.translate("Show help") + ' (' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ paella.addPlugin(function() {
getIconClass() { return 'icon-back-10-s'; }
formatMessage() { return 'Rewind 10 seconds'; }
getDefaultToolTip() { return base.dictionary.translate(this.formatMessage()); }
getMinWindowSize() { return 510; }

checkEnabled(onSuccess) {
onSuccess(!paella.player.isLiveStream());
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.audioSelector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ paella.addPlugin(function() {
getSubclass() { return "audioSelector"; }
getIconClass() { return 'icon-headphone'; }
getIndex() { return 2040; }
getMinWindowSize() { return 400; }
getName() { return "es.upv.paella.audioSelector"; }
getDefaultToolTip() { return base.dictionary.translate("Set audio stream"); }

Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.extendedTabAdapterPlugin/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ paella.addPlugin(function() {
getSubclass() { return "extendedTabAdapterPlugin"; }
getIconClass() { return 'icon-folder'; }
getIndex() { return 2030; }
getMinWindowSize() { return 550; }
getName() { return "es.upv.paella.extendedTabAdapterPlugin"; }
getDefaultToolTip() { return base.dictionary.translate("Extended Tab Adapter"); }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.frameControlPlugin/framecontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ paella.addPlugin(function() {
getSubclass() { return "frameControl"; }
getIconClass() { return 'icon-photo'; }
getIndex() { return 510; }
getMinWindowSize() { return 450; }
getName() { return "es.upv.paella.frameControlPlugin"; }
getButtonType() { return paella.ButtonPlugin.type.timeLineButton; }
getDefaultToolTip() { return base.dictionary.translate("Navigate by slides"); }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.helpPlugin/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ paella.addPlugin(function() {
getSubclass() { return "helpButton"; }
getIconClass() { return 'icon-help'; }
getName() { return "es.upv.paella.helpPlugin"; }
getMinWindowSize() { return 650; }

getDefaultToolTip() { return base.dictionary.translate("Show help") + ' (' + base.dictionary.translate("Paella version:") + ' ' + paella.version + ')'; }

Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.multipleQualitiesPlugin/qualities.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ paella.addPlugin(function() {
getSubclass() { return "showMultipleQualitiesPlugin"; }
getIconClass() { return 'icon-screen'; }
getIndex() { return 2030; }
getMinWindowSize() { return 550; }
getName() { return "es.upv.paella.multipleQualitiesPlugin"; }
getDefaultToolTip() { return base.dictionary.translate("Change video quality"); }

Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.playbackRatePlugin/playback_rate.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ paella.addPlugin(function() {
getSubclass() { return "showPlaybackRateButton"; }
getIconClass() { return 'icon-screen'; }
getIndex() { return 140; }
getMinWindowSize() { return 500; }
getName() { return "es.upv.paella.playbackRatePlugin"; }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
getDefaultToolTip() { return base.dictionary.translate("Set playback rate"); }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.ratePlugin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ paella.addPlugin(function() {
getSubclass() { return "rateButtonPlugin"; }
getIconClass() { return 'icon-star'; }
getIndex() { return 540; }
getMinWindowSize() { return 500; }
getName() { return "es.upv.paella.ratePlugin"; }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
getDefaultToolTip() { return base.dictionary.translate("Rate this video"); }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.searchPlugin/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ paella.addPlugin(function() {
getAlignment() { return 'right'; }
getSubclass() { return 'searchButton'; }
getIconClass() { return 'icon-binoculars'; }
getMinWindowSize() { return 550; }
getName() { return "es.upv.paella.searchPlugin"; }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
getDefaultToolTip() { return base.dictionary.translate("Search"); }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.socialPlugin/social.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ paella.addPlugin(function() {
getSubclass() { return "showSocialPluginButton"; }
getIconClass() { return 'icon-social'; }
getIndex() { return 560; }
getMinWindowSize() { return 600; }
getName() { return "es.upv.paella.socialPlugin"; }
checkEnabled(onSuccess) { onSuccess(true); }
getDefaultToolTip() { return base.dictionary.translate("Share this video"); }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.themeChooser/themechooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ paella.addPlugin(function() {
getSubclass() { return "themeChooserPlugin"; }
getIconClass() { return 'icon-paintbrush'; }
getIndex() { return 2030; }
getMinWindowSize() { return 600; }
getName() { return "es.upv.paella.themeChooserPlugin"; }
getDefaultToolTip() { return base.dictionary.translate("Change theme"); }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
Expand Down
3 changes: 0 additions & 3 deletions plugins/es.upv.paella.track4kPlugin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ paella.addDataDelegate("cameraTrack",() => {
getIconClass() { return 'icon-screen'; }
closeOnMouseOut() { return true; }
getIndex() { return 2030; }
getMinWindowSize() { return (paella.player.config.player &&
paella.player.config.player.videoZoom &&
paella.player.config.player.videoZoom.minWindowSize) || 600; }
getName() { return "es.upv.paella.videoZoomTrack4kPlugin"; }
getDefaultToolTip() { return base.dictionary.translate("Set video zoom"); }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
Expand Down
3 changes: 0 additions & 3 deletions plugins/es.upv.paella.videoZoom/video_zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ paella.addPlugin(function() {
getSubclass() { return "videoZoomToolbar"; }
getIconClass() { return 'icon-screen'; }
getIndex() { return 2030; }
getMinWindowSize() { return (paella.player.config.player &&
paella.player.config.player.videoZoom &&
paella.player.config.player.videoZoom.minWindowSize) || 600; }
getName() { return "es.upv.paella.videoZoomToolbarPlugin"; }
getDefaultToolTip() { return base.dictionary.translate("Set video zoom"); }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
Expand Down
1 change: 0 additions & 1 deletion plugins/es.upv.paella.viewModePlugin/viewmode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ paella.addPlugin(function() {
getSubclass() { return "showViewModeButton"; }
getIconClass() { return 'icon-presentation-mode'; }
getIndex() { return 540; }
getMinWindowSize() { return 300; }
getName() { return "es.upv.paella.viewModePlugin"; }
getButtonType() { return paella.ButtonPlugin.type.popUpButton; }
getDefaultToolTip() { return base.dictionary.translate("Change video layout"); }
Expand Down
2 changes: 1 addition & 1 deletion src/05_plugin_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class ButtonPlugin extends paella.UIPlugin {
}

getMinWindowSize() {
return 0;
return this.config.minWindowSize || 0;
}

buildContent(domElement) {
Expand Down

0 comments on commit 4625dff

Please sign in to comment.