Members
-
static,constantENABLE.player.NO_ENCRYPTIONString
-
Parameter for
ENABLE.player#setSourceindicating how the video source is encrypted (only for DASH).- Since:
- 1.0.0
-
static,constantENABLE.player.PLAYEREVENT_RELEASINGString
-
Event occurs before player released (see
).ENABLE.player#setEventCallback- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.PLAYER_EVENT_RELEASINGinstead.
- Use
-
static,constantENABLE.player.PLAYER_EVENT_RELEASINGString
-
Event occurs before player released (see
).ENABLE.player#setEventCallback- Since:
- 1.7.0
-
static,constantENABLE.player.PLAYREADYString
-
Parameter for
ENABLE.player#setSourceindicating how the video source is encrypted (only for DASH).- Since:
- 1.0.0
-
static,constantENABLE.player.VIDEOEVENT_BUFFERINGString
-
Event occurs when media buffer is empty (e.g. DASH and HLS source) (see
).ENABLE.player#setEventCallback- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_BUFFERINGinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_DECRYPTION_FAILString
-
Event occurs when decryption fail (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_DECRYPTION_FAILinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_END_OF_STREAMString
-
Event occurs when video stream reaches the end (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_END_OF_STREAMinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_ERRORString
-
Event occurs when there is an unexpected error (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_ERRORinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_METADATA_LOADEDString
-
Event occurs when metadata is loaded (e.g. tracks info, duration) (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_METADATA_LOADEDinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_PLAYBACK_BUFFERINGString
-
Event occurs when media buffer is starting to buffer (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_PLAYBACK_BUFFERINGinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_PLAYBACK_BUFFER_READYString
-
Event occurs when media buffer is ready (e.g. DASH and HLS source) (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_PLAYBACK_BUFFER_READYinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_PLAYBACK_RESUMEDString
-
Event occurs when video playback is resumed (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_PLAYBACK_RESUMEDinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_PLAYBACK_STOPPEDString
-
Event occurs when video playback is stopped (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_PLAYBACK_STOPPEDinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_READY_TO_STARTString
-
Event occurs when player is ready to start playback (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_READY_TO_STARTinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_SEEKEDString
-
Event occurs when video has seeked (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_SEEKEDinstead.
- Use
-
static,constantENABLE.player.VIDEOEVENT_STREAM_STARTEDString
-
Event occurs when video stream is started (see
ENABLE.player#setEventCallback).- Since:
- 1.0.0
- Deprecated
- Use
ENABLE.player.VIDEO_EVENT_STREAM_STARTEDinstead.
- Use
-
static,constantENABLE.player.VIDEO_EVENT_BUFFERINGString
-
Event occurs when media buffer is empty (e.g. DASH and HLS source) (see
).ENABLE.player#setEventCallback- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_DECRYPTION_FAILString
-
Event occurs when decryption fail (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_END_OF_STREAMString
-
Event occurs when video stream reaches the end (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_ERRORString
-
Event occurs when there is an unexpected error (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_METADATA_LOADEDString
-
Event occurs when metadata is loaded (e.g. tracks info, duration) (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_PLAYBACK_BUFFERINGString
-
Event occurs when media buffer is starting to buffer (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_PLAYBACK_BUFFER_READYString
-
Event occurs when media buffer is ready (e.g. DASH and HLS source) (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_PLAYBACK_RESUMEDString
-
Event occurs when video playback is resumed (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_PLAYBACK_STOPPEDString
-
Event occurs when video playback is stopped (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_READY_TO_STARTString
-
Event occurs when player is ready to start playback (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_SEEKEDString
-
Event occurs when video has seeked (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.VIDEO_EVENT_STREAM_STARTEDString
-
Event occurs when video stream is started (see
ENABLE.player#setEventCallback).- Since:
- 1.7.0
-
static,constantENABLE.player.WIDEVINEString
-
Parameter for
ENABLE.player#setSourceindicating how the video source is encrypted (only for DASH).- Since:
- 1.0.0
Methods
-
getAudioRendering(){Object}
player.js, line 959 -
Get the audio rendering status.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSresultboolean true, audio rendering is enabled,false, audio rendering is disabled -
getAudioStats(){Object}
player.js, line 850 -
Get Audio Decoder statistics
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYinput_buffer_countNumber The number of queued input buffers. rendered_output_buffer_countNumber The number of rendered output buffers. dropped_buffer_countNumber The number of dropped buffers. A dropped buffer is a buffer that was supposed to be decoded/rendered, but was instead dropped because it could not be rendered in time. elapsed_msNumber Total elapsed time in milliseconds since playback started. bitrateNumber The estimated bitrate, in bits per second. bytes_transferredNumber The total transferred data in bytes since playback started. -
getAudioTrack(){Object}
player.js, line 671 -
Retrieves comprehensive information about all audio tracks available in the current stream, including the identifier of the currently selected track.
- Since:
- 1.7.0
Returns:
Name Type Description objectObject Name Type Description selectedNumber The currently selected audio track. This idcorresponds to theidproperty in each track object within thetracksarray.
A value of-1indicates that no audio track is currently selected.status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYtracksArray.<Object> An array of object track information. Name Type Description idNumber identify of the track for selecting langString a language code in either way of ISO-639-1 or ISO-639-2.
When the language is unknown or could not be determined, language code "und" is returned.stream_typeString The name of the codec of the stream, derived from the codec or MIME type. mime_typeString MIME type of the format. Common audio MIME types include:
-audio/wavfor WAV
-audio/oggfor OGG Vorbis
-audio/aacfor AACcodecString Codecs of the format as described in RFC 6381.
When the codec is unknown or could not be determined, null will be returned.sample_rateNumber The audio sampling rate in Hz, or -1 if unknown or not applicable. bitrateNumber The bitrate in bits per second. -1 if unknown or not applicable. num_of_channelsNumber Number of audio channels streamTypeString deprecated, use stream_typeinsteadmimeTypeString deprecated, use mime_typeinstead -
getBlank(){Object}
player.js, line 392 -
Retrieves the current blank status of the video screen.
- Since:
- 1.0.0
- See:
-
ENABLE.ENABLE.player#setBlank
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.ERRORresultBoolean trueorfalse -
getBufferedDuration(){Object}
player.js, line 587 -
Gets the duration of the buffered content. Useful for live streams like multicast and HLS.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYresultNumber The duration of the buffered content in milliseconds. -
getDuration(){Object}
player.js, line 573 -
Retrieves the duration of the current playback in milliseconds.
Behavior for Different Content Types:
- VOD (Video on Demand): Returns the total duration of the current media.
- Live Content:
- ABR Streams (like HLS, DASH): Returns the length of the moving window, which is the amount of content available for immediate playback.
- Multicast and SRT Streams: Returns the sum of current buffered duration and the elapsed time since the stream became ready to start.
Note: This function will return
NOT_READYwhen no active video source.- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYresultNumber The duration in milliseconds.
If no duration is available (for example, if streaming live content), -1 is returned. -
getMute(){Object}
player.js, line 422 -
Get the current mute status.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.ERRORresultBoolean trueorfalse -
getOsdResolution(){Object}
player.js, line 505 -
Retrieves the total size of the screen usable for positioning the video window.
This function provides the dimensions of the On-Screen Display (OSD) area, which represents the full extent of the screen where video can be displayed or positioned.
Use these dimensions when callingENABLE.player#setVideoRectto place and size the video appropriately within the screen.- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSwidthNumber Width of screen in pixels. heightNumber Height of screen in pixels. -
getPlayPosition(){Object}
player.js, line 610 -
Retrieves the current playback position in milliseconds.
Behavior for Different Content Types:
-
VOD (Video on Demand): Returns the current playback position within the media.
-
Live Content:
- ABR Streams (like HLS, DASH): Returns the position within the live moving window. This represents how far into the currently available content the playback is.
- Multicast and SRT Streams: Returns the elapsed time since the video started playing. This value stops increasing when the video is paused.
-
Note: This function will return
NOT_READYwhen no active video source is set.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYresultNumber The current position in milliseconds -
-
getPlayerId(){Object}
player.js, line 135 -
Get player ID of current player instance
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSidNumber The id of the player -
getSource(){Object}
player.js, line 256 -
Retrieves the current media URI configured for the player along with its associated configuration.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYsourceString current source. configObject Configuration. Please refer to ENABLE.player#setSource -
getSpeed(){Object}
player.js, line 299 -
Get the current playback speed.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYresultNumber current speed, where:
-1indicates normal speed
- Other values represent speed multipliers (e.g.,2for double speed,0.5for half speed) -
getTextTrack(){Object}
player.js, line 633 -
Gets the information about text track.
- Since:
- 1.7.0
Returns:
Name Type Description objectObject Name Type Description selectedNumber The currently selected text track. This idcorresponds to theidproperty in each track object within thetracksarray.
A value of-1indicates that no text track is currently selected.status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYtracksArray.<Object> An array of object track information. Name Type Description idNumber identify of the track for selecting typeString type of text track, e.g. subtitle, teletext and timedText mime_typeString MIME type of the format. langString a language code in either way of ISO-639-1 or ISO-639-2.
When the language is unknown or could not be determined, language code "und" is returned.mimeTypeString deprecated, use mime_typeinstead -
getVideoRect(){Object}
player.js, line 469 -
Get current on screen position of the video window.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSxNumber The visual x position of video window, in pixels. yNumber The visual y position of video window, in pixels. widthNumber The width of video window, in pixels. heightNumber The height of video window, in pixels. -
getVideoRotation(){Object}
player.js, line 890 -
Get video rotation parameters. Video may be rotated by 0, 90, 180 or 270 degrees
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description angleNumber Angle of rotation xNumber X coordinate of the video after rotation yNumber Y coordinate of the video after rotation status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READY -
getVideoStats(){Object}
player.js, line 831 -
Get Video Decoder statistics
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYinput_buffer_countNumber The number of queued input buffers. rendered_output_buffer_countNumber The number of rendered output buffers. dropped_buffer_countNumber The number of dropped buffers. A dropped buffer is a buffer that was supposed to be decoded/rendered, but was instead dropped because it could not be rendered in time. elapsed_msNumber Total elapsed time in milliseconds since playback started. bitrateNumber The estimated bitrate, in bits per second. bytes_transferredNumber The total transferred data in bytes since playback started. -
getVideoTrack(){Object}
player.js, line 711 -
Retrieves comprehensive information about all video tracks available in the current stream, including the identifier of the currently selected track.
- Since:
- 1.7.0
Returns:
Name Type Description objectObject Name Type Description selectedNumber The currently selected video track. This idcorresponds to theidproperty in each track object within thetracksarray.status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYtracksArray.<Object> An array of object track information. Name Type Description idNumber identify of the track widthNumber The width of the video in pixels, or -1 if unknown or not applicable. heightNumber The height of the video in pixels, or -1 if unknown or not applicable. stream_typeString The name of the codec of the stream, derived from the codec or MIME type. mime_typeString MIME type of the format. Common video MIME types include:
-video/mp4for MP4 files
-video/webmfor WebM files
-video/oggfor Ogg Theora
-video/mpegfor MPEG videocodecString Codecs of the format as described in RFC 6381.
When the codec is unknown or could not be determined, null will be returned.frame_rateNumber The frame rate in frames per second.
The frame rate in frames per second, or -1 if unknown or not applicable.bitrateNumber The bitrate in bits per second. -1 if unknown or not applicable. streamTypeString deprecated, use stream_typeinsteadmimeTypeString deprecated, use mime_typeinstead -
getVolume(){Object}
player.js, line 796 -
Get Player Volume.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYleftNumber Left volume scalar (0 to 1.0) rightNumber Right volume scalar (0 to 1.0) -
getZOrder(){Object}
player.js, line 924 -
Get the Z Order of the players. The z-index of webview layer is 100. The z-order of the first player created will be 0.
The z-index of a newly created player will be the highest player z-index value plus one.- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENTfor zIndex using negative numberresultNumber The z-index value -
isLiveStream(){Object}
player.js, line 812 -
Returns true if current source is live.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYresultboolean if current source is live -
play(speed){Object}
player.js, line 278 -
Plays the current video source at the specified speed multiplier.
Speed Values:
0: Pauses the video playback.1: Plays the video at normal speed.> 1: Speeds up playback (e.g.,2for double speed).0 < speed < 1: Slows down playback (e.g.,0.5for half speed).< 0: Rewinds the video (e.g.,-1for normal rewind speed).
Name Type Description speedNumber The desired speed to be played.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYor
ENABLE.status.INVALID_ARGUMENT -
release(){Object}
player.js, line 352 -
Releases all resources associated with this player object after which the player will not longer be useable.
AENABLE.player.PLAYEREVENT_RELEASINGevent will be emitted.- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESS -
reset(){Object}
player.js, line 340 -
Resets the player to its uninitialized state.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESS -
seekTo(offset){Object}
player.js, line 314 -
Seeks to specified time position.
Name Type Description offsetNumber The offset in milliseconds from the start to seek to.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READYor
ENABLE.status.INVALID_ARGUMENT -
setAudioRendering(enable){Object}
player.js, line 943 -
Set the audio rendering of the players. This API is differs from
ENABLE.player#setMuteandENABLE.player#setVolume.- Mutual Exclusivity: Only one player may play audio at any time. When rendering is enabled on a player instance, audio rendering for all other player instances is automatically disabled.
- CPU Efficiency: Disabling audio rendering conserves CPU resources by stopping the audio track when not required.
- Control:
- Setting this to
falsedisables audio rendering for all player instances, effectively silencing all player audio. - When creating additional player instances (the second or more), audio rendering is disabled by default to maintain this exclusivity.
- Setting this to
Name Type Description enableboolean truefor enables audio rendering for the current player,falsefor disables audio rendering for all players.- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESS -
setAudioTrack(id){Object}
player.js, line 761 -
Select an audio track based on track id. Track id may be retrieved by calling
ENABLE.ENABLE.player#getAudioTrack().Name Type Description idNumber Track id of audio
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setBlank(isBlank){Object}
player.js, line 375 -
Toggles the visibility of the video screen by setting it to blank or restoring it to its original state.
This method is particularly useful for transitions, e.g. creating a visual break or pause in video playback for user experience or presentation effects.Name Type Description isBlankBoolean Pass
trueto blank orfalseto unblank- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setEventCallback(callback){Object}
player.js, line 546 -
Register player callback function for JavaScript application.
Only one callback function can be registered. Passnullto unregister.
Example:var callback = function(obj) { if (obj.event === ENABLE.video.VIDEO_EVENT_STREAM_STARTED){ console.log("playback started!"); } }; video.setEventCallback(callback);Name Type Description callbackPlayerEventCallback Callback function will be invoked when events are received.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setMute(is_mute){Object}
player.js, line 406 -
Mute the player of current application.
Name Type Description is_muteBoolean Pass
trueto mute orfalseto unmute- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setResizeMode(mode){Object}
player.js, line 485 -
Set the resize mode of video
Name Type Description modeNumber The resize mode of video,
ENABLE.preference.RESIZE_MODE_FIT,
ENABLE.preference.RESIZE_MODE_FILL, or
ENABLE.preference.RESIZE_MODE_ZOOM- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeObject ENABLE.status.SUCCESSorENABLE.status.INVALID_ARGUMENT -
setSource(url, config){Object}
player.js, line 229 -
Set video source of player
ABR (DASH and HLS): https://{host}:{port}/{playlist_path}Play a ABR stream
var videoControl = ENABLE.player.getInstance(0); videoControl.setSource("http://www.aminocom.com/videos/playlist.mpd"); // or videoControl.setSource("http://www.aminocom.com/videos/playlist.m3u8");Play a widevine encrypted DASH stream
var config = {encryption_type: "com.widevine.alpha", encrypting_server: "http://demo.aminocom.com/license"}; videoControl.setSource("http://www.aminocom.com/videos/sample_enc.mpd", config);Play a widevine encrypted DASH stream with persistent license
var config = {encryption_type: "com.widevine.alpha", encrypting_server: "http://demo.aminocom.com/license", drm_session_type: "persistent"}; videoControl.setSource("http://www.aminocom.com/videos/sample_enc.mpd", config);Play a widevine encrypted DASH stream with custom headers when requesting encryption license
var config = { encryption_type: "com.widevine.alpha", encrypting_server: "http://demo.aminocom.com/license", encrypting_request_header: {"header_a": ".....", "header_b": "...."} } videoControl.setSource("http://www.aminocom.com/videos/sample_enc.mpd", config);HTTP Progressive: https://{host}:{port}/{file_path}videoControl.setSource("http://192.168.1.1/abc.mp4");Unicast: udp://{address}:{port}?prog_id=[number]&disable_av_sync=[boolean]videoControl.setSource("udp://0.0.0.0:8110");Multicast: udp://{address}:{port}?prog_id=[number]&disable_av_sync=[boolean]Play a multicast video
videoControl.setSource("udp://233.22.133.100:8110");Play a multicast video with program id specified and AV sync disabled
videoControl.setSource("udp://233.22.133.100:8110?prog_id=1&disable_av_sync=true");RTSP: rtsp://{server}/{asset}videoControl.setSource("rtsp://www.domain.com:554/stream.ts");RTMP: rtmp://{server}/{path}videoControl.setSource("rtmp://www.domain.com/stream/path");SRT: srt://{address}:{port}?streamid=[number]&password=[string]videoControl.setSource("srt://1.2.3.4:8888"); videoControl.setSource("srt://1.2.3.4:8888?streamid=3&password=aaaa");IGMPv3: igmpv3://{address}:{port}?mcast=[asm|ssm_include|ssm_exclude]&src_addr=[address]videoControl.setSource("igmpv3://192.168.1.1:8110?mcast=asm"); videoControl.setSource("igmpv3://192.168.1.1:8110?mcast=ssm_include&src_addr=192.168.1.30&src_addr=192.168.1.32"); videoControl.setSource("igmpv3://192.168.1.1:8110?mcast=ssm_exclude&src_addr=192.168.1.30&src_addr=192.168.1.32");Name Type Description urlString URL of video source.
configObject optional Configuration.
Name Type Description blank_when_openboolean optional Default: true. Blank video during channel zapping and unblank when first frame rendered.
mute_when_openboolean optional Default: true. Mute audio during channel zapping and unmute when first frame rendered.
encryption_typeString optional Encryption type, one of
ENABLE.player.NO_ENCRYPTION,ENABLE.player.WIDEVINEorENABLE.player.PLAYREADY.encrypting_serverString optional Encrypting server URL.
encrypting_request_headerObject optional Additional headers for requesting the encryption license.
drm_session_typeString optional Set persistent for the type of drm session to make the license and key(s) persisted (Widevine server have to enable it).
loop_on_endboolean optional Default: false. Set true to replay the video upon video end.
- Since:
- 1.1.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.ERRORor
ENABLE.status.INVALID_ARGUMENT -
setTextTrack(id){Object}
player.js, line 733 -
Select a text track
Name Type Description idNumber Track id of text track
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setVideoRect(x, y, width, height){Object}
player.js, line 439 -
Set on screen position for the video window. This API is for displaying video at specific screen position with size smaller than full screen.
Pass -1 for width and height to reset video to full screenName Type Description xNumber Sets the visual x position of video window, in pixels.
yNumber Sets the visual y position of video window, in pixels.
widthNumber The width of video window, in pixels.
heightNumber The height of video window, in pixels.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSorENABLE.status.INVALID_ARGUMENT -
setVideoRotation(angle, x, y){Object}
player.js, line 869 -
Set video rotation
Supported degrees of 0, 90, 180 and 270 only
Input x and y will override x,y of setVideoRect() when degree is 90 and 270
Video Rotation only supports when the number of video player instances is not more than 2. The rotation behaviour is undefined when there are more than 2 video player instances. The undefined behaviour could only be removed with device reboot with new APK installation.Name Type Description angleNumber Angle of rotation
xNumber optional X coordinate of the video after rotation
yNumber optional Y coordinate of the video after rotation
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setVolume(left, right){Object}
player.js, line 778 -
Set Player Volume. This API controls volume of browser application. Use
ENABLE.system.setVolumefor system volume control.Name Type Description leftNumber Left volume scalar (0 to 1.0)
rightNumber Right volume scalar (0 to 1.0)
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENT -
setZOrder(zIndex){Object}
player.js, line 905 -
Set the Z Order of the players. The z-index of webview layer is 100. The z-order of the first player created will be 0.
The z-index of a newly created player will be the highest player z-index value plus one.Name Type Description zIndexNumber The z-index of the player. The number should be non-negative number.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.INVALID_ARGUMENTfor zIndex using negative number -
stop(){Object}
player.js, line 329 -
Stops playback after playback has been started or paused.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READY -
unsetTextTrack(){Object}
player.js, line 748 -
Deselect text track.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSor
ENABLE.status.NOT_READY -
staticENABLE.player.getCapability(){Object}
player.js, line 95 -
Get Player Capability.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESSmax_decoderNumber Maximum number of hardware decoder. Switch to software decode if exceed the limit. -
staticENABLE.player.getInstance(id){Object}
player.js, line 107 -
Get Player with player ID. A new Player will be created if a Player with the requested ID is not found.
Name Type Description idNumber The player ID of the player
- Since:
- 1.0.0
Returns:
Type Description Object A instance of player with the specified player ID -
staticENABLE.player.releaseAll(){Object}
player.js, line 122 -
Release all player instances created in current session.
- Since:
- 1.0.0
Returns:
Name Type Description objectObject Name Type Description status_codeString ENABLE.status.SUCCESS