Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
6f6cb1db
Commit
6f6cb1db
authored
Oct 08, 2024
by
Skye Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove audio node
parent
d218d287
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
jensen.js
src/jensen.js
+7
-0
No files found.
src/jensen.js
View file @
6f6cb1db
...
@@ -721,6 +721,11 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress)
...
@@ -721,6 +721,11 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress)
}
}
}
}
function
removeAudio
()
{
const
audio
=
document
.
getElementById
(
'test_audio'
);
audio
&&
audio
.
remove
();
}
document
.
addEventListener
(
'visibilitychange'
,
visibilitychange
);
document
.
addEventListener
(
'visibilitychange'
,
visibilitychange
);
let
flen
=
0
;
let
flen
=
0
;
...
@@ -730,11 +735,13 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress)
...
@@ -730,11 +735,13 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress)
ondata
(
msg
.
body
);
ondata
(
msg
.
body
);
if
(
flen
>=
length
)
{
if
(
flen
>=
length
)
{
document
.
removeEventListener
(
'visibilitychange'
,
visibilitychange
);
document
.
removeEventListener
(
'visibilitychange'
,
visibilitychange
);
removeAudio
();
// return OK indicates all file blocks received
// return OK indicates all file blocks received
return
'OK'
;
return
'OK'
;
}
}
}
else
{
}
else
{
document
.
removeEventListener
(
'visibilitychange'
,
visibilitychange
);
document
.
removeEventListener
(
'visibilitychange'
,
visibilitychange
);
removeAudio
();
ondata
(
'fail'
);
ondata
(
'fail'
);
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment