|
| 1 | +import { t } from 'i18next'; |
1 | 2 | import { ReactiveController } from 'lit'; |
2 | | -import { EventService } from '../../service/event.service'; |
| 3 | +import { |
| 4 | + LpChatResponseEvent, |
| 5 | + LpChatStateEvent, |
| 6 | + LpEventServiceStateEvent, |
| 7 | + LpMediaStateEvent, |
| 8 | + LpParticipantModerationEvent, |
| 9 | + LpParticipantPresenceEvent, |
| 10 | + LpQuizStateEvent, |
| 11 | + LpRecordingStateEvent, |
| 12 | + LpStreamStateEvent, |
| 13 | +} from '../../event'; |
| 14 | +import { MouseListener } from '../../event/mouse-listener'; |
3 | 15 | import { ChatService } from '../../service/chat.service'; |
| 16 | +import { EventService } from '../../service/event.service'; |
4 | 17 | import { ModerationService } from "../../service/moderation.service"; |
5 | | -import { DeviceInfo, Devices } from '../../utils/devices'; |
6 | | -import { MediaProfile, Settings } from '../../utils/settings'; |
7 | | -import { State } from '../../utils/state'; |
8 | | -import { Utils } from '../../utils/utils'; |
9 | | -import { EntryModal } from '../entry-modal/entry.modal'; |
10 | | -import { PlayerViewController } from '../player-view/player-view.controller'; |
11 | | -import { ReconnectModal } from '../reconnect-modal/reconnect.modal'; |
12 | | -import { RecordedModal } from '../recorded-modal/recorded.modal'; |
13 | | -import { LecturePlayer } from './player'; |
14 | | -import { featureStore } from '../../store/feature.store'; |
15 | 18 | import { chatStore } from '../../store/chat.store'; |
16 | | -import { privilegeStore } from '../../store/privilege.store'; |
17 | | -import { participantStore } from '../../store/participants.store'; |
18 | 19 | import { courseStore } from '../../store/course.store'; |
19 | | -import { userStore } from '../../store/user.store'; |
| 20 | +import { deviceStore } from '../../store/device.store'; |
20 | 21 | import { documentStore } from '../../store/document.store'; |
| 22 | +import { featureStore } from '../../store/feature.store'; |
| 23 | +import { participantStore } from '../../store/participants.store'; |
| 24 | +import { privilegeStore } from '../../store/privilege.store'; |
| 25 | +import { streamStatsStore } from '../../store/stream-stats.store'; |
21 | 26 | import { uiStateStore } from '../../store/ui-state.store'; |
| 27 | +import { userStore } from '../../store/user.store'; |
22 | 28 | import { ToolController } from '../../tool/tool-controller'; |
23 | | -import { MouseListener } from '../../event/mouse-listener'; |
24 | | -import { SlideView } from '../slide-view/slide-view'; |
25 | | -import { deviceStore } from '../../store/device.store'; |
| 29 | +import { CourseChatApi } from '../../transport/course-chat-api'; |
| 30 | +import { CourseParticipantApi } from '../../transport/course-participant-api'; |
26 | 31 | import { CourseStateApi } from '../../transport/course-state-api'; |
27 | 32 | import { CourseUserApi } from '../../transport/course-user-api'; |
28 | | -import { CourseParticipantApi } from '../../transport/course-participant-api'; |
29 | | -import { CourseChatApi } from '../../transport/course-chat-api'; |
30 | | -import { ApplicationContext } from '../controller/context'; |
| 33 | +import { DeviceInfo, Devices } from '../../utils/devices'; |
31 | 34 | import { EventEmitter } from '../../utils/event-emitter'; |
32 | | -import { RootController } from '../controller/root.controller'; |
33 | | -import { Controller } from '../controller/controller'; |
34 | | -import { streamStatsStore } from '../../store/stream-stats.store'; |
35 | | -import { LpChatResponseEvent, LpChatStateEvent, LpEventServiceStateEvent, LpMediaStateEvent, LpParticipantPresenceEvent, LpParticipantModerationEvent, LpQuizStateEvent, LpRecordingStateEvent, LpStreamStateEvent } from '../../event'; |
| 35 | +import { MediaProfile, Settings } from '../../utils/settings'; |
| 36 | +import { State } from '../../utils/state'; |
36 | 37 | import { Toaster } from '../../utils/toaster'; |
37 | | -import { t } from 'i18next'; |
| 38 | +import { Utils } from '../../utils/utils'; |
| 39 | +import { ApplicationContext } from '../controller/context'; |
| 40 | +import { Controller } from '../controller/controller'; |
| 41 | +import { RootController } from '../controller/root.controller'; |
| 42 | +import { EntryModal } from '../entry-modal/entry.modal'; |
| 43 | +import { PlayerViewController } from '../player-view/player-view.controller'; |
| 44 | +import { ReconnectModal } from '../reconnect-modal/reconnect.modal'; |
| 45 | +import { RecordedModal } from '../recorded-modal/recorded.modal'; |
| 46 | +import { SlideView } from '../slide-view/slide-view'; |
| 47 | +import { LecturePlayer } from './player'; |
38 | 48 |
|
39 | 49 | export class PlayerController extends Controller implements ReactiveController { |
40 | 50 |
|
@@ -398,8 +408,10 @@ export class PlayerController extends Controller implements ReactiveController { |
398 | 408 | private onRecordingState(event: LpRecordingStateEvent) { |
399 | 409 | const recordingState = event.detail; |
400 | 410 |
|
| 411 | + console.log("******** recording state", recordingState.started) |
| 412 | + |
401 | 413 | if (recordingState.started && !courseStore.recorded && uiStateStore.state === State.CONNECTED) { |
402 | | - this.showRecordedModal(); |
| 414 | + this.modalController.registerModal("RecordedModal", new RecordedModal()); |
403 | 415 | } |
404 | 416 | else { |
405 | 417 | this.modalController.closeModal("RecordedModal"); |
@@ -562,10 +574,6 @@ export class PlayerController extends Controller implements ReactiveController { |
562 | 574 | if (streamState === State.CONNECTED && documentState === State.CONNECTED) { |
563 | 575 | this.setConnectionState(State.CONNECTED); |
564 | 576 |
|
565 | | - if (courseStore.recorded && !this.connecting) { |
566 | | - this.showRecordedModal(); |
567 | | - } |
568 | | - |
569 | 577 | this.connecting = false; |
570 | 578 | } |
571 | 579 | else if (streamState === State.DISCONNECTED) { |
@@ -617,8 +625,4 @@ export class PlayerController extends Controller implements ReactiveController { |
617 | 625 | break; |
618 | 626 | } |
619 | 627 | } |
620 | | - |
621 | | - private showRecordedModal() { |
622 | | - this.modalController.registerModal("RecordedModal", new RecordedModal()); |
623 | | - } |
624 | 628 | } |
0 commit comments