]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+remote-interaction/remote-interaction.component.ts
Refactor video links building
[github/Chocobozzz/PeerTube.git] / client / src / app / +remote-interaction / remote-interaction.component.ts
index 3ebe62f49e9120034e6ec8686ae46b359dd6ceff..293f7edad5506655b7de9f7d720366a5b52e27a5 100644 (file)
@@ -1,7 +1,7 @@
 import { forkJoin } from 'rxjs'
 import { Component, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { VideoChannel } from '@app/shared/shared-main'
+import { Video, VideoChannel } from '@app/shared/shared-main'
 import { SearchService } from '@app/shared/shared-search'
 
 @Component({
@@ -39,7 +39,7 @@ export class RemoteInteractionComponent implements OnInit {
       if (videoResult.data.length !== 0) {
         const video = videoResult.data[0]
 
-        redirectUrl = '/videos/watch/' + video.uuid
+        redirectUrl = Video.buildWatchUrl(video)
       } else if (channelResult.data.length !== 0) {
         const channel = new VideoChannel(channelResult.data[0])