AbstractUserSettingsService
On this page
- AbstractUserSettingsService ⇐
Abstract
- AbstractUserSettingsService()
- DEFAULT_PIN_CODE :
string
- DEFAULT_PERSONAL_PIN_CODE_STATUS :
string
- getPreferredMenuLanguage(options) ⇒
Promise.<string, Error>
- getPreferredAudioLanguage(options) ⇒
Promise.<string, Error>
- getPreferredSubtitleLanguage(options) ⇒
Promise.<string, Error>
- setPreferredMenuLanguage(language) ⇒
Promise.<string, Error>
- setPreferredAudioLanguage(language) ⇒
Promise.<string, Error>
- setPreferredSubtitleLanguage(language) ⇒
Promise.<string, Error>
- getSubtitlesEnabled(options) ⇒
Promise.<boolean, Error>
- setSubtitlesEnabled(enable) ⇒
Promise.<string, Error>
- getAudioDescriptionEnabled(options) ⇒
Promise.<boolean, Error>
- setAudioDescriptionEnabled(enable) ⇒
Promise.<string, Error>
- getPvrPaddingStart(options) ⇒
Promise.<string, Error>
- getPvrPaddingEnd(options) ⇒
Promise.<string, Error>
- setPvrPaddingStart(paddingTimeInMs) ⇒
Promise.<number, Error>
- setPvrPaddingEnd(paddingTimeInMs) ⇒
Promise.<number, Error>
- getTimezone(options) ⇒
Promise.<number, Error>
- setTimezone(timezone) ⇒
Promise.<number, Error>
- getCountry(options) ⇒
Promise.<number, Error>
- setCountry(country) ⇒
Promise.<string, Error>
- getPreferredLiveSource(options) ⇒
Promise.<LiveSourceType, Error>
- setPreferredLiveSource(sourceType, options) ⇒
Promise.<LiveSourceType, Error>
- getAvailableLiveSource(options) ⇒
Promise.<Array.<LiveSourceType>, Error>
- isPersonalCodeSettled() ⇒
Promise.<boolean>
- checkPersonalCode(pinCode) ⇒
Promise.<integer>
- setPersonalCode(oldPinCode, newPinCode) ⇒
Promise.<integer>
- resetPersonalCode() ⇒
Promise.<Boolean, Error>
- getPersonalCodeStatus(options) ⇒
Promise.<string, Error>
- setPersonalCodeStatus(value, options) ⇒
Promise.<string, Error>
- _getPreferredMenuLanguage(options) ⇒
Promise.<string, Error>
- _getPreferredAudioLanguage(options) ⇒
Promise.<string, Error>
- _getPreferredSubtitleLanguage(options) ⇒
Promise.<string, Error>
- _getPvrPaddingStart(options) ⇒
Promise.<number, Error>
- _getPvrPaddingEnd(options) ⇒
Promise.<number, Error>
- _getTimezone(options) ⇒
Promise.<number, Error>
- _getSubtitlesEnabled(options) ⇒
Promise.<number, Error>
- _getAudioDescriptionEnabled(options) ⇒
Promise.<number, Error>
- _setPreferredMenuLanguage(language) ⇒
Promise
- _setPreferredAudioLanguage(language) ⇒
Promise
- _setPreferredSubtitleLanguage(language) ⇒
Promise
- _setPvrPaddingStart(paddingStart) ⇒
Promise
- _setPvrPaddingEnd(paddingEnd) ⇒
Promise
- _setTimezone(timezone) ⇒
Promise.<number, Error>
- _setSubtitlesEnabled(enable) ⇒
Promise.<string, Error>
- _setAudioDescriptionEnabled(enable) ⇒
Promise.<string, Error>
- _getPreferredLiveSource(options) ⇒
Promise.<LiveSourceType, Error>
- _setPreferredLiveSource(sourceType, options) ⇒
Promise.<LiveSourceType, Error>
- _getAvailableLiveSource(options) ⇒
Promise.<Array.<LiveSourceType>, Error>
- _isPersonalCodeSettled() ⇒
Promise.<boolean>
- _checkPersonalCode(pinCode) ⇒
Promise.<integer>
- _setPersonalCode(oldPinCode, newPinCode) ⇒
Promise.<integer>
- _getPersonalCodeStatus(options) ⇒
Promise
- _setPersonalCodeStatus(value, options) ⇒
Promise
- _getUserSettingsProperty(type, options) ⇒
*
- _setUserSettingsProperty(type, language, options) ⇒
Promise
- _onPreferredMenuLanguageChange(language, oldLanguage) ⇒
Promise
- _onPreferredAudioLanguageChange(language, oldLanguage) ⇒
Promise
- _onPreferredSubtitleLanguageChange(language, oldLanguage) ⇒
Promise
- _onPvrPaddingStartChange(paddingStart, oldPaddingStart) ⇒
Promise
- _onPvrPaddingEndChange(paddingEnd, oldPaddingEnd) ⇒
Promise
- _onTimezoneChange(timezone, oldTimezone) ⇒
Promise
- _onCountryChange(country, oldCountry) ⇒
Promise
- _onSubtitlesEnabledChange(country, oldCountry) ⇒
Promise
- _onAudioDescriptionEnabledChange(enable, oldEnabled) ⇒
Promise
- “preferredMenuLanguageChange” (language, oldLanguage)
- “preferredAudioLanguageChange” (language, oldLanguage)
- “preferredSubtitleLanguageChange” (language, oldLanguage)
- “pvrPaddingStartChange” (paddingStart, oldPaddingStart)
- “pvrPaddingEndChange” (paddingEnd, oldPaddingEnd)
- “timezoneChange” (timezone, oldTimezone)
- “countryChange” (country, oldCountry)
- “subtitlesEnabledChange” (enabled, oldEnabled)
- “audioDescriptionEnabledChange” (enabled, oldEnabled)
- “preferredLiveSourceChange” (sourceType, oldSourceType)
- “PersonalCodeChange” (newCode, oldCode)
- “liveSourceChange” (sourceType, oldSourceType) ⇒
Promise
- “personalCodeChange” (newCode, oldCode) ⇒
Promise
AbstractUserSettingsService ⇐ Abstract
Kind: global abstract class
Extends: Abstract
Mixes: MServiceCache
Service:
Properties
Name | Type | Description |
---|---|---|
personalCodeIsSettled | boolean | If the pin code is settled, true by default - FOR TESTING PURPOSE ONLY ! |
- AbstractUserSettingsService ⇐
Abstract
- new AbstractUserSettingsService()
- .DEFAULT_PIN_CODE :
string
- .DEFAULT_PERSONAL_PIN_CODE_STATUS :
string
- .getPreferredMenuLanguage(options) ⇒
Promise.<string, Error>
- .getPreferredAudioLanguage(options) ⇒
Promise.<string, Error>
- .getPreferredSubtitleLanguage(options) ⇒
Promise.<string, Error>
- .setPreferredMenuLanguage(language) ⇒
Promise.<string, Error>
- .setPreferredAudioLanguage(language) ⇒
Promise.<string, Error>
- .setPreferredSubtitleLanguage(language) ⇒
Promise.<string, Error>
- .getSubtitlesEnabled(options) ⇒
Promise.<boolean, Error>
- .setSubtitlesEnabled(enable) ⇒
Promise.<string, Error>
- .getAudioDescriptionEnabled(options) ⇒
Promise.<boolean, Error>
- .setAudioDescriptionEnabled(enable) ⇒
Promise.<string, Error>
- .getPvrPaddingStart(options) ⇒
Promise.<string, Error>
- .getPvrPaddingEnd(options) ⇒
Promise.<string, Error>
- .setPvrPaddingStart(paddingTimeInMs) ⇒
Promise.<number, Error>
- .setPvrPaddingEnd(paddingTimeInMs) ⇒
Promise.<number, Error>
- .getTimezone(options) ⇒
Promise.<number, Error>
- .setTimezone(timezone) ⇒
Promise.<number, Error>
- .getCountry(options) ⇒
Promise.<number, Error>
- .setCountry(country) ⇒
Promise.<string, Error>
- .getPreferredLiveSource(options) ⇒
Promise.<LiveSourceType, Error>
- .setPreferredLiveSource(sourceType, options) ⇒
Promise.<LiveSourceType, Error>
- .getAvailableLiveSource(options) ⇒
Promise.<Array.<LiveSourceType>, Error>
- .isPersonalCodeSettled() ⇒
Promise.<boolean>
- .checkPersonalCode(pinCode) ⇒
Promise.<integer>
- .setPersonalCode(oldPinCode, newPinCode) ⇒
Promise.<integer>
- .resetPersonalCode() ⇒
Promise.<Boolean, Error>
- .getPersonalCodeStatus(options) ⇒
Promise.<string, Error>
- .setPersonalCodeStatus(value, options) ⇒
Promise.<string, Error>
- ._getPreferredMenuLanguage(options) ⇒
Promise.<string, Error>
- ._getPreferredAudioLanguage(options) ⇒
Promise.<string, Error>
- ._getPreferredSubtitleLanguage(options) ⇒
Promise.<string, Error>
- ._getPvrPaddingStart(options) ⇒
Promise.<number, Error>
- ._getPvrPaddingEnd(options) ⇒
Promise.<number, Error>
- ._getTimezone(options) ⇒
Promise.<number, Error>
- ._getSubtitlesEnabled(options) ⇒
Promise.<number, Error>
- ._getAudioDescriptionEnabled(options) ⇒
Promise.<number, Error>
- ._setPreferredMenuLanguage(language) ⇒
Promise
- ._setPreferredAudioLanguage(language) ⇒
Promise
- ._setPreferredSubtitleLanguage(language) ⇒
Promise
- ._setPvrPaddingStart(paddingStart) ⇒
Promise
- ._setPvrPaddingEnd(paddingEnd) ⇒
Promise
- ._setTimezone(timezone) ⇒
Promise.<number, Error>
- ._setSubtitlesEnabled(enable) ⇒
Promise.<string, Error>
- ._setAudioDescriptionEnabled(enable) ⇒
Promise.<string, Error>
- ._getPreferredLiveSource(options) ⇒
Promise.<LiveSourceType, Error>
- ._setPreferredLiveSource(sourceType, options) ⇒
Promise.<LiveSourceType, Error>
- ._getAvailableLiveSource(options) ⇒
Promise.<Array.<LiveSourceType>, Error>
- ._isPersonalCodeSettled() ⇒
Promise.<boolean>
- ._checkPersonalCode(pinCode) ⇒
Promise.<integer>
- ._setPersonalCode(oldPinCode, newPinCode) ⇒
Promise.<integer>
- ._getPersonalCodeStatus(options) ⇒
Promise
- ._setPersonalCodeStatus(value, options) ⇒
Promise
- ._getUserSettingsProperty(type, options) ⇒
*
- ._setUserSettingsProperty(type, language, options) ⇒
Promise
- ._onPreferredMenuLanguageChange(language, oldLanguage) ⇒
Promise
- ._onPreferredAudioLanguageChange(language, oldLanguage) ⇒
Promise
- ._onPreferredSubtitleLanguageChange(language, oldLanguage) ⇒
Promise
- ._onPvrPaddingStartChange(paddingStart, oldPaddingStart) ⇒
Promise
- ._onPvrPaddingEndChange(paddingEnd, oldPaddingEnd) ⇒
Promise
- ._onTimezoneChange(timezone, oldTimezone) ⇒
Promise
- ._onCountryChange(country, oldCountry) ⇒
Promise
- ._onSubtitlesEnabledChange(country, oldCountry) ⇒
Promise
- ._onAudioDescriptionEnabledChange(enable, oldEnabled) ⇒
Promise
- “preferredMenuLanguageChange” (language, oldLanguage)
- “preferredAudioLanguageChange” (language, oldLanguage)
- “preferredSubtitleLanguageChange” (language, oldLanguage)
- “pvrPaddingStartChange” (paddingStart, oldPaddingStart)
- “pvrPaddingEndChange” (paddingEnd, oldPaddingEnd)
- “timezoneChange” (timezone, oldTimezone)
- “countryChange” (country, oldCountry)
- “subtitlesEnabledChange” (enabled, oldEnabled)
- “audioDescriptionEnabledChange” (enabled, oldEnabled)
- “preferredLiveSourceChange” (sourceType, oldSourceType)
- “PersonalCodeChange” (newCode, oldCode)
- “liveSourceChange” (sourceType, oldSourceType) ⇒
Promise
- “personalCodeChange” (newCode, oldCode) ⇒
Promise
AbstractUserSettingsService()
Manage the user settings
DEFAULT_PIN_CODE : string
Default PIN_CODE for
Kind: instance constant of AbstractUserSettingsService
DEFAULT_PERSONAL_PIN_CODE_STATUS : string
Default status for PERSONAL_PIN_CODE
Kind: instance constant of AbstractUserSettingsService
getPreferredMenuLanguage(options) ⇒ Promise.<string, Error>
Get the preferred language for the menu.
Returns a comma-separated set of languages to be used for the user interface of the application, in order of preference. Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2].
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
getPreferredAudioLanguage(options) ⇒ Promise.<string, Error>
Get the preferred language for the audio.
Returns comma-separated set of languages to be used for audio playback, in order of preference. Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2].
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
getPreferredSubtitleLanguage(options) ⇒ Promise.<string, Error>
Get the preferred language for the subtitle.
Returns a comma-separated set of languages to be used for subtitle playback, in order of preference Each language SHALL be indicated by its ISO 639-2 language code as defined in [ISO 639-2]
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setPreferredMenuLanguage(language) ⇒ Promise.<string, Error>
Set the preferred menu language Fires the onPreferredMenuLanguageChange if the language has been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Emits: preferredMenuLanguageChange
Param | Type | Description |
---|---|---|
language | string | A comma-separated list of the preferred languages, in order of preference |
setPreferredAudioLanguage(language) ⇒ Promise.<string, Error>
Set the preferred audio language Fires the onPreferredAudioLanguageChange if the language has been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Emits: preferredAudioLanguageChange
Param | Type |
---|---|
language | string |
setPreferredSubtitleLanguage(language) ⇒ Promise.<string, Error>
Set the preferred subtitle language Fires the onPreferredSubtitleLanguageChange if the language has been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Emits: preferredSubtitleLanguageChange
Param | Type | Description |
---|---|---|
language | string | The new language |
getSubtitlesEnabled(options) ⇒ Promise.<boolean, Error>
Are the subtitles enabled globally
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<boolean, Error>
- A promise resolved to true if subtitles are enebaled
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setSubtitlesEnabled(enable) ⇒ Promise.<string, Error>
Enable/Disable subtitles globally Even if it is disabled, you can still show a subtitle for a playing media. But it will be reset for the next media.
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (subtitleIsEnabled, error)
Param | Type | Description |
---|---|---|
enable | boolean | True to enable subtitle |
getAudioDescriptionEnabled(options) ⇒ Promise.<boolean, Error>
Does the audioDescription enabled globally
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<boolean, Error>
- A promise resolved to true if subtitles are enabled
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setAudioDescriptionEnabled(enable) ⇒ Promise.<string, Error>
Enable/Disable audioDescription globally Even if it is disabled, you can still set audiodescription for a playing media. But it will be reset for the next media.
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (audioDescriptionIsEnabled, error)
Param | Type | Description |
---|---|---|
enable | boolean | True to enable subtitle |
getPvrPaddingStart(options) ⇒ Promise.<string, Error>
Get the default pvr padding start, which is the time in ms the recording will be started before it’s start time
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
getPvrPaddingEnd(options) ⇒ Promise.<string, Error>
Get the default pvr padding end, which is the time in ms the recording will be stop after it’s end time
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setPvrPaddingStart(paddingTimeInMs) ⇒ Promise.<number, Error>
Set the default pvr padding start, which is the time in ms the recording will be started before it’s start time Fires the onPvrPaddingStartChange if the time have been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (paddingTimeInMs, error)
Emits: pvrPaddingStartChange
Param | Type | Description |
---|---|---|
paddingTimeInMs | number | The new padding time in ms |
setPvrPaddingEnd(paddingTimeInMs) ⇒ Promise.<number, Error>
Set the default pvr padding end, which is the time in ms the recording will be stop after it’s end time Fires the onPvrPaddingEndChange if the time has been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (paddingTimeInMs, error)
Emits: pvrPaddingEndChange
Param | Type | Description |
---|---|---|
paddingTimeInMs | number | The new padding time in ms |
getTimezone(options) ⇒ Promise.<number, Error>
Returns an integer indicating the time zone within a country in which the receiver is deployed. A value of 0 SHALL represent the eastern-most time zone in the country, a value of 1 SHALL represent the next time zone to the west, and so on.
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (timezone, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setTimezone(timezone) ⇒ Promise.<number, Error>
Set the timezone
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (timezone, error)
Emits: timezoneChange
Param | Type | Description |
---|---|---|
timezone | number | The new timezone |
getCountry(options) ⇒ Promise.<number, Error>
Get the preferred country (ISO-3166 three character country code identifying the country)
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (country, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setCountry(country) ⇒ Promise.<string, Error>
Set the preferred country code Fires the onPreferredMenuLanguageChange if the language has been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (country, error)
Emits: countryChange
Param | Type | Description |
---|---|---|
country | string | The ISO-3166 three character country code identifying the country |
getPreferredLiveSource(options) ⇒ Promise.<LiveSourceType, Error>
Get the preferred live source type
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<LiveSourceType, Error>
- Return a promise (LiveSourceType, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.channel] | Channel |
| If not null returns preferred source of channel |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
setPreferredLiveSource(sourceType, options) ⇒ Promise.<LiveSourceType, Error>
Set the preferred live source type Fires the onPreferredLiveSourceChange if the language has been changed
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<LiveSourceType, Error>
- Return a promise (LiveSourceType, error)
Emits: preferredLiveSourceChange
Param | Type | Default | Description |
---|---|---|---|
sourceType | LiveSourceType | The preferred live source type | |
options | Object | Additional options | |
[options.channel] | Channel |
| If not null returns preferred source of channel |
[options.duration] | number |
| Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getAvailableLiveSource(options) ⇒ Promise.<Array.<LiveSourceType>, Error>
Get the available live source type
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<Array.<LiveSourceType>, Error>
- Return a promise (LiveSourceType[], error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.channel] | Channel |
| If not null returns available source types of channel |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
isPersonalCodeSettled() ⇒ Promise.<boolean>
Make sur that the pin code has been created For some operators, when the client forget its code, he call the customer service that will unset the pin code (ie, it does not reset the pin code to a value, instead it invalidates the current pin code) In such case, you need to check if the pin code is settled, before checking the pin code
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<boolean>
- true if the pin code is settled
checkPersonalCode(pinCode) ⇒ Promise.<integer>
Verify that the PIN specified by pinCode is the correct parental control PIN.
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<integer>
- A promise returning an integer value as: PIN_CODE_IS_CORRECT
, PIN_CODE_IS_INCORRECT
or PIN_CODE_IS_LOCKED
See: PinCodeStatus
Param | Type | Description |
---|---|---|
pinCode | string | The parental control PIN to be verified. |
setPersonalCode(oldPinCode, newPinCode) ⇒ Promise.<integer>
Set the parental control PIN
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<integer>
- A promise returning an integer value as: PIN_CODE_IS_CORRECT
, PIN_CODE_IS_INCORRECT
or PIN_CODE_IS_LOCKED
See: PinCodeStatus
Param | Type | Description |
---|---|---|
oldPinCode | string | The current parental control PIN. |
newPinCode | string | the new value for the parental control PIN. |
resetPersonalCode() ⇒ Promise.<Boolean, Error>
Used to reset the parental Pin code to his initial value
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<Boolean, Error>
- A promise (true, error)
getPersonalCodeStatus(options) ⇒ Promise.<string, Error>
Get the personal code status (enabled or disabled)
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- A promise (enabled, error)
Param | Type | Description |
---|---|---|
options | Object | Additional options |
setPersonalCodeStatus(value, options) ⇒ Promise.<string, Error>
Set the personal code status (enabled or disabled)
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- A promise (enabled, error)
Param | Type | Description |
---|---|---|
value | String | The status of personal code |
options | Object | Additional options |
_getPreferredMenuLanguage(options) ⇒ Promise.<string, Error>
Vendor implementation to get the preferred language for the menu.
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Access: protected
Param | Type | Description |
---|---|---|
options | Object | Additional options |
_getPreferredAudioLanguage(options) ⇒ Promise.<string, Error>
Vendor implementation to get the preferred language for the audio.
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Access: protected
Param | Type | Description |
---|---|---|
options | Object | Additional options |
_getPreferredSubtitleLanguage(options) ⇒ Promise.<string, Error>
Vendor implementation to get the preferred language for the subtitle.
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (language, error)
Access: protected
Param | Type | Description |
---|---|---|
options | Object | Additional options |
_getPvrPaddingStart(options) ⇒ Promise.<number, Error>
Vendor implementation to get the pvr padding start.
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (paddingStart, error)
Access: protected
Param | Type | Description |
---|---|---|
options | Object | Additional options |
_getPvrPaddingEnd(options) ⇒ Promise.<number, Error>
Vendor implementation to get the pvr padding end.
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (paddingEnd, error)
Access: protected
Param | Type | Description |
---|---|---|
options | Object | Additional options |
_getTimezone(options) ⇒ Promise.<number, Error>
Vendor implementation to get the timezone
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (timezone, error)
Access: protected
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
_getSubtitlesEnabled(options) ⇒ Promise.<number, Error>
Vendor implementation to know if subtitles are enabled globally
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (enabled, error)
Access: protected
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
_getAudioDescriptionEnabled(options) ⇒ Promise.<number, Error>
Vendor implementation to know if audioDescription are enabled globally
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (enabled, error)
Access: protected
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
_setPreferredMenuLanguage(language) ⇒ Promise
Vendor implementation to set the preferred menu language
Kind: instance abstract method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
language | string | The new language |
_setPreferredAudioLanguage(language) ⇒ Promise
Vendor implementation to set the preferred audio language
Kind: instance abstract method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
language | string | The new language |
_setPreferredSubtitleLanguage(language) ⇒ Promise
Vendor implementation to set the preferred subtitle language
Kind: instance abstract method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
language | string | The new language |
_setPvrPaddingStart(paddingStart) ⇒ Promise
Vendor implementation to set the pvr padding start
Kind: instance abstract method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
paddingStart | number | The new padding start |
_setPvrPaddingEnd(paddingEnd) ⇒ Promise
Vendor implementation to set the pvr padding stop
Kind: instance abstract method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
paddingEnd | number | The new padding stop |
_setTimezone(timezone) ⇒ Promise.<number, Error>
Vendor implementation to set the timezone
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<number, Error>
- Return a promise (timezone, error)
Access: protected
Param | Type | Description |
---|---|---|
timezone | number | The new timezone |
_setSubtitlesEnabled(enable) ⇒ Promise.<string, Error>
Vendor implementation to enable/disable the subtitles globally
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (subtitleIsEnabled, error)
Access: protected
Param | Type | Description |
---|---|---|
enable | boolean | True to enable subtitle |
_setAudioDescriptionEnabled(enable) ⇒ Promise.<string, Error>
Vendor implementation to enable/disable the audioDescription globally
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<string, Error>
- Return a promise (subtitleIsEnabled, error)
Access: protected
Param | Type | Description |
---|---|---|
enable | boolean | True to enable audioDescription |
_getPreferredLiveSource(options) ⇒ Promise.<LiveSourceType, Error>
Get the preferred live source type
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<LiveSourceType, Error>
- Return a promise (LiveSourceType, error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.channel] | Channel |
| If not null returns preferred source of channel |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
_setPreferredLiveSource(sourceType, options) ⇒ Promise.<LiveSourceType, Error>
Set the preferred live source type Fires the onPreferredLiveSourceChange if the language has been changed
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<LiveSourceType, Error>
- Return a promise (LiveSourceType, error)
Emits: liveSourceChange
Param | Type | Default | Description |
---|---|---|---|
sourceType | LiveSourceType | The preferred live source type | |
options | Object | Additional options | |
[options.channel] | Channel |
| If not null returns preferred source of channel |
_getAvailableLiveSource(options) ⇒ Promise.<Array.<LiveSourceType>, Error>
Get the available live source type
Kind: instance abstract method of AbstractUserSettingsService
Returns: Promise.<Array.<LiveSourceType>, Error>
- Return a promise (LiveSourceType[], error)
Param | Type | Default | Description |
---|---|---|---|
options | Object | Additional options | |
[options.channel] | Channel |
| If not null returns available source types of channel |
[options.force] | boolean | false | If true, don't use the value stored in the cache |
_isPersonalCodeSettled() ⇒ Promise.<boolean>
You may override these methods, depending on the way the customer service of your operator reset a lost pin code These method comes with a default implementation that returns true
Kind: instance method of AbstractUserSettingsService
Returns: Promise.<boolean>
- true if the pin code is settled
Access: protected
_checkPersonalCode(pinCode) ⇒ Promise.<integer>
Kind: instance abstract method of AbstractUserSettingsService
Param | Type | Description |
---|---|---|
pinCode | string | parental control PIN |
_setPersonalCode(oldPinCode, newPinCode) ⇒ Promise.<integer>
Kind: instance abstract method of AbstractUserSettingsService
Param | Type | Description |
---|---|---|
oldPinCode | string | parental control PIN |
newPinCode | string | parental control PIN |
_getPersonalCodeStatus(options) ⇒ Promise
A default implementation that use the Storage Service to get personal code status
Kind: instance abstract method of AbstractUserSettingsService
Param | Type | Description |
---|---|---|
options | Object | Additional options |
[options.key] | String | The used key for the Storage Service |
_setPersonalCodeStatus(value, options) ⇒ Promise
A default implementation that use the Storage Service to set personal code status
Kind: instance abstract method of AbstractUserSettingsService
Param | Type | Description |
---|---|---|
value | String | The status of personal code |
options | Object | Additional options |
[options.key] | String | The used key for the Storage Service |
_getUserSettingsProperty(type, options) ⇒ *
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type |
---|---|
type | string | number |
options | Object |
_setUserSettingsProperty(type, language, options) ⇒ Promise
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Default | Description |
---|---|---|---|
type | string | number | ||
language | string | ||
options | Object | ||
[options.duration] | number |
| Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
_onPreferredMenuLanguageChange(language, oldLanguage) ⇒ Promise
Fired when the preferred menu language has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
language | string | The new menu language |
oldLanguage | string | The previous menu language |
_onPreferredAudioLanguageChange(language, oldLanguage) ⇒ Promise
Fired when the preferred audio language has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
language | String | The new audio language |
oldLanguage | String | The previous audio language |
_onPreferredSubtitleLanguageChange(language, oldLanguage) ⇒ Promise
Fired when the preferred subtitle language has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
language | String | The new subtitle language |
oldLanguage | String | The previous audio language |
_onPvrPaddingStartChange(paddingStart, oldPaddingStart) ⇒ Promise
Fired when the pvrPaddingStart has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
paddingStart | number | The new padding start |
oldPaddingStart | number | The previous padding start |
_onPvrPaddingEndChange(paddingEnd, oldPaddingEnd) ⇒ Promise
Fired when the pvrPaddingEnd has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
paddingEnd | number | The new padding end |
oldPaddingEnd | number | The previous padding end |
_onTimezoneChange(timezone, oldTimezone) ⇒ Promise
Fired when the timezone has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
timezone | number | The new timezone |
oldTimezone | number | The previous timezone |
_onCountryChange(country, oldCountry) ⇒ Promise
Fired when the country has been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type | Description |
---|---|---|
country | string | The new country |
oldCountry | string | The previous country |
_onSubtitlesEnabledChange(country, oldCountry) ⇒ Promise
Fired when the global policy on enabling/disabling subtitles have been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type |
---|---|
country | string |
oldCountry | String |
_onAudioDescriptionEnabledChange(enable, oldEnabled) ⇒ Promise
Fired when the global policy on enabling/disabling audioDescription have been changed
Kind: instance method of AbstractUserSettingsService
Access: protected
Param | Type |
---|---|
enable | string |
oldEnabled | String |
“preferredMenuLanguageChange” (language, oldLanguage)
Fired when the preferred menu language has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
language | string | The new menu language |
oldLanguage | string | The previous menu language |
“preferredAudioLanguageChange” (language, oldLanguage)
Fired when the preferred audio language has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
language | string | The new audio language |
oldLanguage | string | The previous audio language |
“preferredSubtitleLanguageChange” (language, oldLanguage)
Fired when the preferred subtitle language has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
language | string | The new subtitle language |
oldLanguage | string | The previous audio language |
“pvrPaddingStartChange” (paddingStart, oldPaddingStart)
Fired when the pvrPaddingStart has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
paddingStart | number | The new padding start |
oldPaddingStart | number | The previous padding start |
“pvrPaddingEndChange” (paddingEnd, oldPaddingEnd)
Fired when the pvrPaddingEnd has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
paddingEnd | number | The new padding end |
oldPaddingEnd | number | The previous padding end |
“timezoneChange” (timezone, oldTimezone)
Fired when the timezone has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
timezone | number | The new timezone |
oldTimezone | number | The previous timezone |
“countryChange” (country, oldCountry)
Fired when the country has been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
country | string | The new country |
oldCountry | string | The previous country |
“subtitlesEnabledChange” (enabled, oldEnabled)
Fired when the global policy on enabling/disabling subtitles have been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
enabled | boolean | True if enabled |
oldEnabled | string | The previous value |
“audioDescriptionEnabledChange” (enabled, oldEnabled)
Fired when the global policy on enabling/disabling audioDescription have been changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
enabled | boolean | True if enabled |
oldEnabled | string | The previous value |
“preferredLiveSourceChange” (sourceType, oldSourceType)
Fired when the preferred live source type changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
sourceType | LiveSourceType | New preferred source type |
oldSourceType | LiveSourceType | The previous value |
“PersonalCodeChange” (newCode, oldCode)
Fired when the Personal code changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
newCode | String | New preferred source type |
oldCode | String | The previous value |
“liveSourceChange” (sourceType, oldSourceType) ⇒ Promise
Fired when the preferred live source type changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
sourceType | LiveSourceType | New preferred source type |
oldSourceType | LiveSourceType | The previous value |
“personalCodeChange” (newCode, oldCode) ⇒ Promise
Fired when the personal code changed
Kind: event emitted by AbstractUserSettingsService
Param | Type | Description |
---|---|---|
newCode | String | New user personal code |
oldCode | String | The previous value |