@media-quest/engine 0.0.29 → 0.0.31
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/dist/public-api.d.ts +85 -42
- package/dist/public-api.js +365 -187
- package/dist/public-api.js.map +1 -1
- package/package.json +1 -1
- package/src/Delement/DButton.ts +25 -0
- package/src/Delement/DElement.dto.ts +6 -5
- package/src/Delement/DElement.ts +191 -88
- package/src/Delement/DImg.ts +48 -39
- package/src/Delement/DStyle.ts +332 -165
- package/src/Delement/DText.ts +23 -13
- package/src/Delement/Ddiv.ts +44 -25
- package/src/Delement/button-click-action.ts +42 -35
- package/src/Delement/css.spec.ts +40 -36
- package/src/Delement/css.ts +56 -46
- package/src/Delement/element-factory.ts +49 -40
- package/src/engine/SchemaEngine.ts +155 -150
- package/src/engine/history-que.spec.ts +67 -67
- package/src/engine/next-que.spec.ts +121 -121
- package/src/page/Page.ts +190 -182
- package/src/page/task-manager.ts +263 -240
- package/src/page/task-state.ts +65 -55
- package/src/public-api.ts +25 -26
- package/src/VERSION.ts +0 -1
- package/src/page/page-component.ts +0 -113
package/src/page/task-manager.ts
CHANGED
|
@@ -1,240 +1,263 @@
|
|
|
1
|
-
import { DTimestamp } from "../common/DTimestamp";
|
|
2
|
-
import { Task } from "./task";
|
|
3
|
-
import { DStyle, PStyle } from "../Delement/DStyle";
|
|
4
|
-
import { ScaleService } from "../engine/scale";
|
|
5
|
-
import { TaskState } from "./task-state";
|
|
6
|
-
|
|
7
|
-
export class TaskManager {
|
|
8
|
-
private readonly TAG = "[TaskManager]: ";
|
|
9
|
-
private readonly videoElement = document.createElement("video");
|
|
10
|
-
private readonly audioElement = document.createElement("audio");
|
|
11
|
-
private readonly showConsoleLogs = false;
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.videoElement.
|
|
32
|
-
this.
|
|
33
|
-
this.audioElement.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if (
|
|
163
|
-
this.
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
this.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
this.
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
1
|
+
import { DTimestamp } from "../common/DTimestamp";
|
|
2
|
+
import { Task } from "./task";
|
|
3
|
+
import { DStyle, PStyle } from "../Delement/DStyle";
|
|
4
|
+
import { ScaleService } from "../engine/scale";
|
|
5
|
+
import { TaskState } from "./task-state";
|
|
6
|
+
|
|
7
|
+
export class TaskManager {
|
|
8
|
+
private readonly TAG = "[TaskManager]: ";
|
|
9
|
+
private readonly videoElement = document.createElement("video");
|
|
10
|
+
private readonly audioElement = document.createElement("audio");
|
|
11
|
+
private readonly showConsoleLogs = false;
|
|
12
|
+
private readonly defaultVideoStyles: PStyle = {
|
|
13
|
+
height: 50,
|
|
14
|
+
width: 100,
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0,
|
|
17
|
+
};
|
|
18
|
+
private videoStyles: PStyle;
|
|
19
|
+
private runningTask: { task: Task; startedAt: DTimestamp } | false = false;
|
|
20
|
+
private taskList: Array<Task> = [];
|
|
21
|
+
private delayRef: number | false = false;
|
|
22
|
+
|
|
23
|
+
clear() {
|
|
24
|
+
if (this.showConsoleLogs) console.log(this.TAG + "CLEAR");
|
|
25
|
+
if (typeof this.delayRef === "number") {
|
|
26
|
+
window.clearTimeout(this.delayRef);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
this.pauseVideo();
|
|
30
|
+
this.pauseAudio();
|
|
31
|
+
this.videoElement.removeAttribute("src");
|
|
32
|
+
this.videoElement.load();
|
|
33
|
+
this.audioElement.removeAttribute("src");
|
|
34
|
+
this.audioElement.load();
|
|
35
|
+
this.taskList = [];
|
|
36
|
+
this.runningTask = false;
|
|
37
|
+
this.hideVideo();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
getState(): TaskState {
|
|
41
|
+
const c = this.runningTask;
|
|
42
|
+
const isGifMode = this.videoElement.loop;
|
|
43
|
+
const audioIsPlaying = c && c.task.kind === "play-audio-task" && !this.audioElement.paused;
|
|
44
|
+
const videoIsPlaying = c && c.task.kind === "play-video-task" && !this.videoElement.paused;
|
|
45
|
+
const blockResponseButton = c && c.task.blockResponseButton;
|
|
46
|
+
const blockAudio = c && c.task.blockAudio;
|
|
47
|
+
const blockVideo = c && c.task.blockVideo;
|
|
48
|
+
const blockFormInput = c && c.task.blockFormInput;
|
|
49
|
+
const videoIsMuted = this.videoElement.muted;
|
|
50
|
+
|
|
51
|
+
const videoIsAtTheEnd = this.videoElement.ended;
|
|
52
|
+
let videoPlayState: TaskState["videoPlayState"] = videoIsMuted ? "paused-and-muted" : "paused";
|
|
53
|
+
|
|
54
|
+
if (videoIsPlaying) {
|
|
55
|
+
videoPlayState = videoIsMuted ? "playing-and-muted" : "playing";
|
|
56
|
+
}
|
|
57
|
+
if (videoIsAtTheEnd) {
|
|
58
|
+
videoPlayState = videoIsMuted ? "ended-and-muted" : "ended";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
audioIsPlaying,
|
|
63
|
+
videoPlayState,
|
|
64
|
+
isGifMode,
|
|
65
|
+
blockFormInput,
|
|
66
|
+
blockResponseButton,
|
|
67
|
+
blockAudio,
|
|
68
|
+
blockVideo,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
constructor(
|
|
73
|
+
private readonly mediaLayer: HTMLDivElement,
|
|
74
|
+
private readonly scale: ScaleService,
|
|
75
|
+
private readonly onError: (error: string) => void,
|
|
76
|
+
) {
|
|
77
|
+
this.hideVideo();
|
|
78
|
+
this.mediaLayer.appendChild(this.videoElement);
|
|
79
|
+
this.mediaLayer.appendChild(this.audioElement);
|
|
80
|
+
this.videoStyles = this.defaultVideoStyles;
|
|
81
|
+
DStyle.normalize(this.videoElement);
|
|
82
|
+
DStyle.applyStyles(this.videoElement, this.videoStyles, this.scale.scale);
|
|
83
|
+
|
|
84
|
+
this.videoElement.onended = () => {
|
|
85
|
+
const next = this.getNextTask();
|
|
86
|
+
if (next) {
|
|
87
|
+
this.execute(next);
|
|
88
|
+
} else {
|
|
89
|
+
this.runningTask = false;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
this.videoElement.onerror = (e) => {
|
|
93
|
+
if (this.videoElement.src !== "") {
|
|
94
|
+
onError("Error playing video: " + this.videoElement.src);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
this.audioElement.onended = () => {
|
|
99
|
+
const next = this.getNextTask();
|
|
100
|
+
if (next) {
|
|
101
|
+
this.execute(next);
|
|
102
|
+
} else {
|
|
103
|
+
this.runningTask = false;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
execute(task: Task): boolean {
|
|
109
|
+
// console.log("EXECUTE TASK" + task.kind);
|
|
110
|
+
const curr = this.runningTask;
|
|
111
|
+
// TODO Background-task should be handeled as its own kind or something.
|
|
112
|
+
let isBackgroundTask = false;
|
|
113
|
+
|
|
114
|
+
// Check if we should remove the current task.
|
|
115
|
+
if (curr && Task.shallRemoveCurrent(task) && Task.notEq(curr.task, task)) {
|
|
116
|
+
this.pauseAudio();
|
|
117
|
+
this.pauseVideo();
|
|
118
|
+
this.runningTask = false;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (!curr) {
|
|
122
|
+
this.runningTask = { startedAt: DTimestamp.now(), task: task };
|
|
123
|
+
} else if (Task.notEq(curr.task, task)) {
|
|
124
|
+
this.runningTask = { startedAt: DTimestamp.now(), task: task };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (task.priority === "replace-all" || task.priority === "replace-queue") {
|
|
128
|
+
this.taskList = [];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// STARTING PLAY VIDEO
|
|
132
|
+
if (task.kind === "play-video-task") {
|
|
133
|
+
this.showVideo();
|
|
134
|
+
// this.pauseAudio()
|
|
135
|
+
this.loadVideo(task.url);
|
|
136
|
+
if (task.loop) {
|
|
137
|
+
this.videoElement.loop = true;
|
|
138
|
+
isBackgroundTask = true;
|
|
139
|
+
} else {
|
|
140
|
+
this.videoElement.loop = false;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
try {
|
|
144
|
+
this.videoElement.play();
|
|
145
|
+
} catch (e) {
|
|
146
|
+
console.error(e);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// STARTING PLAY AUDIO
|
|
151
|
+
if (task.kind === "play-audio-task") {
|
|
152
|
+
if (!this.videoElement.loop) {
|
|
153
|
+
this.pauseVideo();
|
|
154
|
+
}
|
|
155
|
+
if (task.url !== this.audioElement.src) {
|
|
156
|
+
this.audioElement.src = task.url;
|
|
157
|
+
}
|
|
158
|
+
this.audioElement.play();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (task.kind === "delay-task") {
|
|
162
|
+
if (typeof this.delayRef === "number") {
|
|
163
|
+
window.clearTimeout(this.delayRef);
|
|
164
|
+
}
|
|
165
|
+
this.delayRef = window.setTimeout(() => {
|
|
166
|
+
const next = this.getNextTask();
|
|
167
|
+
if (next) {
|
|
168
|
+
this.execute(next);
|
|
169
|
+
} else {
|
|
170
|
+
this.runningTask = false;
|
|
171
|
+
}
|
|
172
|
+
}, task.duration);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (isBackgroundTask) {
|
|
176
|
+
const startNextTask = this.getNextTask();
|
|
177
|
+
if (startNextTask) {
|
|
178
|
+
this.execute(startNextTask);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
setVideoStyles(styles: PStyle) {
|
|
186
|
+
this.videoStyles = { ...styles };
|
|
187
|
+
DStyle.applyStyles(this.videoElement, this.videoStyles, this.scale.scale);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
autoPlaySequence(tasks: Task[]) {
|
|
191
|
+
this.taskList = [...tasks];
|
|
192
|
+
const next = this.getNextTask();
|
|
193
|
+
if (next) {
|
|
194
|
+
this.execute(next);
|
|
195
|
+
if (next.kind === "play-video-task" && next.loop) {
|
|
196
|
+
this.videoElement.loop = true;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
loadVideo(url: string) {
|
|
202
|
+
// console.log("LOAD VIDEO " + !!url + " ");
|
|
203
|
+
if (this.videoElement.src !== url) {
|
|
204
|
+
this.videoElement.src = url;
|
|
205
|
+
}
|
|
206
|
+
this.showVideo();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
private playVideoElement() {
|
|
210
|
+
this.videoElement
|
|
211
|
+
.play()
|
|
212
|
+
.then(() => {})
|
|
213
|
+
.catch((e) => {
|
|
214
|
+
console.log(e);
|
|
215
|
+
this.onError("Error playing video.");
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
private showVideo() {
|
|
220
|
+
this.videoElement.style.display = "block";
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
private hideVideo() {
|
|
224
|
+
this.videoElement.style.display = "none";
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
pauseVideo() {
|
|
228
|
+
try {
|
|
229
|
+
if (!this.videoElement.loop) {
|
|
230
|
+
this.videoElement.pause();
|
|
231
|
+
}
|
|
232
|
+
} catch (e) {
|
|
233
|
+
console.log(e);
|
|
234
|
+
this.onError("Error pausing video.");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
pauseAudio() {
|
|
239
|
+
try {
|
|
240
|
+
if (!this.audioElement.loop) {
|
|
241
|
+
this.audioElement.pause();
|
|
242
|
+
}
|
|
243
|
+
} catch (e) {
|
|
244
|
+
console.log(e);
|
|
245
|
+
this.onError("Error pausing audio.");
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
private getNextTask(): Task | false {
|
|
250
|
+
// console.log("Getting next task.");
|
|
251
|
+
// console.log(this.taskList);
|
|
252
|
+
const first = this.taskList.shift();
|
|
253
|
+
return first ?? false;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
muteVideo() {
|
|
257
|
+
this.videoElement.muted = true;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
unMuteVideo() {
|
|
261
|
+
this.videoElement.muted = false;
|
|
262
|
+
}
|
|
263
|
+
}
|
package/src/page/task-state.ts
CHANGED
|
@@ -1,55 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (curr.
|
|
42
|
-
diff.
|
|
43
|
-
}
|
|
44
|
-
if (curr.
|
|
45
|
-
diff.
|
|
46
|
-
}
|
|
47
|
-
if (curr.
|
|
48
|
-
diff.
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
import { DTimestamp } from "../common/DTimestamp";
|
|
2
|
+
import diff = DTimestamp.diff;
|
|
3
|
+
|
|
4
|
+
export type TaskState = {
|
|
5
|
+
audioIsPlaying: boolean;
|
|
6
|
+
isGifMode: boolean;
|
|
7
|
+
videoPlayState:
|
|
8
|
+
| "playing"
|
|
9
|
+
| "paused"
|
|
10
|
+
| "ended"
|
|
11
|
+
| "playing-and-muted"
|
|
12
|
+
| "paused-and-muted"
|
|
13
|
+
| "ended-and-muted";
|
|
14
|
+
blockFormInput: boolean;
|
|
15
|
+
blockResponseButton: boolean;
|
|
16
|
+
blockAudio: boolean;
|
|
17
|
+
blockVideo: boolean;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type TaskStateDiff = Partial<TaskState> & { __diffed__: true };
|
|
21
|
+
export const TaskState = {
|
|
22
|
+
eq: (a: TaskState, b: TaskState) => {
|
|
23
|
+
return (
|
|
24
|
+
a.audioIsPlaying === b.audioIsPlaying &&
|
|
25
|
+
a.isGifMode === b.isGifMode &&
|
|
26
|
+
a.videoPlayState === b.videoPlayState &&
|
|
27
|
+
a.blockFormInput === b.blockFormInput &&
|
|
28
|
+
a.blockResponseButton === b.blockResponseButton &&
|
|
29
|
+
a.blockAudio === b.blockAudio &&
|
|
30
|
+
a.blockVideo === b.blockVideo
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
getDiff: (curr: TaskState, prev: TaskState | false): TaskStateDiff => {
|
|
35
|
+
if (prev === false) {
|
|
36
|
+
return curr as TaskStateDiff;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const diff = {} as TaskStateDiff;
|
|
40
|
+
|
|
41
|
+
if (curr.audioIsPlaying !== prev.audioIsPlaying) {
|
|
42
|
+
diff.audioIsPlaying = curr.audioIsPlaying;
|
|
43
|
+
}
|
|
44
|
+
if (curr.isGifMode !== prev.isGifMode) {
|
|
45
|
+
diff.isGifMode = curr.isGifMode;
|
|
46
|
+
}
|
|
47
|
+
if (curr.videoPlayState !== prev.videoPlayState) {
|
|
48
|
+
diff.videoPlayState = curr.videoPlayState;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (curr.blockFormInput !== prev.blockFormInput) {
|
|
52
|
+
diff.blockFormInput = curr.blockFormInput;
|
|
53
|
+
}
|
|
54
|
+
if (curr.blockResponseButton !== prev.blockResponseButton) {
|
|
55
|
+
diff.blockResponseButton = curr.blockResponseButton;
|
|
56
|
+
}
|
|
57
|
+
if (curr.blockAudio !== prev.blockAudio) {
|
|
58
|
+
diff.blockAudio = curr.blockAudio;
|
|
59
|
+
}
|
|
60
|
+
if (curr.blockVideo !== prev.blockVideo) {
|
|
61
|
+
diff.blockVideo = curr.blockVideo;
|
|
62
|
+
}
|
|
63
|
+
return diff;
|
|
64
|
+
},
|
|
65
|
+
};
|