create-fuzionx 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fuzionx",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "Create a new FuzionX application — npx create-fuzionx my-app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,8 +9,8 @@
9
9
  "test": "vitest run"
10
10
  },
11
11
  "dependencies": {
12
- "@fuzionx/framework": "^0.1.51",
13
- "@fuzionx/client": "^0.1.51",
12
+ "@fuzionx/framework": "^0.1.52",
13
+ "@fuzionx/client": "^0.1.52",
14
14
  "joi": "^18.1.1"
15
15
  },
16
16
  "devDependencies": {
@@ -4,7 +4,7 @@
4
4
  "description": "Vue.js 3 SPA + Tera SSR 하이브리드. WASM 암호화 통신.",
5
5
  "features": ["auth", "board", "i18n", "asp", "wasm"],
6
6
  "dependencies": {
7
- "@fuzionx/client": "^0.1.51"
7
+ "@fuzionx/client": "^0.1.52"
8
8
  },
9
9
  "devDependencies": {},
10
10
  "spaDevDependencies": {
@@ -9,7 +9,7 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@fuzionx/player": "^0.1.51",
12
+ "@fuzionx/player": "^0.1.52",
13
13
  "pinia": "^3.0.4",
14
14
  "vue": "^3.5.0",
15
15
  "vue-router": "^4.5.0"
@@ -130,7 +130,7 @@
130
130
  <div class="live-chat-input-area">
131
131
  <input id="chat-input" type="text" class="form-input" placeholder="{{ t(key="live.chat_placeholder", default="메시지 입력...") }}" style="flex:1;" />
132
132
  <button class="btn btn-primary" style="padding:.4rem .75rem;" onclick="sendChat()">{{ t(key="live.send", default="전송") }}</button>
133
- </div>
133
+ </div>
134
134
  </aside>
135
135
  </div>
136
136
  {% endblock %}
@@ -148,9 +148,12 @@ let connection = null;
148
148
  if (_autoNickname) {
149
149
  document.getElementById('nickname-input').value = _autoNickname;
150
150
  selectRole(_role);
151
- setTimeout(() => joinRoom(), 100);
151
+ setTimeout(() => joinRoom(), 100);
152
152
  }
153
153
 
154
+ _autoNickname = '{{auth.user.name}}';
155
+ document.getElementById('nickname-input').value = _autoNickname;
156
+
154
157
  function selectRole(role) {
155
158
  _role = role;
156
159
  document.getElementById('role-publisher').className = 'live-role-btn' + (role === 'publisher' ? ' active' : '');
@@ -248,6 +251,14 @@ async function joinAsPublisher(nickname) {
248
251
  connection.on('slot', (slot) => {
249
252
  const label = document.getElementById('slot-label-' + slot.slotIndex);
250
253
  if (label) label.textContent = slot.nickname;
254
+ // 슬롯 재할당 시 srcObject 복구 (slot_remove에서 null로 바뀐 경우)
255
+ if (slot.stream) {
256
+ const videoEl = document.getElementById('slot-video-' + slot.slotIndex);
257
+ if (videoEl && !videoEl.srcObject) {
258
+ videoEl.srcObject = slot.stream;
259
+ videoEl.play().catch(() => {});
260
+ }
261
+ }
251
262
  });
252
263
 
253
264
  connection.on('slot_remove', ({ slotIndex }) => {
@@ -282,6 +293,14 @@ async function joinAsViewer(nickname) {
282
293
  connection.on('slot', (slot) => {
283
294
  const label = document.getElementById('slot-label-' + slot.slotIndex);
284
295
  if (label) label.textContent = slot.nickname;
296
+ // 슬롯 재할당 시 srcObject 복구
297
+ if (slot.stream) {
298
+ const videoEl = document.getElementById('slot-video-' + slot.slotIndex);
299
+ if (videoEl && !videoEl.srcObject) {
300
+ videoEl.srcObject = slot.stream;
301
+ videoEl.play().catch(() => {});
302
+ }
303
+ }
285
304
  });
286
305
 
287
306
  connection.on('slot_remove', ({ slotIndex }) => {