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 /
@Output
API Directives /
@Input
-
BroadcastingActivityComponent (
ov-broadcasting-activity
):Events /
@Output
onBroadcastingStartRequested
(Describe onBroadcastingStartRequested event here)onRecordingPlayClicked
(Describe onRecordingPlayClicked event here)
API Directives /
@Input
broadcastingError
has been deleted
-
ChatPanelComponent (
ov-chat-panel
):Events /
@Output
API Directives /
@Input
-
LayoutComponent (
ov-layout
):Events /
@Output
API Directives /
@Input
-
PanelComponent (
ov-panel
):Events /
@Output
API Directives /
@Input
-
ParticipantPanelItemComponent (
ov-participant-panel-item
):Events /
@Output
API Directives /
@Input
-
ParticipantsPanelComponent (
ov-participants-panel
):Events /
@Output
API Directives /
@Input
-
RecordingActivityComponent (
ov-recording-activity
):Events /
@Output
onRecordingStartRequested
(Describe onRecordingStartRequested event here)onRecordingStopRequested
(Describe onRecordingStopRequested event here)
API Directives /
@Input
recordingError
has been deletedrecordingsList
has been deleted
-
StreamComponent (
ov-stream
):Events /
@Output
API Directives /
@Input
settingsButton
has been replaced byvideoControls
stream
input has been replaced bytrack
input. Check the Pipes section for more information.
-
ToolbarComponent (
ov-toolbar
):Events /
@Output
backgroundEffectsButton
has been deleted TODO: Try to add it again!!captionsButton
has been deleteddisplaySessionName
has been renamed todisplayRoomName
API Directives /
@Input
-
VideoconferenceComponent (
ov-videoconference
):Events /
@Output
onActivitiesPanelDeleteRecordingClicked
has been replaced byonRecordingDeleteRequested
onActivitiesPanelForceRecordingUpdate
has been deletedonActivitiesPanelPlayRecordingClicked
has been replaced byonRecordingPlayClicked
onActivitiesPanelStartBroadcastingClicked
have been replaced byonBroadcastingStartRequested
onActivitiesPanelStartRecordingClicked
andonToolbarStartRecordingClicked
has been replaced byonRecordingStartRequested
onActivitiesPanelStopBroadcastingClicked
andonToolbarStopBroadcastingClicked
has been replaced byonBroadcastingStopRequested
onActivitiesPanelStopRecordingClicked
andonToolbarStopRecordingClicked
has been replaced byonRecordingStopRequested
- // TODO: langChanged
onNodeCrashed
has been deletedonSessionCreated
has been replaced byonRoomCreated
onToolbarActivitiesPanelButtonClicked
has been replaced byonActivitiesPanelStatusChanged
onToolbarCameraButtonClicked
has been replaced byonVideoEnabledChanged
onToolbarChatPanelButtonClicked
has been replaced byonChatPanelStatusChanged
onToolbarFullscreenButtonClicked
has been replaced byonFullscreenEnabledChanged
onToolbarLeaveButtonClicked
has been replaced byonRoomDisconnected
onToolbarMicrophoneButtonClicked
has been replaced byonAudioEnabledChanged
onToolbarParticipantsPanelButtonClicked
has been replaced byonParticipantsPanelStatusChanged
onToolbarScreenshareButtonClicked
has been replaced byonScreenShareEnabledChanged
onSettingsPanelStatusChanged
has been added to notify when the settings panel status has changedonTokenRequested
has been added to notify when a token need to be createdonVideoDeviceChanged
has been added to notify when the video device has changedonAudioDeviceChanged
has been added to notify when the audio device has changedonRecordingDownloadClicked
has been added to notify when the user clicks on the download button of a recordingonActivitiesPanelPlayRecordingClicked
has been replaced byonRecordingPlayClicked
-
Admin Login (
ov-admin-login
):onLoginButtonClicked
returns an object with the username and password instead of a secret string
API Directives /
@Input
audioMuted
has been replaced byaudioEnabled
broadcastingActivityBroadcastingError
has been deletedcaptionsLang
has been deletedcaptionsLangOptions
has been deletedrecordingActivityRecordingError
has been deletedrecordingActivityRecordingsList
has been deletedstreamSettingsButton
has been replaced bystreamVideoControls
toolbarBackgroundEffectsButton
has been deleted TODO: Try to add it again!!toolbarCaptionsButton
has been deletedtoolbarDisplaySessionName
has been renamed totoolbarDisplayRoomName
videoMuted
has been replaced byvideoEnabled
Web Component
Apply the same Outputs and Inputs changes as in the VideoconferenceComponent
Pipes
-
stream
has been replaced bytrack
In 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
streams
pipe 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 theParticipantModel
class. This accessor and pipe return an array ofParticipantTrackPublication
objects, simplifying the handling of tracks.In v2.X (using
streams
pipe):<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
tracks
pipe):<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
):broadcastingStatusObs
observable now pushes an BroadcastingStatusInfo object instead of anBroadcastingStatus
in every update.startBroadcasting
method has been replaced bysetBroadcastingStarting
stopBroadcasting
method has been replaced bysetBroadcastingStopping
updateStatus
method 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
):disconnect
method has been renamed todisconnectRoom
getRemoteConnections
method has been moved to ParticipantService and renamed togetRemoteParticipants
.getSession
method has been renamed togetRoom
.isSessionConnected
method has been renamed toisRoomConnected
.publishCamera
andunpublishCamera
methods have been moved to ParticipantService and renamed tosetCameraEnabled
publishScreen
andunpublishScreen
methods have been renamed tosetScreenShareEnabled
isSttReadyObs
observable has been deletedconnectRoom
method has been addedgetRoomName
method has been added to get the name of the room
-
Panel Service (
PanelService
):panelOpenedObs
observable has been renamed topanelStatusObs
which returns a PanelStatusInfo object instead of aPanelEvent
in every update.isBackgroundEffectsPanelOpened
method has been deleted
You can check the PanelService documentation for more information.
-
Participant Service (
ParticipantService
):amIModerator
method has been renamed toamIRoomAdmin
toggleScreenshare
method has been renamed toswitchScreenShare
isMyVideoActive
method has been renamed toisMyCameraEnabled
isMyAudioActive
method has been renamed toisMyMicrophoneEnabled
publishVideo
method has been renamed tosetCameraEnabled
publishAudio
method has been renamed tosetMicrophoneEnabled
You can check the ParticipantService documentation for more information.
-
Recording Service (
RecordingService
):recordingStatusObs
observable now pushes an RecordingStatusInfo object instead of anRecordingStatus
in every update.forceUpdateRecordings
method has been deleted. Now the recordings are updated automatically when the status changes.updateStatus
method has been deleted. Now the status is updated automatically when the status changes.
You can check the RecordingService documentation for more information.
Models
-
ParticipantAbstracModel
has been renamed toParticipantModel
. In addition, theParticipantModel
class has been refactored and now it has a new property calledtracks
that contains all the tracks of the participant. This property is an array ofParticipantTrackPublication
objects. -
StreamModel
has been renamed toParticipantTrackPublication
.
Interfaces
BroadcastingError
has been deletedCaptionsLangOptions
has been deletedPanelEvent
has been renamed toPanelStatusInfo
StreamModel
has been renamed toParticipantTrackPublication
TokenModel
has 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 version
This 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