style(rebuild.ts snapshot.ts): format code
This commit is contained in:
@@ -203,12 +203,15 @@ function buildNode(
|
||||
(node as HTMLElement).style.height = value;
|
||||
}
|
||||
if (name === 'rr_mediaCurrentTime') {
|
||||
(node as HTMLMediaElement).currentTime = n.attributes.rr_mediaCurrentTime as number
|
||||
(node as HTMLMediaElement).currentTime = n.attributes
|
||||
.rr_mediaCurrentTime as number;
|
||||
}
|
||||
if (name === 'rr_mediaState') {
|
||||
switch (value) {
|
||||
case 'played':
|
||||
(node as HTMLMediaElement).play().catch(e => console.warn("media playback error", e));
|
||||
(node as HTMLMediaElement)
|
||||
.play()
|
||||
.catch((e) => console.warn('media playback error', e));
|
||||
break;
|
||||
case 'paused':
|
||||
(node as HTMLMediaElement).pause();
|
||||
|
||||
@@ -363,8 +363,8 @@ function serializeNode(
|
||||
} = options;
|
||||
// Only record root id when document object is not the base document
|
||||
let rootId: number | undefined;
|
||||
if (((doc as unknown) as INode).__sn) {
|
||||
const docId = ((doc as unknown) as INode).__sn.id;
|
||||
if ((doc as unknown as INode).__sn) {
|
||||
const docId = (doc as unknown as INode).__sn.id;
|
||||
rootId = docId === 1 ? undefined : docId;
|
||||
}
|
||||
switch (n.nodeType) {
|
||||
@@ -464,7 +464,7 @@ function serializeNode(
|
||||
attributes.rr_mediaState = (n as HTMLMediaElement).paused
|
||||
? 'paused'
|
||||
: 'played';
|
||||
attributes.rr_mediaCurrentTime = (n as HTMLMediaElement).currentTime
|
||||
attributes.rr_mediaCurrentTime = (n as HTMLMediaElement).currentTime;
|
||||
}
|
||||
// scroll
|
||||
if ((n as HTMLElement).scrollLeft) {
|
||||
|
||||
Reference in New Issue
Block a user