diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-14 17:20:39 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-14 18:04:30 +0100 |
commit | 3bcfff7f446d0a1d8ef5adf340375e178259a42c (patch) | |
tree | 7dc09e67525babb81c9d5d9e8ae3b034fdab0b6d /client/src/app | |
parent | 8cac1b6446a97b16387c9590ce5c799a79a759fa (diff) | |
download | PeerTube-3bcfff7f446d0a1d8ef5adf340375e178259a42c.tar.gz PeerTube-3bcfff7f446d0a1d8ef5adf340375e178259a42c.tar.zst PeerTube-3bcfff7f446d0a1d8ef5adf340375e178259a42c.zip |
Fix video play promise error on non supported browsers
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/shared/video/infinite-scroller.directive.ts | 1 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/shared/video/infinite-scroller.directive.ts b/client/src/app/shared/video/infinite-scroller.directive.ts index 52d8b2b37..1da02f60f 100644 --- a/client/src/app/shared/video/infinite-scroller.directive.ts +++ b/client/src/app/shared/video/infinite-scroller.directive.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core' | 1 | import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core' |
2 | import 'rxjs/add/operator/debounceTime' | 2 | import 'rxjs/add/operator/debounceTime' |
3 | import 'rxjs/add/operator/distinct' | 3 | import 'rxjs/add/operator/distinct' |
4 | import 'rxjs/add/operator/distinctUntilChanged' | ||
4 | import 'rxjs/add/operator/filter' | 5 | import 'rxjs/add/operator/filter' |
5 | import 'rxjs/add/operator/map' | 6 | import 'rxjs/add/operator/map' |
6 | import 'rxjs/add/operator/startWith' | 7 | import 'rxjs/add/operator/startWith' |
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 b7779ae9a..7a64406e6 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -330,7 +330,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
330 | videoFiles: this.video.files, | 330 | videoFiles: this.video.files, |
331 | playerElement: this.playerElement, | 331 | playerElement: this.playerElement, |
332 | peerTubeLink: false, | 332 | peerTubeLink: false, |
333 | videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid) | 333 | videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid), |
334 | videoDuration: this.video.duration | ||
334 | }, | 335 | }, |
335 | hotkeys: { | 336 | hotkeys: { |
336 | enableVolumeScroll: false | 337 | enableVolumeScroll: false |
@@ -350,7 +351,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
350 | }) | 351 | }) |
351 | }) | 352 | }) |
352 | } else { | 353 | } else { |
353 | this.player.peertube().setVideoFiles(this.video.files, this.videoService.getVideoViewUrl(this.video.uuid)) | 354 | const videoViewUrl = this.videoService.getVideoViewUrl(this.video.uuid) |
355 | this.player.peertube().setVideoFiles(this.video.files, videoViewUrl, this.video.duration) | ||
354 | } | 356 | } |
355 | 357 | ||
356 | this.setVideoDescriptionHTML() | 358 | this.setVideoDescriptionHTML() |