fix auto play
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
"svelte": "^2.13.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"rrweb": "file:../rrweb"
|
||||
"rrweb": "^0.6.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
if (currentTime > 0) {
|
||||
replayer.resume(currentTime);
|
||||
} else {
|
||||
this.set({ isPlaying: true });
|
||||
replayer.play(currentTime);
|
||||
}
|
||||
},
|
||||
@@ -135,8 +136,10 @@
|
||||
onupdate({ changed, current, previous }) {
|
||||
if (current.replayer && !previous) {
|
||||
// auto play
|
||||
this.set({ isPlaying: true });
|
||||
this.play();
|
||||
setTimeout(() => {
|
||||
this.set({ isPlaying: true });
|
||||
}, 0);
|
||||
current.replayer.play(0);
|
||||
current.replayer.on('pause', () => {
|
||||
this.set({ isPlaying: false });
|
||||
});
|
||||
|
||||
@@ -64,20 +64,8 @@
|
||||
position: relative;
|
||||
background: white;
|
||||
float: left;
|
||||
clear: both;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.rr-player::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
box-shadow: 0 24px 48px rgba(17, 16, 62, 0.12);
|
||||
mix-blend-mode: multiply;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.rr-player__frame {
|
||||
|
||||
Reference in New Issue
Block a user