diff --git a/config.json b/config.json index e4e34b930b91d8ee7a3402ac65b27c27a9aa2508..05a220784df4e45994215daa92b2a6eed993e4d4 100644 --- a/config.json +++ b/config.json @@ -1,199 +1,249 @@ { - "player":{ - "accessControlClass":"paella.AccessControl", - "profileFrameStrategy": "paella.ProfileFrameStrategy", - "videoQualityStrategy": "paella.LimitedBestFitVideoQualityStrategy", - "videoQualityStrategyParams":{ "maxAutoQualityRes":720 }, - "reloadOnFullscreen": true, - "videoZoom": { - "enabled":true, - "max":800 - }, - - "deprecated-methods":[{"name":"streaming","enabled":true}, - {"name":"html","enabled":true}, - {"name":"flash","enabled":true}, - {"name":"image","enabled":true}], - - "methods":[ - { - "factory":"HLSVideoFactory", - "enabled":true, - "config": { - "*** You can add more hls.js settings here": "", - "https://github.com/video-dev/hls.js/blob/master/docs/API.md": "", - "maxBufferLength": 30, - "maxMaxBufferLength": 600, - "maxBufferSize": 60000000, - "maxBufferHole": 0.5, - "lowBufferWatchdogPeriod": 0.5, - "highBufferWatchdogPeriod": 3 + "defaultLayout": "presenter-presentation", + "plugins": { + "es.upv.paella.singleVideo": { + "enabled": true, + "validContent": [ + { + "id": "presenter", + "content": [ + "presenter" + ], + "icon": "present-mode-2.svg", + "title": "Presenter" }, - "iOSMaxStreams": 2, - "androidMaxStreams": 2, - "initialQualityLevel": 2 - }, - { "factory":"ChromaVideoFactory", "enabled":true }, - { "factory":"WebmVideoFactory", "enabled":true }, - { "factory":"Html5VideoFactory", "enabled":true }, - { "factory":"MpegDashVideoFactory", "enabled":true }, - { "factory":"RTMPVideoFactory", "enabled":true }, - { "factory":"ImageVideoFactory", "enabled":true }, - { "factory":"YoutubeVideoFactory", "enabled":true }, - { "factory":"Video360ThetaFactory", "enabled":true }, - { "factory":"Video360Factory", "enabled":true } - ], - "audioMethods":[ - { "factory":"MultiformatAudioFactory", "enabled":true } - ], - "defaultAudioTag": "" - }, - "defaultProfile":"presenter_presentation", - "data":{ - "enabled":true, - "dataDelegates":{ - "trimming":"CookieDataDelegate", - "metadata":"VideoManifestMetadataDataDelegate", - "cameraTrack":"TrackCameraDataDelegate" - } - }, - "folders": { - "profiles": "config/profiles", - "resources": "resources", - "skins": "resources/style" - }, - "experimental":{ - "autoplay":true - }, - "plugins":{ - "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", - "list":{ - "//******* Button plugins": "", - "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":false, "minWindowSize": 400}, - "es.upv.paella.footprintsPlugin": {"enabled":false}, - "es.upv.paella.frameControlPlugin": {"enabled": true, "showFullPreview": "auto", "showCaptions":true, "minWindowSize": 450 }, - "es.upv.paella.fullScreenButtonPlugin": {"enabled":true, "reloadOnFullscreen":{ "enabled":true, "keepUserSelection":true }, "ariaLabel": "Switch full screen mode"}, - "es.upv.paella.helpPlugin": {"enabled":false, "langs":["en","es"], "minWindowSize": 650 }, - "es.upv.paella.multipleQualitiesPlugin": {"enabled":true, "showWidthRes":true, "minWindowSize": 550, "minVisibleQuality": 240, "ariaLabel": "Change video quality" }, - "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":false, "sortType":"time", "colorSearch":false, "minWindowSize": 550}, - "es.upv.paella.sharePlugin": {"enabled":false, "minWindowSize": 600}, - "es.upv.paella.themeChooserPlugin": {"enabled":false, "minWindowSize": 600}, - "es.upv.paella.viewModePlugin": { "enabled": true, "minWindowSize": 300 }, - "es.upv.paella.volumeRangePlugin":{"enabled":true, "showMasterVolume": true, "showSlaveVolume": false, "ariaLabel": "Volume" }, - "es.upv.paella.pipModePlugin": { "enabled":true }, - "es.upv.paella.ratePlugin": { "enabled":false, "minWindowSize": 500 }, - "es.upv.paella.videoZoomPlugin": { "enabled":true, "showButtons":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 }, - - "es.upv.paella.timeMarksPlaybackCanvasPlugin": { "enabled": true, "color": "gray" }, - "es.upv.paella.BufferedPlaybackCanvasPlugin": { "enabled": true, "color": "rgba(0,0,0,0.4)" }, - - "//***** Video Overlay Button Plugins": "", - "es.upv.paella.liveStreamingIndicatorPlugin": { "enabled": true }, - "es.upv.paella.showEditorPlugin":{"enabled":true,"alwaysVisible":true}, - "es.upv.paella.arrowSlidesNavigatorPlugin": {"enabled": true, "content":["presentation","presenter"] }, - "es.upv.paella.videoDataPlugin": { - "enabled": false, - "excludeLocations":[ - "paellaplayer.upv.es" - ], - "excludeParentLocations":[ - "localhost:8000" - ] - }, - "es.upv.paella.legalPlugin": { - "enabled": false, - "label": "Legal info", - "position": "right", - "legalUrl": "https://en.wikipedia.org/wiki/General_Data_Protection_Regulation" - }, - - "//***** 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}, - "es.upv.paella.overlayCaptionsPlugin": {"enabled": true}, - "es.upv.paella.playButtonOnScreenPlugin": {"enabled":true}, - "es.upv.paella.translecture.captionsPlugin": {"enabled":true}, - "es.upv.paella.trimmingPlayerPlugin": {"enabled":true}, - "es.upv.paella.windowTitlePlugin": {"enabled": false}, - "es.upv.paella.track4kPlugin": { "enabled":false }, - "es.upv.paella.relatedVideosPlugin": { "enabled":true }, - - "//**** Video profile plugins": "", - "es.upv.paella.singleStreamProfilePlugin": { - "enabled": true, - "videoSets": [ - { "icon":"professor_icon.svg", "id":"presenter", "content":["presenter"]}, - { "icon":"slide_icon.svg", "id":"presentation", "content":["presentation"]} - ] - - }, - "es.upv.paella.dualStreamProfilePlugin": { "enabled":true, - "videoSets": [ - { "icon":"slide_professor_icon.svg", "id":"presenter_presentation", "content":["presenter","presentation"] }, - { "icon":"slide_professor_icon.svg", "id":"presenter2_presentation", "content":["presenter-2","presentation"] }, - { "icon":"slide_professor_icon.svg", "id":"presenter3_presentation", "content":["presenter-3","presentation"] } - ] - }, - "es.upv.paella.tripleStreamProfilePlugin": { - "enabled": true, - "videoSets": [ - { "icon":"three_streams_icon.svg", "id":"presenter_presentation_presenter2", "content":["presenter","presentation","presenter-2"] }, - { "icon":"three_streams_icon.svg", "id":"presenter_presentation_presenter3", "content":["presenter","presentation","presenter-3"] } - ] - }, - - "//**** 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.piwikSaverPlugIn": { "enabled": false, "tracker":"http://localhost/piwik/", "siteId": "1" }, - "org.opencast.usertracking.MatomoSaverPlugIn": { - "enabled": false, - "server": "http://localhost/piwik/", - "site_id": 1, - "heartbeat": 30, - "client_id": "Paella Player" + { + "id": "presentation", + "content": [ + "presentation" + ], + "icon": "present-mode-1.svg", + "title": "Presentation" + }, + { + "id": "presenter-2", + "content": [ + "presenter-2" + ], + "icon": "present-mode-1.svg", + "title": "Presentation" + } + ] + }, + "es.upv.paella.dualVideo": { + "enabled": true, + "validContent": [ + { + "id": "presenter-presentation", + "content": [ + "presenter", + "presentation" + ], + "icon": "present-mode-3.svg", + "title": "Presenter and presentation" + }, + { + "id": "presenter-2-presentation", + "content": [ + "presenter-2", + "presentation" + ], + "icon": "present-mode-3.svg", + "title": "Presenter and presentation" + }, + { + "id": "presenter-presenter-2", + "content": [ + "presenter", + "presenter-2" + ], + "icon": "present-mode-3.svg", + "title": "Presenter and presentation" + } + ] + }, + "es.upv.paella.tripleVideo": { + "enabled": true, + "validContent": [ + { + "id": "presenter-presenter-2-presentation", + "content": [ + "presenter", + "presenter-2", + "presentation" + ], + "icon": "present-mode-4.svg", + "title": "Presenter and presentation" + }, + { + "id": "presenter-2-presenter-3-presentation", + "content": [ + "presenter-2", + "presenter-3", + "presentation" + ], + "icon": "present-mode-4.svg", + "title": "Presenter and presentation" + } + ] + }, + "es.upv.paella.hlsVideoFormat": { + "enabled": true, + "order": 0, + "hlsConfig": { + "maxBufferLength": 40 }, - "org.opencast.usertracking.x5gonSaverPlugIn": { - "enabled": false, - "token": "X5GON_TOKEN", - "testing_environment" : false + "corsConfig": { + "withCredentials": false, + "requestHeaders": { + "Access-Control-Allow-Credentials": false + } + } + }, + "es.upv.paella.hlsLiveVideoFormat": { + "enabled": true, + "order": 0, + "hlsConfig": { + "maxBufferLength": 40 }, - "es.teltek.paella.usertracking.xAPISaverPlugin": {"enabled": false, "endpoint":"http://localhost:8081/data/xAPI/", "auth":"auth_key"}, - "//***** Keyboard plugins": "", - "es.upv.paella.defaultKeysPlugin": {"enabled": true } + "corsConfig": { + "withCredentials": false, + "requestHeaders": { + "Access-Control-Allow-Credentials": false + } + } + }, + "es.upv.paella.mp4VideoFormat": { + "enabled": true, + "order": 1 + }, + "es.upv.paella.playPauseButton": { + "enabled": true, + "order": 0, + "description": "Play and pause button" + }, + "es.upv.paella.frameControlButtonPlugin": { + "enabled": true, + "side": "right", + "order": 102 + }, + "es.upv.paella.fullscreenButton": { + "enabled": true, + "side": "right", + "order": 103 + }, + "es.upv.paella.layoutSelector": { + "enabled": true, + "side": "right", + "order": 101, + "parentContainer": "videoContainer" + }, + "es.upv.paella.playbackRateButton": { + "enabled": true, + "side": "right", + "order": 102, + "parentContainer": "videoContainer", + "rates": [ + 0.75, + 1, + 1.5, + 2 + ] + }, + "es.upv.paella.volumeButtonPlugin": { + "enabled": true, + "side": "left", + "order": 3 + }, + "es.upv.paella.forwardButtonPlugin": { + "enabled": true, + "side": "left", + "order": 2 + }, + "es.upv.paella.backwardButtonPlugin": { + "enabled": true, + "side": "left", + "order": 1 + }, + "es.upv.paella.zoomPlugin": { + "enabled": true, + "order": 0, + "maxZoom": 400, + "showButtons": true, + "target": "presenter" + }, + "es.upv.paella.videoCanvas": { + "enabled": true, + "order": 1 + }, + "es.upv.paella.cookieDataPlugin": { + "enabled": true, + "order": 0, + "context": [ + "default", + "trimming" + ] + }, + "es.upv.paella.vttManifestCaptionsPlugin": { + "enabled": true + }, + "es.upv.paella.hlsCaptionsPlugin": { + "enabled": true + }, + "es.upv.paella.captionsSelectorPlugin": { + "enabled": true, + "side": "right", + "parentContainer": "videoContainer" + }, + "es.upv.paella.qualitySelector": { + "enabled": true, + "side": "right", + "parentContainer": "videoContainer" + }, + "es.upv.paella.audioSelector": { + "enabled": true, + "side": "right" + }, + "es.upv.paella.defaultShortcuts": { + "enabled": true, + "validPlaybackRates": [ + 0.75, + 2, + 1, + 1.5 + ] + }, + "es.upv.paella.arrowSlidesNavigator": { + "enabled": true, + "target": [ + "presentation", + "presenter" + ] + }, + "es.upv.paella.keyboardShortcutsHelp": { + "enabled": true, + "order": 80, + "description": "Keyboard Shortcuts", + "side": "right" + }, + "es.upv.paella.userEventTracker": { + "enabled": false, + "context_": "userTracking" + }, + "es.upv.paella.debug.userTrackingDataPlugin": { + "enabled": false, + "context": [ + "userTracking" + ] + }, + "es.upv.paella.analytics.userTrackingDataPlugin": { + "enabled": false, + "trackingId": "configure_your_tracking_id_here", + "domain": "", + "category": true, + "context": [ + "userTracking" + ] } - }, - "standalone" : { - "repository": "../repository/" - }, - "skin": { - "default": "dark", - "available": [ - "dark" - ] } } diff --git a/styles.css b/styles.css index 6c0f2981edf8000139dde963585d452dc85edf6d..db5f0a8abfdea12c105f3676fcc1333e3be0107a 100644 --- a/styles.css +++ b/styles.css @@ -3,7 +3,6 @@ margin: auto; width: 100%; height: 85vh; - border: 1px solid #bbb; } @supports (--custom:property) { @@ -14,14 +13,11 @@ } } -.filter-player-iframe { - width: 100%; - height: 100%; -} - -.filter-opencast .filter-player-iframe { +.filter-opencast .mod-opencast-paella-player { position: absolute; top: 0; left: 0; + width: 100%; + height: 100%; border: none; } \ No newline at end of file diff --git a/templates/player.mustache b/templates/player.mustache index d814c1fccd381574b889da04d52c600e23a30437..e94ef4bd7169b5888753fa59026c04874cee77cc 100644 --- a/templates/player.mustache +++ b/templates/player.mustache @@ -33,29 +33,27 @@ }} {{#resolution}} -<div class="{{^width}}filter-opencast{{/width}} player-wrapper" style="--aspect-ratio: {{resolution}}; {{#width}}width: {{width}}px; height: {{height}}px{{/width}}"> +<div class="filter-opencast player-wrapper" style="--aspect-ratio: {{resolution}}; {{#width}}width: {{width}}px; height: {{height}}px{{/width}}"> {{/resolution}} {{^resolution}} <div class="filter-opencast player-wrapper"> {{/resolution}} - <iframe src="{{modplayerpath}}" class="filter-player-iframe" id="{{playerid}}" allowfullscreen></iframe> + <iframe src="{{modplayerpath}}" class="mod-opencast-paella-player" id="{{playerid}}" allowfullscreen></iframe> </div> <script> function init_{{playerid}}() { - const iframeWindow = document.getElementById('{{playerid}}').contentWindow; - if (!iframeWindow.paella || !iframeWindow.paella.lazyLoad) { + let iframeWindow = document.getElementById('{{playerid}}').contentWindow; + if (!iframeWindow.MoodlePaellaPlayer || iframeWindow.document.readyState !== 'complete') { setTimeout(init_{{playerid}}, 20, '{{playerid}}', '{{configurl}}'); } else { - iframeWindow.paella.lazyLoad('playerContainer', { - configUrl: '{{configurl}}', - data: JSON.parse('{{data}}'.replaceAll('"', '"')) - }); + iframeWindow.MoodlePaellaPlayer.initPaella( + '{{configurl}}', + JSON.parse('{{data}}'.replaceAll('"', '"')) + ); } } init_{{playerid}}(); - -</script> - +</script> \ No newline at end of file diff --git a/version.php b/version.php index 03537e488d4f0bcf9675d7547ea83a5cebd1b515..ee89c2e89a7910640c9c5155c5266887a1d36c25 100644 --- a/version.php +++ b/version.php @@ -25,11 +25,11 @@ defined('MOODLE_INTERNAL') || die(); $plugin->maturity = MATURITY_STABLE; -$plugin->release = 'v3.11-r2'; -$plugin->version = 2021101901; // The current plugin version (Date: YYYYMMDDXX). +$plugin->release = 'v3.11-r3'; +$plugin->version = 2022031800; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2020061500; // Requires this Moodle version. $plugin->component = 'filter_opencast'; // Full name of the plugin. $plugin->dependencies = array( 'tool_opencast' => 2021100300, - 'mod_opencast' => 2021091200 + 'mod_opencast' => 2022031800 );