import { VideoService } from '@app/shared/shared-main/video'
import { peertubeTranslate } from '@shared/core-utils/i18n'
import { ResultList, VideoCaption } from '@shared/models'
-import { VideoCaptionEdit } from './video-caption-edit.model'
import { environment } from '../../../../environments/environment'
+import { VideoCaptionEdit } from './video-caption-edit.model'
@Injectable()
export class VideoCaptionService {
private restExtractor: RestExtractor
) {}
- listCaptions (videoId: number | string): Observable<ResultList<VideoCaption>> {
+ listCaptions (videoId: string): Observable<ResultList<VideoCaption>> {
return this.authHttp.get<ResultList<VideoCaption>>(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions`)
.pipe(
switchMap(captionsResult => {
}
getCaptionContent ({ captionPath }: Pick<VideoCaption, 'captionPath'>) {
- return this.authHttp.get(`${environment.originServerUrl}${captionPath}`, { responseType: 'text' })
+ return this.authHttp.get(environment.originServerUrl + captionPath, { responseType: 'text' })
}
}