aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-10 17:36:35 +0100
committerChocobozzz <me@florianbigard.com>2018-01-10 17:36:35 +0100
commit7ae71355c40e9065f83d3fc77b6750d1929ac201 (patch)
tree54bc61cafc7ab948f396e4c7c17d669ca85e5131 /client/src/app
parent2ccaeeb341ffe8c2609039bf4c6d8835b4650316 (diff)
downloadPeerTube-7ae71355c40e9065f83d3fc77b6750d1929ac201.tar.gz
PeerTube-7ae71355c40e9065f83d3fc77b6750d1929ac201.tar.zst
PeerTube-7ae71355c40e9065f83d3fc77b6750d1929ac201.zip
Run videojs outside angular
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts15
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 @@
1import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core' 1import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { MetaService } from '@ngx-meta/core' 3import { MetaService } from '@ngx-meta/core'
4import { NotificationsService } from 'angular2-notifications' 4import { 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 {