mirror of https://github.com/Chocobozzz/PeerTube
Don't update opengraph in angular
We already set these tags in the serverpull/5897/head
parent
28dd2f14f5
commit
45ec48b2b1
|
@ -7,7 +7,6 @@ import {
|
||||||
AuthService,
|
AuthService,
|
||||||
AuthUser,
|
AuthUser,
|
||||||
ConfirmService,
|
ConfirmService,
|
||||||
MetaService,
|
|
||||||
Notifier,
|
Notifier,
|
||||||
PeerTubeSocket,
|
PeerTubeSocket,
|
||||||
PluginService,
|
PluginService,
|
||||||
|
@ -112,14 +111,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
private static VIEW_VIDEO_INTERVAL_MS = 5000
|
private static VIEW_VIDEO_INTERVAL_MS = 5000
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private elementRef: ElementRef,
|
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private videoService: VideoService,
|
private videoService: VideoService,
|
||||||
private playlistService: VideoPlaylistService,
|
private playlistService: VideoPlaylistService,
|
||||||
private liveVideoService: LiveVideoService,
|
private liveVideoService: LiveVideoService,
|
||||||
private confirmService: ConfirmService,
|
private confirmService: ConfirmService,
|
||||||
private metaService: MetaService,
|
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private userService: UserService,
|
private userService: UserService,
|
||||||
private serverService: ServerService,
|
private serverService: ServerService,
|
||||||
|
@ -457,8 +454,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
this.loadPlayer({ loggedInOrAnonymousUser, forceAutoplay })
|
this.loadPlayer({ loggedInOrAnonymousUser, forceAutoplay })
|
||||||
.catch(err => logger.error('Cannot build the player', err))
|
.catch(err => logger.error('Cannot build the player', err))
|
||||||
|
|
||||||
this.setOpenGraphTags()
|
|
||||||
|
|
||||||
const hookOptions = {
|
const hookOptions = {
|
||||||
videojs,
|
videojs,
|
||||||
video: this.video,
|
video: this.video,
|
||||||
|
@ -897,27 +892,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
this.hotkeysService.add(this.hotkeys)
|
this.hotkeysService.add(this.hotkeys)
|
||||||
}
|
}
|
||||||
|
|
||||||
private setOpenGraphTags () {
|
|
||||||
this.metaService.setTitle(this.video.name)
|
|
||||||
|
|
||||||
this.metaService.setTag('og:type', 'video')
|
|
||||||
|
|
||||||
this.metaService.setTag('og:title', this.video.name)
|
|
||||||
this.metaService.setTag('name', this.video.name)
|
|
||||||
|
|
||||||
this.metaService.setTag('og:description', this.video.description)
|
|
||||||
this.metaService.setTag('description', this.video.description)
|
|
||||||
|
|
||||||
this.metaService.setTag('og:image', this.video.previewPath)
|
|
||||||
|
|
||||||
this.metaService.setTag('og:duration', this.video.duration.toString())
|
|
||||||
|
|
||||||
this.metaService.setTag('og:site_name', 'PeerTube')
|
|
||||||
|
|
||||||
this.metaService.setTag('og:url', window.location.href)
|
|
||||||
this.metaService.setTag('url', window.location.href)
|
|
||||||
}
|
|
||||||
|
|
||||||
private getUrlOptions (): URLOptions {
|
private getUrlOptions (): URLOptions {
|
||||||
const queryParams = this.route.snapshot.queryParams
|
const queryParams = this.route.snapshot.queryParams
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue