diff options
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 15 | ||||
-rw-r--r-- | server/tests/api/server/handle-down.ts | 1 |
2 files changed, 9 insertions, 7 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index f02bae630..f6f043b9c 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { MetaService } from '@ngx-meta/core' | 3 | import { MetaService } from '@ngx-meta/core' |
4 | import { NotificationsService } from 'angular2-notifications' | 4 | import { NotificationsService } from 'angular2-notifications' |
@@ -60,7 +60,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
60 | private metaService: MetaService, | 60 | private metaService: MetaService, |
61 | private authService: AuthService, | 61 | private authService: AuthService, |
62 | private notificationsService: NotificationsService, | 62 | private notificationsService: NotificationsService, |
63 | private markdownService: MarkdownService | 63 | private markdownService: MarkdownService, |
64 | private zone: NgZone | ||
64 | ) {} | 65 | ) {} |
65 | 66 | ||
66 | get user () { | 67 | get user () { |
@@ -338,10 +339,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
338 | this.videoPlayerLoaded = true | 339 | this.videoPlayerLoaded = true |
339 | 340 | ||
340 | const self = this | 341 | const self = this |
341 | videojs(this.playerElement, videojsOptions, function () { | 342 | this.zone.runOutsideAngular(() => { |
342 | self.player = this | 343 | videojs(this.playerElement, videojsOptions, function () { |
343 | this.on('customError', (event, data) => { | 344 | self.player = this |
344 | self.handleError(data.err) | 345 | this.on('customError', (event, data) => { |
346 | self.handleError(data.err) | ||
347 | }) | ||
345 | }) | 348 | }) |
346 | }) | 349 | }) |
347 | } else { | 350 | } else { |
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index da134c09f..f8ba8bd66 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -133,7 +133,6 @@ describe('Test handle downs', function () { | |||
133 | expect(videoServer2).not.to.be.undefined | 133 | expect(videoServer2).not.to.be.undefined |
134 | 134 | ||
135 | await completeVideoCheck(servers[1].url, videoServer2, checkAttributes) | 135 | await completeVideoCheck(servers[1].url, videoServer2, checkAttributes) |
136 | |||
137 | }) | 136 | }) |
138 | 137 | ||
139 | after(async function () { | 138 | after(async function () { |