chuvsu-js 5.5.2 → 5.5.3

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.
Files changed (58) hide show
  1. package/README.md +6 -9
  2. package/dist/common/http.js +2 -4
  3. package/dist/common/lesson-type.js +6 -1
  4. package/dist/common/parse.js +3 -1
  5. package/dist/core.d.ts +2 -1
  6. package/dist/core.js +2 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/lk/client.js +10 -4
  9. package/dist/lk/parse/grade-value.js +5 -1
  10. package/dist/lk/parse/portfolio-content.js +58 -16
  11. package/dist/lk/parse/portfolio-grades.js +37 -9
  12. package/dist/lk/parse/portfolio-performance.js +26 -8
  13. package/dist/lk/parse/portfolio.js +31 -13
  14. package/dist/lk/parse/webinar-lesson.js +4 -2
  15. package/dist/lk/parse/webinars.js +7 -3
  16. package/dist/lk/webinars.js +3 -1
  17. package/dist/tt/client.js +15 -7
  18. package/dist/tt/domain/directory.js +2 -4
  19. package/dist/tt/domain/index.d.ts +2 -2
  20. package/dist/tt/domain/index.js +2 -2
  21. package/dist/tt/domain/repository.js +67 -35
  22. package/dist/tt/domain/schedule-snapshot.js +51 -24
  23. package/dist/tt/domain/schedule.js +7 -3
  24. package/dist/tt/observations.js +7 -2
  25. package/dist/tt/parse/audience.js +3 -1
  26. package/dist/tt/parse/entry-parts.js +2 -3
  27. package/dist/tt/parse/full-schedule.js +1 -1
  28. package/dist/tt/parse/groups.js +1 -3
  29. package/dist/tt/parse/index.d.ts +2 -2
  30. package/dist/tt/parse/index.js +2 -2
  31. package/dist/tt/parse/lists.js +3 -3
  32. package/dist/tt/parse/overlays.js +7 -2
  33. package/dist/tt/utils/date.js +2 -2
  34. package/dist/tt/utils/period.js +2 -1
  35. package/dist/tt/utils/semester.js +2 -2
  36. package/dist/tt/utils/time-slots.js +81 -15
  37. package/dist/webinar/chat-subscription.js +2 -1
  38. package/dist/webinar/client.d.ts +11 -0
  39. package/dist/webinar/client.js +136 -33
  40. package/dist/webinar/ddp.js +40 -13
  41. package/dist/webinar/events.js +7 -2
  42. package/dist/webinar/gateway.js +57 -16
  43. package/dist/webinar/media-protocol.d.ts +2 -1
  44. package/dist/webinar/media-protocol.js +27 -5
  45. package/dist/webinar/media.js +10 -4
  46. package/dist/webinar/parse.js +59 -14
  47. package/dist/webinar/playback.d.ts +1 -0
  48. package/dist/webinar/playback.js +49 -13
  49. package/dist/webinar/socket.js +4 -1
  50. package/dist/webinar/state.js +73 -26
  51. package/dist/webinar/types.d.ts +12 -0
  52. package/dist/webinar/typing.d.ts +8 -0
  53. package/dist/webinar/typing.js +36 -0
  54. package/docs/fixture-review.md +44 -44
  55. package/docs/student-portal.md +11 -2
  56. package/docs/v5-migration.md +85 -88
  57. package/docs/webinar.md +15 -2
  58. package/package.json +1 -1
package/docs/webinar.md CHANGED
@@ -43,6 +43,9 @@ serialize the gateway cookie jar or share a relay with another participant.
43
43
  - `getUsers()`, `getPresenter()`, `getModerators()` distinguish participant roles.
44
44
  Presenter/moderator does not automatically mean the scheduled lecturer.
45
45
  - `getChats()` exposes only chats published to this participant.
46
+ - `getTypingUsers({ chatId? })` exposes other participants typing in accessible
47
+ chats, respecting hidden-viewer settings. Typing is subscribed only when the
48
+ server advertises it.
46
49
  - `getMessages({ chatId? })` reads accumulated history/live messages.
47
50
  - `loadMessages({ chatId?, page? })` fetches a historical page, starting at 1.
48
51
  `connect()` loads the first public-chat page; subsequent pages are explicit.
@@ -81,6 +84,8 @@ even if the request fails. It is idempotent and never removes another participan
81
84
  ## Explicit actions
82
85
 
83
86
  ```ts
87
+ await room.setTyping(true); // Explicit, throttled by the UI (e.g. every 2 seconds).
88
+ await room.setTyping(false); // Stop on empty input, submit or panel teardown.
84
89
  await room.setRaisedHand(true);
85
90
  await room.setRaisedHand(false);
86
91
  await room.sendMessage({ text: "Hello" }); // Public chat by default.
@@ -112,7 +117,9 @@ const audio = await media.listen(); // Explicit listen-only connection.
112
117
  audioElement.srcObject = audio.stream;
113
118
  await audioElement.play(); // Invoke from a user gesture when autoplay is blocked.
114
119
 
115
- const camera = room.getMediaStreams().find((stream) => stream.kind === "camera");
120
+ const camera = room
121
+ .getMediaStreams()
122
+ .find((stream) => stream.kind === "camera");
116
123
  if (camera) {
117
124
  const playback = await media.receiveCamera({ streamId: camera.id });
118
125
  videoElement.srcObject = playback.stream;
@@ -133,7 +140,13 @@ Media uses the server's authenticated SFU WebSocket and browser WebRTC directly.
133
140
  No backend media receiver or forwarding is required. `listen()` receives the
134
141
  mixed room audio, not separate speaker tracks. Every playback exposes `stream`,
135
142
  `connection`, `getStats()`, `onError()`, `onClose()`, and idempotent `close()`.
136
- ICE candidates queue until negotiation is ready. Timeouts, aborts, disconnects
143
+ Listen-only negotiation follows the server's `media.listenOnlyOffering` setting:
144
+ client offers and server offers are both supported. Server-offered audio sends
145
+ `subscriberAnswer`; ICE candidates queue until negotiation is ready. The server's
146
+ `forceRelay` and `forceRelayOnFirefox` settings select the browser ICE policy.
147
+ These contracts are covered by mock protocol tests; live receive-only audio still
148
+ requires verification on an available webinar. Autoplay denial should retain the
149
+ stream and offer a user-gesture playback button. Timeouts, aborts, disconnects
137
150
  and remote stream termination release sockets, peers and tracks. Media teardown
138
151
  is separate from room state teardown. Browser and network restrictions can still
139
152
  require the BBB server's TURN relay.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chuvsu-js",
3
- "version": "5.5.2",
3
+ "version": "5.5.3",
4
4
  "description": "Библиотека для расписания и личного кабинета ЧГУ им. И. Н. Ульянова",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",