• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiDrmService

Class Summary

Extends:
  • ToiEventTarget
See also:
  • ToiDrmObserver

The ToiDrmService provides application access to the DRM service.

Technical Preview:

This interface is a TECHNICAL PREVIEW, it may change.

Service:

This is a service and can be accessed through toi.drmService
  • Methods
  • Members
  • Types
  • Events

Method Summary

getAudioOutputRestrictions ( sessionId )  → Array.<ToiDrmService.ToiAudioOutputRestriction>

Returns the current audio output restrictions for a specific session.

getCurrentOutputControl ( sessionId )  → outputControl

Returns the current output control for a specific session.

getVideoOutputRestrictions ( sessionId )  → Array.<ToiDrmService.ToiVideoOutputRestriction>

Returns the current video output restrictions for a specific session.

Inherited Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Type Definitions

ToiApsMode (Type: enum)

APS (Analog Protection System) mode

  • APS_MODE_AGC
  • APS_MODE_AGC_2_LINES
  • APS_MODE_AGC_4_LINES
  • APS_MODE_COPY_FREE
ToiAudioOutputType (Type: enum)

Data type used for identifying audio output type.

  • AUDIO_OUTPUT_TYPE_HDMI
  • AUDIO_OUTPUT_TYPE_SPDIF
ToiAudioRestriction (Type: enum)

Data type used for identifying restrictions on audio output. This type should be used as a bitmask as defined below.

  • AUDIO_RESTRICTION_NO_COMPRESSED
  • AUDIO_RESTRICTION_NO_UNCOMPRESSED
ToiCgmsaMode (Type: enum)

CGMS-A (Copy Generation Management System - Analog) Copy control mode

  • CGMSA_MODE_NO_COPYING_ALLOWED
  • CGMSA_MODE_NO_MORE_COPIES
  • CGMSA_MODE_NO_RESTRICTION
  • CGMSA_MODE_ONE_MORE_COPY
ToiCopyPermission (Type: enum)

Copy permissions.

  • COPY_PERMISSION_10
  • COPY_PERMISSION_FREE
  • COPY_PERMISSION_NEVER
  • COPY_PERMISSION_NO_MORE
  • COPY_PERMISSION_ONCE
ToiScmsMode (Type: enum)

SCMS (Serial Copy Management System) mode

  • SCMS_MODE_COPY_FREE
  • SCMS_MODE_NO_COPYING_ALLOWED
  • SCMS_MODE_ONE_MORE_COPY
ToiVideoOutputType (Type: enum)

Data type used for identifying video output type.

  • VIDEO_OUTPUT_TYPE_ANALOG
  • VIDEO_OUTPUT_TYPE_HDMI
ToiVideoRestriction (Type: enum)

Data type used for identifying restrictions on video output. This type should be used as a bitmask as defined below.

  • VIDEO_RESTRICTION_MUTE

Events

  • ON_AUDIO_OUTPUT_RESTRICTIONS_CHANGED
  • ON_CCI_CHANGED
  • ON_VIDEO_OUTPUT_RESTRICTIONS_CHANGED

Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

Inherited From:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

The JavaScript function that will receive events.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.

getAudioOutputRestrictions ( sessionId )  → Array.<ToiDrmService.ToiAudioOutputRestriction>

Returns the current audio output restrictions for a specific session.

Parameters:

Name Type Description
sessionId ToiMediaSession.ToiSessionId

The media session for which the restrictions are requested.

Throws:

ToiInvalidArgumentException

The media session identifier is invalid.

Returns:

The sequence of audio output restrictions.

Type: Array.<ToiDrmService.ToiAudioOutputRestriction>
getCurrentOutputControl ( sessionId )  → outputControl

Returns the current output control for a specific session.

Parameters:

Name Type Description
sessionId ToiMediaSession.ToiSessionId

The media session for which the CCI is requested.

Throws:

ToiInvalidArgumentException

The media session identifier is invalid.

Returns:

Structure with output control settings.

Type: ToiDrmService.ToiOutputControl
getVideoOutputRestrictions ( sessionId )  → Array.<ToiDrmService.ToiVideoOutputRestriction>

Returns the current video output restrictions for a specific session.

Parameters:

Name Type Description
sessionId ToiMediaSession.ToiSessionId

The media session for which the restrictions are requested.

Throws:

ToiInvalidArgumentException

The media session identifier is invalid.

Returns:

The sequence of video output restrictions.

Type: Array.<ToiDrmService.ToiVideoOutputRestriction>
removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

The JavaScript function that was previously added as an event listener.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.

Members

ON_AUDIO_OUTPUT_RESTRICTIONS_CHANGED (Type: ToiDrmAudioOutputRestrictionsChangedEvent) (value = 3701) (static, constant)

This is an Event identifier for ToiDrmAudioOutputRestrictionsChangedEvent.

Invoked when the audio output restrictions for a session have changed.

This constant can be also be accessed from toi.consts.ToiDrmService.ON_AUDIO_OUTPUT_RESTRICTIONS_CHANGED.
ON_CCI_CHANGED (Type: ToiDrmCciChangedEvent) (value = 3700) (static, constant)

This is an Event identifier for ToiDrmCciChangedEvent.

Invoked when the Copy Control Information (Cci) for a session has changed.

This constant can be also be accessed from toi.consts.ToiDrmService.ON_CCI_CHANGED.
ON_VIDEO_OUTPUT_RESTRICTIONS_CHANGED (Type: ToiDrmVideoOutputRestrictionsChangedEvent) (value = 3702) (static, constant)

This is an Event identifier for ToiDrmVideoOutputRestrictionsChangedEvent.

Invoked when the video output restrictions for a session have changed.

This constant can be also be accessed from toi.consts.ToiDrmService.ON_VIDEO_OUTPUT_RESTRICTIONS_CHANGED.
APS_MODE_AGC (Type: ToiDrmService.ToiApsMode) (value = 1) (static, constant)

PSP (pseudo-sync pulse) operation on.

This constant can be also be accessed from toi.consts.ToiDrmService.APS_MODE_AGC.
APS_MODE_AGC_2_LINES (Type: ToiDrmService.ToiApsMode) (value = 2) (static, constant)

PSP on, 2-line color striping on.

This constant can be also be accessed from toi.consts.ToiDrmService.APS_MODE_AGC_2_LINES.
APS_MODE_AGC_4_LINES (Type: ToiDrmService.ToiApsMode) (value = 3) (static, constant)

PSP on, 4-line color striping on.

This constant can be also be accessed from toi.consts.ToiDrmService.APS_MODE_AGC_4_LINES.
APS_MODE_COPY_FREE (Type: ToiDrmService.ToiApsMode) (value = 0) (static, constant)

APS signaling either not supported by the platform or allows copying

This constant can be also be accessed from toi.consts.ToiDrmService.APS_MODE_COPY_FREE.
AUDIO_OUTPUT_TYPE_HDMI (Type: ToiDrmService.ToiAudioOutputType) (value = 1) (static, constant)

HDMI audio output.

This constant can be also be accessed from toi.consts.ToiDrmService.AUDIO_OUTPUT_TYPE_HDMI.
AUDIO_OUTPUT_TYPE_SPDIF (Type: ToiDrmService.ToiAudioOutputType) (value = 0) (static, constant)

SPDIF audio output.

This constant can be also be accessed from toi.consts.ToiDrmService.AUDIO_OUTPUT_TYPE_SPDIF.
AUDIO_RESTRICTION_NO_COMPRESSED (Type: ToiDrmService.ToiAudioRestriction) (value = 2) (static, constant)

No compressed audio.

This constant can be also be accessed from toi.consts.ToiDrmService.AUDIO_RESTRICTION_NO_COMPRESSED.
AUDIO_RESTRICTION_NO_UNCOMPRESSED (Type: ToiDrmService.ToiAudioRestriction) (value = 1) (static, constant)

No uncompressed audio.

This constant can be also be accessed from toi.consts.ToiDrmService.AUDIO_RESTRICTION_NO_UNCOMPRESSED.
CGMSA_MODE_NO_COPYING_ALLOWED (Type: ToiDrmService.ToiCgmsaMode) (value = 3) (static, constant)

CGMS-A no copying allowed

This constant can be also be accessed from toi.consts.ToiDrmService.CGMSA_MODE_NO_COPYING_ALLOWED.
CGMSA_MODE_NO_MORE_COPIES (Type: ToiDrmService.ToiCgmsaMode) (value = 1) (static, constant)

CGMS-A no more copies

This constant can be also be accessed from toi.consts.ToiDrmService.CGMSA_MODE_NO_MORE_COPIES.
CGMSA_MODE_NO_RESTRICTION (Type: ToiDrmService.ToiCgmsaMode) (value = 0) (static, constant)

CGMS-A no restriction

This constant can be also be accessed from toi.consts.ToiDrmService.CGMSA_MODE_NO_RESTRICTION.
CGMSA_MODE_ONE_MORE_COPY (Type: ToiDrmService.ToiCgmsaMode) (value = 2) (static, constant)

CGMS-A one more copy

This constant can be also be accessed from toi.consts.ToiDrmService.CGMSA_MODE_ONE_MORE_COPY.
COPY_PERMISSION_10 (Type: ToiDrmService.ToiCopyPermission) (value = 3) (static, constant)

The content can be copied at most 10 times.

This constant can be also be accessed from toi.consts.ToiDrmService.COPY_PERMISSION_10.
COPY_PERMISSION_FREE (Type: ToiDrmService.ToiCopyPermission) (value = 0) (static, constant)

The content can be copy freely.

This constant can be also be accessed from toi.consts.ToiDrmService.COPY_PERMISSION_FREE.
COPY_PERMISSION_NEVER (Type: ToiDrmService.ToiCopyPermission) (value = 4) (static, constant)

The content cannot be copied. For live scenarios this means DVR is not allowed but timeshift is allowed.

This constant can be also be accessed from toi.consts.ToiDrmService.COPY_PERMISSION_NEVER.
COPY_PERMISSION_NO_MORE (Type: ToiDrmService.ToiCopyPermission) (value = 1) (static, constant)

The content can not be copied anymore.

This constant can be also be accessed from toi.consts.ToiDrmService.COPY_PERMISSION_NO_MORE.
COPY_PERMISSION_ONCE (Type: ToiDrmService.ToiCopyPermission) (value = 2) (static, constant)

The content can be copied only once.

This constant can be also be accessed from toi.consts.ToiDrmService.COPY_PERMISSION_ONCE.
NO_RESTRICTION (Type: number) (value = -1) (static, constant)

Predefined value to identify the control state that is no restriction.

This constant can be also be accessed from toi.consts.ToiDrmService.NO_RESTRICTION.
SCMS_MODE_COPY_FREE (Type: ToiDrmService.ToiScmsMode) (value = 0) (static, constant)

SCMS copy freely

This constant can be also be accessed from toi.consts.ToiDrmService.SCMS_MODE_COPY_FREE.
SCMS_MODE_NO_COPYING_ALLOWED (Type: ToiDrmService.ToiScmsMode) (value = 2) (static, constant)

SCMS no copying allowed

This constant can be also be accessed from toi.consts.ToiDrmService.SCMS_MODE_NO_COPYING_ALLOWED.
SCMS_MODE_ONE_MORE_COPY (Type: ToiDrmService.ToiScmsMode) (value = 1) (static, constant)

SCMS no more copy

This constant can be also be accessed from toi.consts.ToiDrmService.SCMS_MODE_ONE_MORE_COPY.
VIDEO_OUTPUT_TYPE_ANALOG (Type: ToiDrmService.ToiVideoOutputType) (value = 0) (static, constant)

Analog video output.

This constant can be also be accessed from toi.consts.ToiDrmService.VIDEO_OUTPUT_TYPE_ANALOG.
VIDEO_OUTPUT_TYPE_HDMI (Type: ToiDrmService.ToiVideoOutputType) (value = 1) (static, constant)

HDMI video output.

This constant can be also be accessed from toi.consts.ToiDrmService.VIDEO_OUTPUT_TYPE_HDMI.
VIDEO_RESTRICTION_MUTE (Type: ToiDrmService.ToiVideoRestriction) (value = 1) (static, constant)

Mute video.

This constant can be also be accessed from toi.consts.ToiDrmService.VIDEO_RESTRICTION_MUTE.
ToiAudioOutputRestriction (Type: struct) (static)

Audio output restriction data structure.

Struct fields

Name Description
output

Audio output.

Type: ToiDrmService.ToiAudioOutputType
restrictionMask

Audio restriction mask. ToiDrmService.ToiAudioRestriction defines the allowed values.

Type: number

ToiOutputControl (Type: struct) (static)

Output control data structure.

Struct fields

Name Description
assetRetentionLimit

Describes how long content can be stored as DVR in seconds. ToiDrmService.NO_RESTRICTION indicates the content can be stored forever.

Type: number
cci

Current CCI (copy control information value).

Type: ToiDrmService.ToiCopyPermission
cgmsaApsMode

CGMS-A APS mode.

Type: ToiDrmService.ToiApsMode
cgmsaMode

CGMS-A mode

Type: ToiDrmService.ToiCgmsaMode
hasAnalogSunset

Analog sunset enabled.

Type: boolean
hasConstrainImage

Image constrain enabled.

Type: boolean
hasDigitalOnly

Digital content only.

Type: boolean
hasEpn

EPN (Encryption plus non-assertion) state.

Type: boolean
macrovisionMode

Macrovision APS mode.

Type: ToiDrmService.ToiApsMode
recordingAllowed

Indicates whether the stream can be recorded or not.

Type: boolean
recordingForMobileAllowed

Indicates whether the stream can be recorded in formats for mobile devices.

Type: boolean
scmsMode

SCMS mode

Type: ToiDrmService.ToiScmsMode
timeshiftAllowed

Indicates whether timeshift operations can be enabled on the stream.

Type: boolean
timeshiftRetentionLimit

The allowed maximum size of the timeshift buffer in seconds. ToiDrmService.NO_RESTRICTION indicates no limit on timeshift buffer. The value has no effect if timeshift is not allowed.

Type: number
trickPlayControl

Trick play control.

Type: ToiDrmService.ToiTrickPlayControl

ToiTrickPlayControl (Type: struct) (static)

Trick play control structure. Restrictions apply for both PVR and timeshift.

Struct fields

Name Description
fastForwardPaceLimit

Fast forward pace limit, given as a multiplier of normal playback times 1000. 1000 indicates fast forward is forbidden, only normal speed(playing) is allowed. ToiDrmService.NO_RESTRICTION indicates no limit for fast forward pace. Any values below 1000 will be ignored and take the same effect as ToiDrmService.NO_RESTRICTION.

Type: number
jumpingAllowed

Indicates whether the trick play can be jumping or not.

Type: boolean

ToiVideoOutputRestriction (Type: struct) (static)

Video output restriction data structure.

Struct fields

Name Description
output

Video output.

Type: ToiDrmService.ToiVideoOutputType
restrictionMask

Video restriction mask. ToiDrmService.ToiVideoRestriction defines the allowed values.

Type: number

5.1.p5

Copyright (c) 2017 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.