Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
webpage_recorder
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
62e003a5cc5673ba4e8ffdfcba084d5408b14159
62e003a5
1 parent
f1b8ad1b
close app 5s later after closing pipe ,to let the ffmpeg flush mp4 moov
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
11 行增加
和
3 行删除
main.js
main.js
查看文件 @
62e003a
...
...
@@ -23,9 +23,15 @@ ipc.on('close-main-window', function () {
var
lastRenderTime
=
0
;
ipc
.
on
(
'to-main-timer'
,
function
()
{
if
(
Date
.
now
()
-
lastRenderTime
>=
10000
){
if
(
Date
.
now
()
-
lastRenderTime
>=
10000
)
{
if
(
streamIn
)
{
streamIn
.
end
();
streamIn
=
null
;
}
if
(
Date
.
now
()
-
lastRenderTime
>=
15000
)
{
quit
();
}
}
}
});
var
subarg
=
require
(
'subarg'
);
...
...
@@ -113,7 +119,9 @@ win.webContents.executeJavaScript('const ipcToMain = require("electron").ipcRend
streamIn
=
null
;
}
console
.
log
(
"done"
)
win
.
webContents
.
executeJavaScript
(
'require("electron").ipcRenderer.send("close-main-window")'
);
if
(
elapsed
>
duration
+
5000
){
//delay 5s after closing pipe ,then close
win
.
webContents
.
executeJavaScript
(
'require("electron").ipcRenderer.send("close-main-window")'
);
}
}
else
{
streamIn
.
write
(
image
.
getBitmap
());
...
...
请
注册
或
登录
后发表评论