]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/video-thumbnail.component.ts
Translate subtitle langs in player
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-thumbnail.component.ts
index e52f7dfb0824f2da18389a7a73a49d6a961c5a6c..86d8f6f742163f91fd8c1a486a7797162feeb2aa 100644 (file)
@@ -1,6 +1,6 @@
 import { Component, Input } from '@angular/core'
-import { isInMobileView } from '@app/shared/misc/utils'
 import { Video } from './video.model'
+import { ScreenService } from '@app/shared/misc/screen.service'
 
 @Component({
   selector: 'my-video-thumbnail',
@@ -11,10 +11,12 @@ export class VideoThumbnailComponent {
   @Input() video: Video
   @Input() nsfw = false
 
+  constructor (private screenService: ScreenService) {}
+
   getImageUrl () {
     if (!this.video) return ''
 
-    if (isInMobileView()) {
+    if (this.screenService.isInMobileView()) {
       return this.video.previewUrl
     }