Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
e7d7c2dd
Commit
e7d7c2dd
authored
Jan 12, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call revokeObjectURL in the onclose callback.
This avoids special-casing file streams.
parent
37128979
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
static/galene.js
static/galene.js
+10
-10
No files found.
static/galene.js
View file @
e7d7c2dd
...
...
@@ -911,6 +911,15 @@ async function addFileMedia(file) {
let
c
=
newUpStream
();
c
.
kind
=
'
video
'
;
c
.
stream
=
stream
;
c
.
onclose
=
function
()
{
let
media
=
/** @type{HTMLVideoElement} */
(
document
.
getElementById
(
'
media-
'
+
this
.
id
));
if
(
media
&&
media
.
src
)
{
URL
.
revokeObjectURL
(
media
.
src
);
media
.
src
=
null
;
}
}
stream
.
onaddtrack
=
function
(
e
)
{
let
t
=
e
.
track
;
if
(
t
.
kind
===
'
audio
'
)
{
...
...
@@ -972,12 +981,8 @@ function stopUpMedia(c) {
*/
function
delUpMedia
(
c
)
{
stopUpMedia
(
c
);
try
{
delMedia
(
c
.
id
);
}
catch
(
e
)
{
console
.
warn
(
e
);
}
c
.
close
();
delMedia
(
c
.
id
);
delete
(
serverConnection
.
up
[
c
.
id
]);
setButtonsVisibility
();
}
...
...
@@ -1261,11 +1266,6 @@ function delMedia(id) {
let
media
=
/** @type{HTMLVideoElement} */
(
document
.
getElementById
(
'
media-
'
+
id
));
if
(
media
.
src
)
{
URL
.
revokeObjectURL
(
media
.
src
);
media
.
src
=
null
;
}
media
.
srcObject
=
null
;
mediadiv
.
removeChild
(
peer
);
...
...
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