describe
Create a pass-through playback instance
Example
Parameter details
dom:
The div DOM container needs to set the width and height of the style, otherwise the video may collapse or have other style problems.
options:
Field | Type | Description | Default value | Is it required |
---|---|---|---|---|
devId | string | Device unique identifier | Yes | |
channel | string | Channel number, starting from 1, the value range is 1~32 | Yes | |
streamType | string | Stream type: MAJOR: main stream; MINOR: sub-stream; | MAJOR | No |
hasEncrypt | number | AES decryption type: 0 platform decryption; 1 front-end decryption | 0 | no |
mediaProtocol | string | Media protocol: HTTP_FLV; WS_FLV; New in 1.3.9 initial |
HTTP_FLV | No |
quality | string | Clarity: SMOOTH: Smooth STANDARD: Standard CLARITY: Clear | STANDARD | No |
hasAudio | number | Whether to carry audio, audio is turned on by default: 0: not carried 1: carried | 1 | no |
optId | string | Business operation id, which can be used to operate trace records, etc. | "" | No |
expireTime | number | Address expiration time, default is 20 seconds | 20 | No |
hasTranscode | number | Whether H265 video transcoding is required, it will be transcoded by default: 0 => no transcoding, 1 => transcoding | 0 | no |
addrType | number | Address type: 1: External network address; 2: Intranet address; | 1 | No |
describe
The pass-through player gets the playback flv address and loads the video stream
Example
describe
Destroy pass-through player
Example
describe
Get the start time of pass-through playback and return the client UTC timestamp in ms.
Example
Note: If you want to get the end time, please refer to afterDestory in HOOKS
describe
Get the duration of pass-through playback, in ms.
Example
describe
Get the player stream type | Set the switched stream type
Example
Set the value range: MAJOR (main code stream), MINOR (sub-code stream)
describe
Get the volume of each channel of the player | Set the volume of the player channel
Example
Set value range: Number, expected channel volume, range 0 - 1
describe
Set player aspect ratio
Example
Set the value range: String, full: full, origin: original ratio, ratio mode, such as: 16:9, 4:3, 1:1
describe
Get the current playback status of the player
Example
Get value status includes: