entcore 3.12.1 → 3.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/ng-app.js +7 -7
- package/bundle/ng-app.js.map +1 -1
- package/docker-compose.yml +1 -1
- package/package.json +1 -1
- package/src/template/cgu-lightbox.html +0 -3
- package/src/template/media-library/main.html +1 -1
- package/src/template/recorder.html +2 -1
- package/src/template/video/integration.html +0 -1
- package/src/template/video/loading.html +56 -1
- package/src/template/video/main.html +8 -3
- package/src/template/video/record.html +2 -2
- package/src/template/video/upload.html +47 -1
- package/types/src/ts/directives/navigationGuard.d.ts +14 -0
- package/types/src/ts/navigationGuard.d.ts +2 -0
- package/types/src/ts/notify.d.ts +1 -0
- package/types/src/ts/video/VideoEventTrackerService.d.ts +27 -0
- package/types/src/ts/video/VideoRecorder.d.ts +1 -3
- package/types/src/ts/video/VideoUploadService.d.ts +36 -0
- package/.npmignore +0 -7
package/docker-compose.yml
CHANGED
package/package.json
CHANGED
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
<p class="">
|
|
11
11
|
<span class="no-style">[[content]]</span>
|
|
12
12
|
</p>
|
|
13
|
-
<!--a href="[[linkUrl]]" target="_blank" style="display: inline">
|
|
14
|
-
<span class="no-style ng-scope">[[linkText]]</span>
|
|
15
|
-
</a-->
|
|
16
13
|
<p>
|
|
17
14
|
<input type="checkbox" ng-model="model.accept">
|
|
18
15
|
<i18n>cgu.revalidate.accept</i18n>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<h2>[[title()]]</h2>
|
|
26
26
|
<section class="row media-library">
|
|
27
27
|
<section class="twelve row">
|
|
28
|
-
<div class="tabs heading-tabs"
|
|
28
|
+
<div class="tabs heading-tabs">
|
|
29
29
|
<header ng-repeat="header in headers()" ng-class="{'selected':isSelectedHeader(header)}" ng-click="showHeader(header)" workflow="[[header.worflowKey]]" ng-show="header.visible()">
|
|
30
30
|
<span translate content="[[header.i18Key]]"></span>
|
|
31
31
|
</header>
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
ng-click="switchRecord()"
|
|
44
44
|
ng-disabled="isEncoding() || isUploading()">
|
|
45
45
|
<i class="record-audio" ng-class="{'start': !isRecording(), 'suspend': isRecording()}"></i>
|
|
46
|
-
<span ng-if="
|
|
46
|
+
<span ng-if="isIdle() || isStopped()"><i18n>embed.start.mini</i18n></span>
|
|
47
|
+
<span ng-if="!isIdle() && !isStopped() && !isRecording()"><i18n>embed.resume</i18n></span>
|
|
47
48
|
<span ng-if="isRecording()"><i18n>embed.suspend</i18n></span>
|
|
48
49
|
</button>
|
|
49
50
|
|
|
@@ -1 +1,56 @@
|
|
|
1
|
-
<div
|
|
1
|
+
<div class="split-screen" ng-class="{ split: display.editedDocument !== undefined }">
|
|
2
|
+
<div class="loading-list drop-zone">
|
|
3
|
+
<ul>
|
|
4
|
+
<li ng-repeat="doc in upload.documents"
|
|
5
|
+
ng-click="openCompression(doc)"
|
|
6
|
+
ng-class="{
|
|
7
|
+
'image-file': doc.isEditableImage && doc.uploadStatus === 'loaded',
|
|
8
|
+
'loading': doc.uploadStatus === 'loading',
|
|
9
|
+
selected: doc === display.editedDocument
|
|
10
|
+
}"
|
|
11
|
+
>
|
|
12
|
+
<div class="icon">
|
|
13
|
+
<i class="[[doc.role()]]"></i>
|
|
14
|
+
<i tooltip-check="doc.isEditableImage && doc.uploadStatus === 'loaded'"
|
|
15
|
+
tooltip="medialibrary.editImage.tooltip" class="edit" ng-if="doc.isEditableImage && doc.uploadStatus === 'loaded'"></i>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="title">[[doc.name || doc.title]]</div>
|
|
18
|
+
<div class="status-infos">
|
|
19
|
+
<span class="small-text horizontal-margin">
|
|
20
|
+
[[doc.size]]
|
|
21
|
+
</span>
|
|
22
|
+
<i ng-class="{
|
|
23
|
+
loading: doc.uploadStatus === 'loading',
|
|
24
|
+
loaded: doc.uploadStatus === 'loaded',
|
|
25
|
+
failed: doc.uploadStatus === 'failed'
|
|
26
|
+
}"></i>
|
|
27
|
+
</div>
|
|
28
|
+
<i class="close" ng-click="abortOrDelete(doc)"></i>
|
|
29
|
+
</li>
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="row zero-mobile">
|
|
34
|
+
<div class="one cell"> <!-- Marge d'Alizée, voir #44014 --></div>
|
|
35
|
+
|
|
36
|
+
<div class="five cell">
|
|
37
|
+
<em class="small-text"><i18n>video.upload.supported.formats</i18n></em>
|
|
38
|
+
<br>
|
|
39
|
+
<em class="small-text"><i18n>video.upload.supported.weight</i18n></em>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="six cell">
|
|
42
|
+
<button class="right-magnet" ng-click="confirmImport()" ng-disabled="!canConfirmImport()" type="button"><i18n>import</i18n></button>
|
|
43
|
+
<button class="right-magnet cancel" ng-click="cancelUpload()" type="button"><i18n>cancel</i18n></button>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="twelve row zero-desktop">
|
|
47
|
+
<p>
|
|
48
|
+
<em class="small-text"><i18n>video.upload.supported.formats</i18n></em>
|
|
49
|
+
<br>
|
|
50
|
+
<em class="small-text"><i18n>video.upload.supported.weight</i18n></em>
|
|
51
|
+
</p>
|
|
52
|
+
<div class="twelve cell">
|
|
53
|
+
<button class="right-magnet" ng-click="confirmImport()" ng-disabled="!canConfirmImport()" type="button"><i18n>import</i18n></button>
|
|
54
|
+
<button class="right-magnet cancel" ng-click="cancelUpload()" type="button"><i18n>cancel</i18n></button>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
~
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
|
-
<lightbox show="show" on-close="cancel();" navigation-guard="true">
|
|
21
|
+
<lightbox show="show" on-close="cancel();" navigation-guard="true" guard-root="videoCapturedGuard">
|
|
22
22
|
<style>
|
|
23
23
|
header > span.beta-feature:after {
|
|
24
24
|
color: #FF8500;
|
|
@@ -32,8 +32,13 @@
|
|
|
32
32
|
<div class="embed-container">
|
|
33
33
|
<h2>[[title()]]</h2>
|
|
34
34
|
<section class="twelve row">
|
|
35
|
-
<section class="tabs heading-tabs"
|
|
36
|
-
<header
|
|
35
|
+
<section class="tabs heading-tabs">
|
|
36
|
+
<header workflow="[[header.worflowKey]]"
|
|
37
|
+
navigation-trigger="showHeader(header)"
|
|
38
|
+
navigation-trigger-param="{onEvent:'click', guardMessageKey:'video.capture.guard.text', rootGuardId:'videoCapturedGuard'}"
|
|
39
|
+
ng-repeat="header in headers()"
|
|
40
|
+
ng-class="{'selected':isSelectedHeader(header)}"
|
|
41
|
+
ng-show="header.visible()">
|
|
37
42
|
<span translate content="[[header.i18Key]]" ng-class="getClassOf(header)"></span>
|
|
38
43
|
</header>
|
|
39
44
|
</section>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div ng-controller="VideoController" class="video"
|
|
1
|
+
<div ng-controller="VideoController" class="video" custom-guard="guard">
|
|
2
2
|
<div class="recorder--video">
|
|
3
3
|
<div ng-if="isIncompatible() && !isIncompatibleDevice()" class="browser" style="box-shadow:none">
|
|
4
4
|
<h3><i18n>embed.video.incompatible</i18n></h3>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<p><i18n>video.msg</i18n></p>
|
|
65
65
|
<div class="recorder--timer">
|
|
66
66
|
<i class="rec" ng-if="isRecording()"></i>
|
|
67
|
-
<span>[[recordTime]] / [[pad(
|
|
67
|
+
<span>[[recordTime]] / [[pad(recordMaxTime)]]:00</span>
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
|
70
70
|
<div class="recorder--viewer" ng-show="isCameraVisible()">
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
~ Copyright © WebServices pour l'Éducation, 2014
|
|
3
|
+
~
|
|
4
|
+
~ This file is part of ENT Core. ENT Core is a versatile ENT engine based on the JVM.
|
|
5
|
+
~
|
|
6
|
+
~ This program is free software; you can redistribute it and/or modify
|
|
7
|
+
~ it under the terms of the GNU Affero General Public License as
|
|
8
|
+
~ published by the Free Software Foundation (version 3 of the License).
|
|
9
|
+
~
|
|
10
|
+
~ For the sake of explanation, any module that communicate over native
|
|
11
|
+
~ Web protocols, such as HTTP, with ENT Core is outside the scope of this
|
|
12
|
+
~ license and could be license under its own terms. This is merely considered
|
|
13
|
+
~ normal use of ENT Core, and does not fall under the heading of "covered work".
|
|
14
|
+
~
|
|
15
|
+
~ This program is distributed in the hope that it will be useful,
|
|
16
|
+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
18
|
+
~
|
|
19
|
+
-->
|
|
20
|
+
|
|
21
|
+
<p>
|
|
22
|
+
<em class="twelve cell small-text"><i18n>video.upload.supported.formats</i18n></em>
|
|
23
|
+
<em class="twelve cell small-text"><i18n>video.upload.supported.weight</i18n></em>
|
|
24
|
+
</p>
|
|
25
|
+
<div class="row media-library">
|
|
26
|
+
<div class="drop-zone import-files">
|
|
27
|
+
<article class="drop flex-row align-center">
|
|
28
|
+
<i class="two cloud-upload"></i>
|
|
29
|
+
<div class="ten help">
|
|
30
|
+
<em><i18n>video.drop.help2</i18n></em>
|
|
31
|
+
</div>
|
|
32
|
+
</article>
|
|
33
|
+
<article class="default flex-row align-center absolute-position">
|
|
34
|
+
<div class="three select-file">
|
|
35
|
+
<div class="hidden-content">
|
|
36
|
+
<input class="upload-input" type="file" files-input-change="importFiles()" ng-model="upload.files" />
|
|
37
|
+
</div>
|
|
38
|
+
<button class="file-button no-margin" translate content="library.file.choose" ng-click="triggerIpnutFileClick($event)"></button>
|
|
39
|
+
</div>
|
|
40
|
+
<i class="two cloud-upload"></i>
|
|
41
|
+
<div class="seven help">
|
|
42
|
+
<em><i18n>video.drop.help</i18n></em>
|
|
43
|
+
</div>
|
|
44
|
+
</article>
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
@@ -7,4 +7,18 @@ export declare const inputGuardDirective: Directive;
|
|
|
7
7
|
export declare const dirtyGuardDirective: Directive;
|
|
8
8
|
export declare const documentGuardDirective: Directive;
|
|
9
9
|
export declare const customGuardDirective: Directive;
|
|
10
|
+
/**
|
|
11
|
+
* Usage:
|
|
12
|
+
*
|
|
13
|
+
* <div navigation-trigger="doSomethingUsefulWhenNavigationConfirmed()"
|
|
14
|
+
*
|
|
15
|
+
* navigation-trigger-param="{onEvent:['click','focus'], confirmMessageKey:'my.msg.key', rootGuardId:'myGuardId'}">
|
|
16
|
+
*
|
|
17
|
+
* </div>
|
|
18
|
+
*
|
|
19
|
+
* @param navigation-trigger-param [optional]
|
|
20
|
+
* @values onEvent to specify one or more event that effectively trigger the guard,
|
|
21
|
+
* Set confirmMessageKey to set a i18n for the confirm dialog message,
|
|
22
|
+
* Set rootGuardId to trigger only the guard with specified the ID (useful when nesting guards).
|
|
23
|
+
*/
|
|
10
24
|
export declare const navigationTrigger: Directive;
|
package/types/src/ts/notify.d.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This utility class allows sending usage data events to the server.
|
|
3
|
+
*/
|
|
4
|
+
export declare class VideoEventTrackerService {
|
|
5
|
+
videos: any[];
|
|
6
|
+
/**
|
|
7
|
+
* Generates a new FormData containing generic video tracking metadata :
|
|
8
|
+
* - device,
|
|
9
|
+
* - browser,
|
|
10
|
+
* - url,
|
|
11
|
+
* - app
|
|
12
|
+
* @returns FormData
|
|
13
|
+
*/
|
|
14
|
+
static asFormData(): FormData;
|
|
15
|
+
/** Send a VIDEO_VIEW or VIDEO_PLAY event to the server. */
|
|
16
|
+
private generateEvent(type, videoId, source);
|
|
17
|
+
private onPlay(event);
|
|
18
|
+
private generateViewEventFor(video);
|
|
19
|
+
/**
|
|
20
|
+
* Look for every <video> tag in the HTML document, and the VIDEO_VIEW and VIDEO_PLAY events.
|
|
21
|
+
* If applied to an angular scope, it will auto-release the listeners and prevent memory leaks.
|
|
22
|
+
* Otherwise, you must call untrackAll() to release the listeners.
|
|
23
|
+
*/
|
|
24
|
+
trackAll($scope: any): void;
|
|
25
|
+
/** Release event listeners previously put on <video> tags, @see trackAll() */
|
|
26
|
+
untrackAll(): void;
|
|
27
|
+
}
|
|
@@ -7,7 +7,6 @@ export declare class VideoRecorder {
|
|
|
7
7
|
private mediaRecorder;
|
|
8
8
|
private recordMimeType;
|
|
9
9
|
private recorded;
|
|
10
|
-
private id;
|
|
11
10
|
private mode;
|
|
12
11
|
constraints: MediaStreamConstraints;
|
|
13
12
|
onPlayChanged: Subject<Event>;
|
|
@@ -23,7 +22,7 @@ export declare class VideoRecorder {
|
|
|
23
22
|
private prepareRecord();
|
|
24
23
|
stopStreaming(): void;
|
|
25
24
|
startStreaming(notAllowedCb?: () => void): Promise<void>;
|
|
26
|
-
|
|
25
|
+
generateVideoId(): string;
|
|
27
26
|
resume(): void;
|
|
28
27
|
canStartRecording(callback: any): Promise<void>;
|
|
29
28
|
startRecording(): Promise<void>;
|
|
@@ -31,5 +30,4 @@ export declare class VideoRecorder {
|
|
|
31
30
|
stopRecording(preparePlay: boolean): void;
|
|
32
31
|
getBuffer(): Blob;
|
|
33
32
|
clearBuffer(prepareRecord: boolean): void;
|
|
34
|
-
upload(filename: any, recordTime: any, callback: any, errCallback: any): Promise<void>;
|
|
35
33
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare type UploadResult = {
|
|
2
|
+
data: {
|
|
3
|
+
processid: string;
|
|
4
|
+
state: "running" | "succeed" | "error";
|
|
5
|
+
/** ID of the video file. */
|
|
6
|
+
videoid?: string;
|
|
7
|
+
/** size of the video, in bytes. */
|
|
8
|
+
videosize: number;
|
|
9
|
+
/** ID of the video document in Workspace. */
|
|
10
|
+
videoworkspaceid: string;
|
|
11
|
+
/** Error code (i18n key), when state==="error" */
|
|
12
|
+
code?: string;
|
|
13
|
+
};
|
|
14
|
+
status: number;
|
|
15
|
+
statusText: string;
|
|
16
|
+
headers: any;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* This utility class allows uploading videos to the server, as documents.
|
|
20
|
+
* Each video can be either recorded (Blob) or chosen from the local storage (File).
|
|
21
|
+
* The server will process each uploaded video and convert them to a streamable format.
|
|
22
|
+
*/
|
|
23
|
+
export declare class VideoUploadService {
|
|
24
|
+
private _maxWeight;
|
|
25
|
+
private _maxDuration;
|
|
26
|
+
private _acceptVideoUploadExtensions;
|
|
27
|
+
private _initialized;
|
|
28
|
+
readonly maxWeight: number;
|
|
29
|
+
readonly maxDuration: number;
|
|
30
|
+
private safeValueOf(obj, key, defaultValue);
|
|
31
|
+
/** Awaits for loading the video public configuration. */
|
|
32
|
+
initialize(): Promise<void>;
|
|
33
|
+
getValidExtensions(): string[];
|
|
34
|
+
checkValidExtension(ext: string): boolean;
|
|
35
|
+
upload(file: Blob, filename: string, captation: boolean, duration?: string | number): Promise<UploadResult>;
|
|
36
|
+
}
|