aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/assets/player/p2p-media-loader/segment-url-builder.ts
blob: 039777cea85564a48821c12faaf4ff321d213750 (plain) (tree)
1
2
3
4
5
6
                                               
                                                               
 
                                                                                
                                                     
                                                     







                                                                              
import { Segment } from 'p2p-media-loader-core'
import { RedundancyUrlManager } from './redundancy-url-manager'

function segmentUrlBuilderFactory (redundancyUrlManager: RedundancyUrlManager) {
  return function segmentBuilder (segment: Segment) {
    return redundancyUrlManager.buildUrl(segment.url)
  }
}

// ---------------------------------------------------------------------------

export {
  segmentUrlBuilderFactory
}