@Injectable()
export class ServerService {
+ private static BASE_SERVER_URL = environment.apiUrl + '/api/v1/server/'
private static BASE_CONFIG_URL = environment.apiUrl + '/api/v1/config/'
private static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
private static BASE_LOCALE_URL = environment.apiUrl + '/client/locales/'
css: ''
}
},
+ email: {
+ enabled: false
+ },
+ contactForm: {
+ enabled: false
+ },
serverVersion: 'Unknown',
signup: {
allowed: false,
requiresEmailVerification: false
},
transcoding: {
- enabledResolutions: []
+ enabledResolutions: [],
+ hls: {
+ enabled: false
+ }
},
avatar: {
file: {
enabled: false
}
}
+ },
+ trending: {
+ videos: {
+ intervalDays: 0
+ }
}
}
private videoCategories: Array<VideoConstant<number>> = []
return this.videoPrivacies
}
- getAbout () {
- return this.http.get<About>(ServerService.BASE_CONFIG_URL + '/about')
- }
-
private loadVideoAttributeEnum (
attributeName: 'categories' | 'licences' | 'languages' | 'privacies',
hashToPopulate: VideoConstant<string | number>[],
this.localeObservable
.pipe(
switchMap(translations => {
- return this.http.get(ServerService.BASE_VIDEO_URL + attributeName)
- .pipe(map((data: any) => ({ data, translations })))
+ return this.http.get<{ [id: string]: string }>(ServerService.BASE_VIDEO_URL + attributeName)
+ .pipe(map(data => ({ data, translations })))
})
)
.subscribe(({ data, translations }) => {