aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Main.hx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 432a095..aa0a648 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -136,6 +136,10 @@ class Main {
else name = Lang.get("rawVideo");
getRemoteVideoDuration(url, (duration:Float) -> {
+ if (duration == 0) {
+ serverMessage(4, Lang.get("addVideoError"));
+ return;
+ }
send({
type: AddVideo, addVideo: {
item: {
@@ -172,6 +176,7 @@ class Main {
video.src = src;
// TODO catch errors on AddVideo and getRemoteVideoDuration
video.onerror = e -> {
+ if (player.contains(video)) player.removeChild(video);
callback(0);
}
video.onloadedmetadata = () -> {
@@ -294,6 +299,8 @@ class Main {
clientName: guestName.value
}
});
+ ge("#messagebuffer").innerHTML = "";
+ serverMessage(1);
for (message in connected.history) {
addMessage(message.name, message.text, message.time);
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage