aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-13 14:38:53 +0200
committerChocobozzz <me@florianbigard.com>2023-07-17 11:31:46 +0200
commit45ec48b2b15907b2d22cabc0589199de8f4d0a2d (patch)
tree0feb367ef312b92b2ae7f94f240291ae959efd44
parent28dd2f14f5bdfd4781e489c42db6eaa7d40d560b (diff)
downloadPeerTube-45ec48b2b15907b2d22cabc0589199de8f4d0a2d.tar.gz
PeerTube-45ec48b2b15907b2d22cabc0589199de8f4d0a2d.tar.zst
PeerTube-45ec48b2b15907b2d22cabc0589199de8f4d0a2d.zip
Don't update opengraph in angular
We already set these tags in the server
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts26
1 files changed, 0 insertions, 26 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 aebec52fb..e0935abd7 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -7,7 +7,6 @@ import {
7 AuthService, 7 AuthService,
8 AuthUser, 8 AuthUser,
9 ConfirmService, 9 ConfirmService,
10 MetaService,
11 Notifier, 10 Notifier,
12 PeerTubeSocket, 11 PeerTubeSocket,
13 PluginService, 12 PluginService,
@@ -112,14 +111,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
112 private static VIEW_VIDEO_INTERVAL_MS = 5000 111 private static VIEW_VIDEO_INTERVAL_MS = 5000
113 112
114 constructor ( 113 constructor (
115 private elementRef: ElementRef,
116 private route: ActivatedRoute, 114 private route: ActivatedRoute,
117 private router: Router, 115 private router: Router,
118 private videoService: VideoService, 116 private videoService: VideoService,
119 private playlistService: VideoPlaylistService, 117 private playlistService: VideoPlaylistService,
120 private liveVideoService: LiveVideoService, 118 private liveVideoService: LiveVideoService,
121 private confirmService: ConfirmService, 119 private confirmService: ConfirmService,
122 private metaService: MetaService,
123 private authService: AuthService, 120 private authService: AuthService,
124 private userService: UserService, 121 private userService: UserService,
125 private serverService: ServerService, 122 private serverService: ServerService,
@@ -457,8 +454,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
457 this.loadPlayer({ loggedInOrAnonymousUser, forceAutoplay }) 454 this.loadPlayer({ loggedInOrAnonymousUser, forceAutoplay })
458 .catch(err => logger.error('Cannot build the player', err)) 455 .catch(err => logger.error('Cannot build the player', err))
459 456
460 this.setOpenGraphTags()
461
462 const hookOptions = { 457 const hookOptions = {
463 videojs, 458 videojs,
464 video: this.video, 459 video: this.video,
@@ -897,27 +892,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
897 this.hotkeysService.add(this.hotkeys) 892 this.hotkeysService.add(this.hotkeys)
898 } 893 }
899 894
900 private setOpenGraphTags () {
901 this.metaService.setTitle(this.video.name)
902
903 this.metaService.setTag('og:type', 'video')
904
905 this.metaService.setTag('og:title', this.video.name)
906 this.metaService.setTag('name', this.video.name)
907
908 this.metaService.setTag('og:description', this.video.description)
909 this.metaService.setTag('description', this.video.description)
910
911 this.metaService.setTag('og:image', this.video.previewPath)
912
913 this.metaService.setTag('og:duration', this.video.duration.toString())
914
915 this.metaService.setTag('og:site_name', 'PeerTube')
916
917 this.metaService.setTag('og:url', window.location.href)
918 this.metaService.setTag('url', window.location.href)
919 }
920
921 private getUrlOptions (): URLOptions { 895 private getUrlOptions (): URLOptions {
922 const queryParams = this.route.snapshot.queryParams 896 const queryParams = this.route.snapshot.queryParams
923 897