Merge branch 'feature/audio-upload' into develop
authorChocobozzz <me@florianbigard.com>
Tue, 21 May 2019 08:05:12 +0000 (10:05 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 21 May 2019 08:05:12 +0000 (10:05 +0200)
1  2 
client/src/app/videos/+video-watch/video-watch.component.ts
config/default.yaml
server/initializers/config.ts

index 631504eab6141472bf3e4389a519731864a65063,d8ba4df89475adec12d721c94dce7337442ffd18..55109dc324d5ae646594610394bf0a4d1ece80a7
@@@ -545,28 -561,12 +545,32 @@@ export class VideoWatchComponent implem
    private flushPlayer () {
      // Remove player if it exists
      if (this.player) {
-       this.player.dispose()
-       this.player = undefined
+       try {
+         this.player.dispose()
+         this.player = undefined
+       } catch (err) {
+         console.error('Cannot dispose player.', err)
+       }
      }
    }
 +
 +  private initHotkeys () {
 +    this.hotkeys = [
 +      new Hotkey('shift+l', (event: KeyboardEvent): boolean => {
 +        this.setLike()
 +        return false
 +      }, undefined, this.i18n('Like the video')),
 +      new Hotkey('shift+d', (event: KeyboardEvent): boolean => {
 +        this.setDislike()
 +        return false
 +      }, undefined, this.i18n('Dislike the video')),
 +      new Hotkey('shift+s', (event: KeyboardEvent): boolean => {
 +        this.subscribeButton.subscribed ?
 +          this.subscribeButton.unsubscribe() :
 +          this.subscribeButton.subscribe()
 +        return false
 +      }, undefined, this.i18n('Subscribe to the account'))
 +    ]
 +    if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
 +  }
  }
Simple merge
Simple merge