<commit_before># loadVideo options

## Table of Contents

  - [Overview](#overview)
  - [Properties](#prop)
    - [url](#prop-url)
    - [transport](#prop-transport)
    - [transportOptions](#prop-transportOptions)
    - [keySystems](#prop-keySystems)
    - [autoPlay](#prop-autoPlay)
    - [startAt](#prop-startAt)
    - [defaultAudioTrack](#prop-defaultAudioTrack)
    - [defaultTextTrack](#prop-defaultTextTrack)
    - [supplementaryTextTracks](#prop-supplementaryTextTracks)
    - [supplementaryImageTracks](#prop-supplementaryImageTracks)
    - [hideNativeSubtitle](#prop-hideNativeSubtitle)

## <a name="overview"></a>Overview

This page describes the options given to the ``loadVideo`` method, which is the method to use to load a new video.

These options take the form of a single objects with multiple properties, like this:
```js
// Setting the only two mandatory keys for a clear content (without DRM).
// (NOTE: if a transport has already been set on instantiation, it is not
// mandatory here anymore)
const options = {
  url: myManifestUrl,
  transport: "dash"
};

player.loadVideo(options);
```

## <a name="overview"></a>Properties

### <a name="prop-url"></a>url

_type_: ``string|undefined``

Url of the smooth/DASH manifest. This is the only mandatory property if a ``transport`` has been set on instantiation. Else, ``url`` and ``transport`` are the only two needed properties to play a content without DRM.

### <a name="prop-transport"></a>transport

_type_: ``string|undefined``

The transport used for this content. Can be either:
  - ``"dash"`` - for DASH streams
  - ``"smooth"`` - for Microsoft Smooth Streaming streams

This property is mandatory only if no default ``transport`` property was set on instantiation.

### <a name="prop-transportOptions"></a>transportOptions

_type_: ``Object|undefined``

Options concerning the "transport".
That is, the part of the code:
  - performing manifest and segment requests
  - parsing the manifest
  - parsing/updating/creating segments

This Object can contain multiple properties. Only those documented here are considered stable:
  - ``segmentLoader`` (``Function``): defines a custom segment loader. More info on it can be found [here](./plugins.md#segmentLoader).

### <a name="prop-keySystems"></a>keySystems

_type_: ``Array.<Object>|undefined``

This property is mandatory if the content uses DRM.

This property is an array of objects with the following properties (only ``type`` and ``getLicence`` are mandatory here):
  - ``type`` (``string``): the type of keySystem used (e.g. ``"widevine"``, ``"playready"`` ...)

  - ``getLicense`` (``Function``): Called as the ``keymessage`` event is received from the browser. Gets two arguments when called:
      1. the message (``Uint8Array``): The message from the CDM. Messages are Key System-specific.
      2. the messageType (``string``): The possible message types are all defined in [the w3c specification](https://w3c.github.io/encrypted-media/#idl-def-mediakeymessagetype).

      This function should return either a Promise or an Observable instance which emits the licence on resolution. Observable instances are preferred as they can be canceled.

      We set a 10 seconds timeout on this request.

  - ``persistentLicense`` (``Boolean|undefined``)<commit_msg>doc: update api documentation<commit_after># loadVideo options

## Table of Contents

  - [Overview](#overview)
  - [Properties](#prop)
    - [url](#prop-url)
    - [transport](#prop-transport)
    - [transportOptions](#prop-transportOptions)
    - [keySystems](#prop-keySystems)
    - [autoPlay](#prop-autoPlay)
    - [startAt](#prop-startAt)
    - [defaultAudioTrack](#prop-defaultAudioTrack)
    - [defaultTextTrack](#prop-defaultTextTrack)
    - [supplementaryTextTracks](#prop-supplementaryTextTracks)
    - [supplementaryImageTracks](#prop-supplementaryImageTracks)
    - [hideNativeSubtitle](#prop-hideNativeSubtitle)

## <a name="overview"></a>Overview

This page describes the options given to the ``loadVideo`` method, which is the method to use to load a new video.

These options take the form of a single objects with multiple properties, like this:
```js
// Setting the only two mandatory keys for a clear content (without DRM).
// (NOTE: if a transport has already been set on instantiation, it is not
// mandatory here anymore)
const options = {
  url: myManifestUrl,
  transport: "dash"
};

player.loadVideo(options);
```

## <a name="overview"></a>Properties

### <a name="prop-url"></a>url

_type_: ``string|undefined``

Url of the smooth/DASH manifest. This is the only mandatory property if a ``transport`` has been set on instantiation. Else, ``url`` and ``transport`` are the only two needed properties to play a content without DRM.

### <a name="prop-transport"></a>transport

_type_: ``string|undefined``

The transport used for this content. Can be either:
  - ``"dash"`` - for DASH streams
  - ``"smooth"`` - for Microsoft Smooth Streaming streams

This property is mandatory only if no default ``transport`` property was set on instantiation.

### <a name="prop-transportOptions"></a>transportOptions

_type_: ``Object|undefined``

Options concerning the "transport".
That is, the part of the code:
  - performing manifest and segment requests
  - parsing the manifest
  - parsing/updating/creating segments

This Object can contain multiple properties. Only those documented here are considered stable:
  - ``segmentLoader`` (``Function``): defines a custom segment loader. More info on it can be found [here](./plugins.md#segmentLoader).

### <a name="prop-keySystems"></a>keySystems

_type_: ``Array.<Object>|undefined``

This property is mandatory if the content uses DRM.

This property is an array of objects with the following properties (only ``type`` and ``getLicense`` are mandatory here):
  - ``type`` (``string``): the type of keySystem used (e.g. ``"widevine"``, ``"playready"`` ...)

  - ``getLicense`` (``Function``): Called as the ``keymessage`` event is received from the browser. Gets two arguments when called:
      1. the message (``Uint8Array``): The message from the CDM. Messages are Key System-specific.
      2. the messageType (``string``): The possible message types are all defined in [the w3c specification](https://w3c.github.io/encrypted-media/#idl-def-mediakeymessagetype).

      This function should return either a Promise or an Observable instance which emits the licence on resolution. Observable instances are preferred as they can be canceled.

      We set a 10 seconds timeout on this request.

  - ``serverCertificate`` (``BufferSource|undefined``): Eventual certificate used to encrypt messages to the license server.
    If set, we will try to set this certificate on the CDM. If it fails, we will still continue (albeit a warning will be emitted) to try deciphering the stream (the getLicense API will be triggered etc.).

  - ``persistentLicense`` (``Boolean|undefined``)
{'fraction_non_alphanumeric': 0.12323639504750936, 'fraction_numerical': 0.0020155485171321624, 'mean_word_length': 4.4960443037974684, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2239815', 'n_tokens_mistral': 1974, 'n_tokens_neox': 1862, 'n_words': 743}