13 KiB
OpenVidu Angular 3.0.0 Migration Guide
- Introduction
Mejoras:
publicacion de multiples tracks por participante
Desventajas
Backgrounds no existe en openvidu 3.0.0 Captions no existe en openvidu 3.0.0
- Updating Dependencies
OpenVidu Components 2.x was developed using Angular 14. Now, this version 3 is developed with Angular 15. This means that you will need to update your Angular version to 15.0.0 or higher. Check Angular Migration Guide for more information: https://update.angular.io/
Install the new version of OpenVidu Components:
npm install openvidu-components-angular@3.0.0
-
Source Code Migration
Components
-
ActivitiesPanelComponent (
ov-activities-panel):Events /
@OutputAPI Directives /
@Input -
BroadcastingActivityComponent (
ov-broadcasting-activity):Events /
@OutputonBroadcastingStartRequested(Describe onBroadcastingStartRequested event here)onRecordingPlayClicked(Describe onRecordingPlayClicked event here)
API Directives /
@InputbroadcastingErrorhas been deleted
-
ChatPanelComponent (
ov-chat-panel):Events /
@OutputAPI Directives /
@Input -
LayoutComponent (
ov-layout):Events /
@OutputAPI Directives /
@Input -
PanelComponent (
ov-panel):Events /
@OutputAPI Directives /
@Input -
ParticipantPanelItemComponent (
ov-participant-panel-item):Events /
@OutputAPI Directives /
@Input -
ParticipantsPanelComponent (
ov-participants-panel):Events /
@OutputAPI Directives /
@Input -
RecordingActivityComponent (
ov-recording-activity):Events /
@OutputonRecordingStartRequested(Describe onRecordingStartRequested event here)onRecordingStopRequested(Describe onRecordingStopRequested event here)
API Directives /
@InputrecordingErrorhas been deletedrecordingsListhas been deleted
-
StreamComponent (
ov-stream):Events /
@OutputAPI Directives /
@InputsettingsButtonhas been replaced byvideoControlsstreaminput has been replaced bytrackinput. Check the Pipes section for more information.
-
ToolbarComponent (
ov-toolbar):Events /
@OutputbackgroundEffectsButtonhas been deleted TODO: Try to add it again!!captionsButtonhas been deleteddisplaySessionNamehas been renamed todisplayRoomName
API Directives /
@Input -
VideoconferenceComponent (
ov-videoconference):Events /
@OutputonActivitiesPanelDeleteRecordingClickedhas been replaced byonRecordingDeleteRequestedonActivitiesPanelForceRecordingUpdatehas been deletedonActivitiesPanelPlayRecordingClickedhas been replaced byonRecordingPlayClickedonActivitiesPanelStartBroadcastingClickedhave been replaced byonBroadcastingStartRequestedonActivitiesPanelStartRecordingClickedandonToolbarStartRecordingClickedhas been replaced byonRecordingStartRequestedonActivitiesPanelStopBroadcastingClickedandonToolbarStopBroadcastingClickedhas been replaced byonBroadcastingStopRequestedonActivitiesPanelStopRecordingClickedandonToolbarStopRecordingClickedhas been replaced byonRecordingStopRequested- // TODO: langChanged
onNodeCrashedhas been deletedonSessionCreatedhas been replaced byonRoomCreatedonToolbarActivitiesPanelButtonClickedhas been replaced byonActivitiesPanelStatusChangedonToolbarCameraButtonClickedhas been replaced byonVideoEnabledChangedonToolbarChatPanelButtonClickedhas been replaced byonChatPanelStatusChangedonToolbarFullscreenButtonClickedhas been replaced byonFullscreenEnabledChangedonToolbarLeaveButtonClickedhas been replaced byonRoomDisconnectedonToolbarMicrophoneButtonClickedhas been replaced byonAudioEnabledChangedonToolbarParticipantsPanelButtonClickedhas been replaced byonParticipantsPanelStatusChangedonToolbarScreenshareButtonClickedhas been replaced byonScreenShareEnabledChangedonSettingsPanelStatusChangedhas been added to notify when the settings panel status has changedonTokenRequestedhas been added to notify when a token need to be createdonVideoDeviceChangedhas been added to notify when the video device has changedonAudioDeviceChangedhas been added to notify when the audio device has changedonRecordingDownloadClickedhas been added to notify when the user clicks on the download button of a recordingonActivitiesPanelPlayRecordingClickedhas been replaced byonRecordingPlayClicked
-
Admin Login (
ov-admin-login):onLoginButtonClickedreturns an object with the username and password instead of a secret string
API Directives /
@InputaudioMutedhas been replaced byaudioEnabledbroadcastingActivityBroadcastingErrorhas been deletedcaptionsLanghas been deletedcaptionsLangOptionshas been deletedrecordingActivityRecordingErrorhas been deletedrecordingActivityRecordingsListhas been deletedstreamSettingsButtonhas been replaced bystreamVideoControlstoolbarBackgroundEffectsButtonhas been deleted TODO: Try to add it again!!toolbarCaptionsButtonhas been deletedtoolbarDisplaySessionNamehas been renamed totoolbarDisplayRoomNamevideoMutedhas been replaced byvideoEnabled
Web Component
Apply the same Outputs and Inputs changes as in the VideoconferenceComponent
Pipes
-
streamhas been replaced bytrackIn version 2.X of openvidu-angular, the ParticipantStreamsPipe (
streams) was employed to extract streams from both the local participant and remote participants' lists. Its purpose was to inject these streams into the StreamComponent (ov-stream).However, in the current version (3.0.0), StreamComponent now requires direct access to participant tracks. Consequently, the
streamspipe has been replaced by the RemoteParticipantTracksPipe (tracks), exclusively used for remote participants' lists. Local participant tracks can now be obtained directly from the track accessor of theParticipantModelclass. This accessor and pipe return an array ofParticipantTrackPublicationobjects, simplifying the handling of tracks.In v2.X (using
streamspipe):<div class="item" *ngFor="let stream of localParticipant | streams"> <ov-stream [stream]="stream"></ov-stream> </div> <div class="item" *ngFor="let stream of remoteParticipants | streams"> <ov-stream [stream]="stream"></ov-stream> </div>In v3.0.0 (using
trackspipe):<div *ngFor="let track of localParticipant.tracks"> <ov-stream [track]="track"></ov-stream> </div> <div *ngFor="let track of remoteParticipants | tracks"> <ov-stream [track]="track"></ov-stream> </div>
Services
-
Broadcasting Service (
BroadcastingService):broadcastingStatusObsobservable now pushes an BroadcastingStatusInfo object instead of anBroadcastingStatusin every update.startBroadcastingmethod has been replaced bysetBroadcastingStartingstopBroadcastingmethod has been replaced bysetBroadcastingStoppingupdateStatusmethod has been deleted. Now the status is updated automatically when the status changes.
You can check the BroadcastingService documentation for more information.
-
OpenVidu Service (
OpenViduService):disconnectmethod has been renamed todisconnectRoomgetRemoteConnectionsmethod has been moved to ParticipantService and renamed togetRemoteParticipants.getSessionmethod has been renamed togetRoom.isSessionConnectedmethod has been renamed toisRoomConnected.publishCameraandunpublishCameramethods have been moved to ParticipantService and renamed tosetCameraEnabledpublishScreenandunpublishScreenmethods have been renamed tosetScreenShareEnabledisSttReadyObsobservable has been deletedconnectRoommethod has been addedgetRoomNamemethod has been added to get the name of the room
-
Panel Service (
PanelService):panelOpenedObsobservable has been renamed topanelStatusObswhich returns a PanelStatusInfo object instead of aPanelEventin every update.isBackgroundEffectsPanelOpenedmethod has been deleted
You can check the PanelService documentation for more information.
-
Participant Service (
ParticipantService):amIModeratormethod has been renamed toamIRoomAdmintoggleScreensharemethod has been renamed toswitchScreenShareisMyVideoActivemethod has been renamed toisMyCameraEnabledisMyAudioActivemethod has been renamed toisMyMicrophoneEnabledpublishVideomethod has been renamed tosetCameraEnabledpublishAudiomethod has been renamed tosetMicrophoneEnabled
You can check the ParticipantService documentation for more information.
-
Recording Service (
RecordingService):recordingStatusObsobservable now pushes an RecordingStatusInfo object instead of anRecordingStatusin every update.forceUpdateRecordingsmethod has been deleted. Now the recordings are updated automatically when the status changes.updateStatusmethod has been deleted. Now the status is updated automatically when the status changes.
You can check the RecordingService documentation for more information.
Models
-
ParticipantAbstracModelhas been renamed toParticipantModel. In addition, theParticipantModelclass has been refactored and now it has a new property calledtracksthat contains all the tracks of the participant. This property is an array ofParticipantTrackPublicationobjects. -
StreamModelhas been renamed toParticipantTrackPublication.
Interfaces
BroadcastingErrorhas been deletedCaptionsLangOptionshas been deletedPanelEventhas been renamed toPanelStatusInfoStreamModelhas been renamed toParticipantTrackPublicationTokenModelhas been deleted
-
-
References and Additional Resources
-
FAQ (Frequently Asked Questions)
Why should I migrate to version 3.0.0 of OpenVidu Angular?
TODO
Which versions of Angular are compatible with OpenVidu Angular 3.0.0?
OpenVidu Angular 3.0.0 is compatible with Angular 15 and later versions. Make sure to update your Angular project to version 15 or higher to use this version of OpenVidu Angular.
How can I check the current version of Angular in my project?
You can check the current version of Angular in your project by running the following command in your terminal:
ng versionThis will provide you with detailed information about the version of Angular you are using in your project.
Where can I find examples of using the new features and API changes?
You can find examples of using the new features and API changes in the official documentation of OpenVidu Angular 3.0.0. Visit the official tutorials.
How can I contribute or report issues with the new version?
If you wish to contribute to the development of OpenVidu Angular or report issues, you can do so through the collaborative development platform, such as GitHub. Visit the official repository at OpenVidu Angular repository for information on how to contribute and how to report issues. Your participation is valuable in improving the library and assisting other users.
-
Support and Community