mirror of https://github.com/Chocobozzz/PeerTube
Fix socket io messages angular changes
parent
a7299d9d85
commit
15feebd97a
|
@ -17,7 +17,7 @@ export class PlayerPage {
|
|||
}
|
||||
|
||||
waitUntilPlayerWrapper () {
|
||||
const elem = element(by.css('#video-wrapper'))
|
||||
const elem = element(by.css('#placeholder-preview'))
|
||||
|
||||
return browser.wait(browser.ExpectedConditions.presenceOf(elem))
|
||||
}
|
||||
|
|
|
@ -53,13 +53,14 @@ export class PeerTubeSocket {
|
|||
|
||||
await this.importIOIfNeeded()
|
||||
|
||||
// Prevent protractor issues https://github.com/angular/angular/issues/11853
|
||||
this.ngZone.runOutsideAngular(() => {
|
||||
this.notificationSocket = this.io(environment.apiUrl + '/user-notifications', {
|
||||
query: { accessToken: this.auth.getAccessToken() }
|
||||
})
|
||||
|
||||
this.notificationSocket.on('new-notification', (n: UserNotificationServer) => this.dispatchNotificationEvent('new', n))
|
||||
})
|
||||
|
||||
this.notificationSocket.on('new-notification', (n: UserNotificationServer) => this.dispatchNotificationEvent('new', n))
|
||||
}
|
||||
|
||||
private async initLiveVideosSocket () {
|
||||
|
@ -67,12 +68,13 @@ export class PeerTubeSocket {
|
|||
|
||||
await this.importIOIfNeeded()
|
||||
|
||||
// Prevent protractor issues https://github.com/angular/angular/issues/11853
|
||||
this.ngZone.runOutsideAngular(() => {
|
||||
this.liveVideosSocket = this.io(environment.apiUrl + '/live-videos')
|
||||
|
||||
const type: LiveVideoEventType = 'state-change'
|
||||
this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload))
|
||||
})
|
||||
|
||||
const type: LiveVideoEventType = 'state-change'
|
||||
this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload))
|
||||
}
|
||||
|
||||
private async importIOIfNeeded () {
|
||||
|
|
Loading…
Reference in New Issue