aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client-web/source/resource/track.ts14
-rw-r--r--client-web/style/room.sass6
2 files changed, 10 insertions, 10 deletions
diff --git a/client-web/source/resource/track.ts b/client-web/source/resource/track.ts
index 9c337c1..532535e 100644
--- a/client-web/source/resource/track.ts
+++ b/client-web/source/resource/track.ts
@@ -55,14 +55,12 @@ export function new_local_track(info: ProvideInfo, track: TrackHandle, ...extra_
return {
set_destroy(cb) { destroy = cb },
info,
- el: e("div", {},
- create_track_display(
- e("div", { class: `media-${track.kind}` },
- e("button", { class: ["abort", "topright"], onclick: () => destroy() }, "Stop sharing"),
- ...extra_controls
- ),
- track
+ el: create_track_display(
+ e("div", { class: `media-${track.kind}` },
+ e("button", { class: ["abort", "topright"], onclick: () => destroy() }, "Stop sharing"),
+ ...extra_controls
),
+ track
),
destroy() { track.end() },
on_request(_user, _create_channel) {
@@ -74,7 +72,7 @@ export function new_local_track(info: ProvideInfo, track: TrackHandle, ...extra_
function create_track_display(target: HTMLElement, track: TrackHandle): HTMLElement {
const is_video = track.kind == "video"
const is_audio = track.kind == "audio"
-
+
const stream = new MediaStream([track.track])
const media_el = is_video
? document.createElement("video")
diff --git a/client-web/style/room.sass b/client-web/style/room.sass
index cdf9719..45517ff 100644
--- a/client-web/style/room.sass
+++ b/client-web/style/room.sass
@@ -57,9 +57,11 @@
border-radius: 3px
background-color: var(--ac-light)
-.resource-track>div
- border: 2px solid transparent
+.resource-track
border-radius: 4px
+ border: 2px solid transparent
+ box-sizing: border-box
+ transition: border 0.15s
.resource-track.audio-active
border: 2px solid var(--ac-light)