- for (const file of video.VideoFiles) {
- url.push({
- type: 'Link',
- mimeType: MIMETYPES.VIDEO.EXT_MIMETYPE[ file.extname ] as any,
- mediaType: MIMETYPES.VIDEO.EXT_MIMETYPE[ file.extname ] as any,
- href: video.getVideoFileUrl(file, baseUrlHttp),
- height: file.resolution,
- size: file.size,
- fps: file.fps
- })
-
- url.push({
- type: 'Link',
- mimeType: 'application/x-bittorrent' as 'application/x-bittorrent',
- mediaType: 'application/x-bittorrent' as 'application/x-bittorrent',
- href: video.getTorrentUrl(file, baseUrlHttp),
- height: file.resolution
- })
-
- url.push({
- type: 'Link',
- mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
- mediaType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
- href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs),
- height: file.resolution
- })
- }
+ addVideoFilesInAPAcc(url, video, baseUrlHttp, baseUrlWs, video.VideoFiles || [])