Skip to content

Commit

Permalink
Merge branch 'release/5.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ferserc1 committed Mar 15, 2018
2 parents 034eb82 + 517d8ad commit c580936
Show file tree
Hide file tree
Showing 257 changed files with 15,091 additions and 58,445 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ build
node_modules
repository_test/repository/local*
.idea
tests/nightwatch/reports/*
tests/nightwatch/reports/*
\.vscode/
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deploy:
secure: UI6zIHGkhy7p/OtViLbi1yxuyYPteAoRGFO7D8xhc8N6YAkzxYFmlTHdUQgFj4Hgh+5gO6/jW9kpTkbkbATSIVLOLcuLyJEq6jDuorM2q8D2VInpc5ZpNddFjiQdKaIkZL8CeBnncKvmxCBZeHgE4MQPOGHtCQ900viROEVY0ak=
file:
- ${HOME}/prebuilt/paella-prebuilt-${TRAVIS_TAG}.tar.gz
prerelease: true
prerelease: ${PRERELEASE}
on:
repo: polimediaupv/paella
tags: ${PRERELEASE}
tags: true
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
CHANGELOG
=========

* Paella 5.3.0

* New plugin registration system.
* Automatic zoom using track 4k
* Refactoring and bug fixes
* Use 16/9 aspect ratio for audio sources
* New plugin: Usertracking xAPI plugin (@dpeite)
* New plugin: Usertracking Piwik plugin

* Paella 5.2.13

* Fixed a bug when loading captions in an not supported format
Expand Down
40 changes: 26 additions & 14 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"data":{
"enabled":true,
"dataDelegates":{
"default":"CookieDataDelegate",
"trimming":"CookieDataDelegate",
"userInfo": "UserDataDelegate",
"visualAnnotations": "VisualAnnotationsDataDelegate",
"metadata":"VideoManifestMetadataDataDelegate"
"metadata":"VideoManifestMetadataDataDelegate",
"cameraTrack":"TrackCameraDataDelegate"
}
},
"folders": {
Expand All @@ -60,7 +59,7 @@
"autoplay":true
},
"plugins":{
"enablePluginsByDefault": false,
"enablePluginsByDefault": false,

"//**** Instructions: Disable any individual plugin by setting its enable property to false": {"enabled": false},
"//**** For a list of available plugins and configuration, go to": "https://github.com/polimediaupv/paella/blob/master/doc/plugins.md",
Expand All @@ -69,13 +68,13 @@
"edu.harvard.dce.paella.flexSkipPlugin": {"enabled":true, "direction": "Rewind", "seconds": 10},
"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},
"es.upv.paella.footprintsPlugin": {"enabled":false},
"es.upv.paella.frameControlPlugin": {"enabled": true, "showFullPreview": "auto"},
"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.playbackRatePlugin": {"enabled":true, "availableRates": [0.75, 1, 1.25, 1.5]},
"es.upv.paella.playPauseButtonPlugin": {"enabled":true},
"es.upv.paella.searchPlugin": {"enabled":true, "sortType":"time", "colorSearch":false},
"es.upv.paella.socialPlugin": {"enabled":true},
Expand All @@ -86,7 +85,9 @@
"es.upv.paella.ratePlugin": { "enabled":true },
"es.upv.paella.videoZoomPlugin": { "enabled":true },
"es.upv.paella.audioLanguage": { "enabled":true },
"es.upv.paella.videoZoomToolbarPlugin": { "enabled":true, "targetStreamIndex":0 },
"es.upv.paella.videoZoomToolbarPlugin": { "enabled":false, "targetStreamIndex":0 },
"es.upv.paella.videoZoomTrack4kPlugin": { "enabled":true, "targetStreamIndex":0, "autoModeByDefault":false },
"es.upv.paella.airPlayPlugin": { "enabled":true },

"//****": "Video Overlay Button Plugins",
"es.upv.paella.liveStreamingIndicatorPlugin": { "enabled": true },
Expand All @@ -101,11 +102,11 @@
"localhost:8000"
]
},

"//****": "TabBar Plugins",
"es.upv.paella.commentsPlugin": {"enabled": false},
"es.upv.paella.test.tabBarExamplePlugin": {"enabled": false},

"//****": "Event Driven Plugins",
"es.upv.paella.blackBoardPlugin": {"enabled": true},
"es.upv.paella.breaksPlayerPlugin": {"enabled": true},
Expand All @@ -116,22 +117,33 @@
"es.upv.paella.trimmingPlayerPlugin": {"enabled":true},
"es.upv.paella.zoomPlugin": {"enabled": false},
"es.upv.paella.windowTitlePlugin": {"enabled": true},
"es.upv.paella.track4kPlugin": { "enabled":true },

"//****": "Captions Parser Plugins",
"es.upv.paella.captions.DFXPParserPlugin": {"enabled":true},
"es.teltek.paella.captions.WebVTTParserPlugin": {"enabled":true},

"//****": "Search Service Plugins",
"es.upv.paella.search.captionsSearchPlugin": {"enabled":true},
"es.upv.paella.frameCaptionsSearchPlugin": {"enabled":true},

"//****": "User Tracking Saver Plugins",
"es.upv.paella.usertracking.elasticsearchSaverPlugin": { "enabled": false, "url": "http://my.elastic.server"},
"es.upv.paella.usertracking.GoogleAnalyticsSaverPlugIn": { "enabled": false, "trackingID": "UA-XXXXXXXX-Y" }
"es.upv.paella.usertracking.GoogleAnalyticsSaverPlugIn": { "enabled": false, "trackingID": "UA-XXXXXXXX-Y" },
"es.upv.paella.usertracking.piwikSaverPlugIn": { "enabled": false, "tracker":"//tracker.server.com", "siteId": "1" },
"es.teltek.paella.usertracking.xAPISaverPlugin": {"enabled": false, "endpoint":"http://localhost:8081/data/xAPI/", "auth":"auth_key"}

}
},
"standalone" : {
"repository": "../repository/"
}
},
"skin": {
"available": [
"dark",
"dark_small",
"light",
"light_small"
]
}
}

3 changes: 3 additions & 0 deletions doc/adopter_doc/integrate_intermediate.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Add the paella css and js dependecies:
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/lunr.min.js"></script>
<script type="text/javascript" src="javascript/require.js"></script>
<script type="text/javascript" src="javascript/traceur-runtime.min.js"></script>
<script type="text/javascript" src="javascript/paella_player.js"></script>

<script type="text/javascript" src="resources/bootstrap/js/bootstrap.min.js"></script>
Expand All @@ -58,6 +59,7 @@ Then add the container where paella is going to be loaded:
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/lunr.min.js"></script>
<script type="text/javascript" src="javascript/require.js"></script>
<script type="text/javascript" src="javascript/traceur-runtime.min.js"></script>
<script type="text/javascript" src="javascript/paella_player.js"></script>

<script type="text/javascript" src="resources/bootstrap/js/bootstrap.min.js"></script>
Expand Down Expand Up @@ -85,6 +87,7 @@ Finally load Paella using that container:
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/lunr.min.js"></script>
<script type="text/javascript" src="javascript/require.js"></script>
<script type="text/javascript" src="javascript/traceur-runtime.min.js"></script>
<script type="text/javascript" src="javascript/paella_player.js"></script>

<script type="text/javascript" src="resources/bootstrap/js/bootstrap.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# es.upv.paella.usertracking.piwikSaverPlugIn

This plugin saves the usertracking events to the [Piwik](https://matomo.org/) service

## Plugin Type:
- [paella.userTracking.SaverPlugIn](../developer/plugin_types.md)

## Configuration Parameters

* **tracker**

the piwik tracked URL.
- required

* **siteId**

the pikiw site ID.
- required

* **category**

category to use to save the user events
- default: "PaellaPlayer"


## Config Example:

```json
{
"es.upv.paella.usertracking.piwikSaverPlugIn": {
"enabled": true,
"tracker": "https//tracker.server.com"
"siteId": "1"
}
}
```
76 changes: 76 additions & 0 deletions doc/devel_doc/paella_5_3_plugin_migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Paella 5.3 API changes
### Migración de plugins

In Paella 5.2.x, the plugins were registered by instantiating their class:

```
Class ("paella.plugins.PlayPauseButtonPlugin",paella.ButtonPlugin, {
....
});
paella.plugins.playPauseButtonPlugin = new paella.plugins.PlayPauseButtonPlugin();
```

Using this method, it was very difficult to control the plugins life cycle, because Paella Player has no control
ofthe instant that the plugin is instantiated.

To improve the life cycle control, from Paella Player 5.3, the plugins are instantiated using a function that receive
a closure as parameter. This closure returns the class that implements the plugin. Paella Player will call the closure
when the plugin must be instantiated.

Also, the plugins code must be defined using the new ECMAScript 2015 standard.

```
paella.addPlugin(function() {
return class PlayPauseButtonPlugin extends paella.ButtonPlugin {
constructor() {
super();
this.playIconClass = 'icon-play';
this.pauseIconClass = 'icon-pause';
this.playSubclass = 'playButton';
this.pauseSubclass = 'pauseButton';
}
...
}
});
```

# Data delegates

The data delegate definition has been modified using an identical approach as the new plugin definition system, but
in this case, the new system is backward compatible. Anyway, the old data delegate definition system has been deprecated,
and is recommendable to update the old code.

To define a data delegate, you only need to define the data delegate class in the same way as it is done with the plugins,
but in this case, the function also receives a parameter that specify the context. With this parameter, you can define
the context that will use the data delegate by default, without having to do it in the configuration file.

You still can use the configuration file to define the data delegate context, and the parameters defined in the configuration
files are more priority than those defined in the code.

```
paella.addDataDelegate("context",() => {
return class MyDataDelegate extends paella.DataDelegate {
read(context,params,onSuccess) { ... }
write(context,params,value,onSuccess) { ... }
remove(context,params,onSuccess) { ... }
};
});
```

You can also define more than one context in the code using an array instead of a string.

```
paella.addDataDelegate(["context1","context2"],() => {
return class MyDataDelegate extends paella.DataDelegate {
read(context,params,onSuccess) { ... }
write(context,params,value,onSuccess) { ... }
remove(context,params,onSuccess) { ... }
};
});
```
1 change: 1 addition & 0 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script type="text/javascript" src="javascript/base.js"></script>
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/require.js"></script>
<script type="text/javascript" src="javascript/traceur-runtime.min.js"></script>
<script type="text/javascript" src="javascript/paella_player.js"></script>

<script type="text/javascript" src="resources/bootstrap/js/bootstrap.min.js"></script>
Expand Down
69 changes: 61 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const gulp = require('gulp'),
traceur = require('gulp-traceur'),
merge = require('gulp-merge-json'),
fs = require('fs'),
uglify = require('gulp-uglify'),
minify = require('gulp-minify'),
uglify = require('gulp-uglify-es').default,
flatten = require('gulp-flatten'),
path = require('path'),

Expand Down Expand Up @@ -53,6 +54,25 @@ function getVersion() {
}
}

function getFiles(dir,fileExt,filelist) {
let fs = require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
if (!Array.isArray(fileExt)) {
fileExt = [fileExt];
}
files.forEach(function(file) {
let ext = file.split('.').pop();
if (fs.statSync(dir + '/' + file).isDirectory() && file!='deps') {
filelist = getFiles(dir + file + '/', fileExt, filelist);
}
else if (fileExt.indexOf(ext)!=-1) {
filelist.push(dir + file);
}
});
return filelist;
}

gulp.task("webserver", function() {
connect.server({
name: 'Paella Player',
Expand All @@ -61,23 +81,49 @@ gulp.task("webserver", function() {
});
});

gulp.task("compile", function() {
return gulp.src(["src/*.js","plugins/*/*.js"])
.pipe(traceur())
gulp.task("compileES5", function() {
let files = getFiles("src/","js");
files = getFiles("plugins/","js",files);
return gulp.src(files)
.pipe(concat("paella_player.js"))
.pipe(traceur())
.pipe(replace(/@version@/,getVersion()))
.pipe(uglify())
.pipe(gulp.dest(`${config.outDir}player/javascript/`));
});

gulp.task("compileES2015", function() {
let files = getFiles("src/","js");
files = getFiles("plugins/","js",files);
return gulp.src(files)
.pipe(concat("paella_player_es2015.js"))
.pipe(replace(/@version@/,getVersion()))
.pipe(uglify())
.pipe(gulp.dest(`${config.outDir}player/javascript/`));
});

gulp.task("compileDebug", function() {
return gulp.src(["src/*.js","plugins/*/*.js"])
gulp.task("compileDebugES5", function() {
let files = getFiles("src/","js");
files = getFiles("plugins/","js",files);
return gulp.src(files)
.pipe(traceur())
.pipe(concat("paella_player.js"))
.pipe(replace(/\@version\@/,getVersion()))
.pipe(gulp.dest(`${config.outDir}player/javascript/`));
});

gulp.task("compileDebugES2015", function() {
let files = getFiles("src/","js");
files = getFiles("plugins/","js",files);
return gulp.src(files)
.pipe(concat("paella_player_es2015.js"))
.pipe(replace(/\@version\@/,getVersion()))
.pipe(gulp.dest(`${config.outDir}player/javascript/`));
});

gulp.task("compile",["compileES5","compileES2015"]);
gulp.task("compileDebug",["compileDebugES5","compileDebugES2015"]);

gulp.task("styles", function() {
let p = [];
function genSkin(skinPath) {
Expand Down Expand Up @@ -124,8 +170,15 @@ gulp.task("copy", function() {
gulp.src('resources/images/**')
.pipe(gulp.dest(`${config.outDir}player/resources/images`)),

gulp.src(['index.html','test.html'])
.pipe(gulp.dest(`${config.outDir}player/`))
gulp.src('resources/style/fonts/**')
.pipe(gulp.dest(`${config.outDir}player/resources/style/fonts`)),

gulp.src(['*.html'])
.pipe(gulp.dest(`${config.outDir}player/`)),

gulp.src('node_modules/traceur/bin/traceur-runtime.js')
.pipe(minify({ ext: { min: '.min.js' }}))
.pipe(gulp.dest(`${config.outDir}player/javascript`))
];

function addPlugins(pluginPath) {
Expand Down
Loading

0 comments on commit c580936

Please sign in to comment.