diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 15 |
1 files changed, 9 insertions, 6 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 { |