Class: Resolver

@bldr/vue-plugin-media~Resolver

Resolve (get the HTTP URL and some meta informations) of a remote media file by its URI. Resolve a local file. The local files have to dropped in the application. Create media elements for each media file. Create samples for playable media files.

new Resolver ()

Members

cache_ Object private

Assets with linked assets have to be cached. For example: many audio assets can have the same cover ID.

linkedUris Array

Store for linked URIs (URIs inside media assets). They are collected and resolved in a second step after the resolution of the main media assets.

multiPartUris Array

Some URIs are suffixed with a multi part asset selection (#3-5). The raw URIs are here stored, to be able to create multiPartSelections()

Methods

createSamples_ (mediaFile)Array.<module:@bldr/vue-plugin-media~Sample> async

Create samples for each playable media file. By default each media file has one sample called “complete”.

Name Type Description
mediaFile module:@bldr/vue-plugin-media.MediaFile

The mediaFile object, a client side representation of a media asset.

Returns:
Type Description
Array.<module:@bldr/vue-plugin-media~Sample>

queryMediaServer_ (field, search) asyncprivate

Name Type Description
field string

For example id or filename

search string | json

For example Fuer-Elise_HB

resolve (mediaFileSpecs) async

Resolve one or more remote media files by URIs, HTTP URLs or local media files by their file objects.

Linked media URIs are resolve in a second step (not recursive). Linked media assets are not allowed to have linked media URIs.

Name Type Description
mediaFileSpecs module:@bldr/vue-plugin-media~mediaFileSpecs

resolveHttpUrl_ (mediaFile)String asyncprivate

Name Type Description
mediaFile module:@bldr/vue-plugin-media.MediaFile

The mediaFile object, a client side representation of a media asset.

Returns:
Type Description
String
  • A HTTP URL.

resolveSingle_ (mediaFileSpec)module:@bldr/vue-plugin-media.MediaFile asyncprivate

Remote

Resolve (get the HTTP URL and some meta informations) of a remote media file by its URI.

Order of async resolution calls / tasks:

  1. mediaFile
  2. httpUrl
  3. mediaElement

Local

Resolve a local file. The local files have to dropped in in the application.

Order of async resolution calls / tasks:

  1. mediaElement
Name Type Description
mediaFileSpec module:@bldr/vue-plugin-media~mediaFileSpec

URI or File object

Returns:
Type Description
module:@bldr/vue-plugin-media.MediaFile