Preparing search index...
The search index is not available
@xverse/core
@xverse/core
LocalStream
Class LocalStream
Hierarchy
Stream
LocalStream
Index
Constructors
constructor
Properties
has
Audio
has
Video
id
topics
Methods
close
Audio
close
Video
create
dispose
get
Media
Stream
get
Track
get
Tracks
is
Audio
Paused
is
Video
Paused
mute
mute
Audio
mute
Video
off
on
once
open
Audio
open
Video
pause
pause
Audio
pause
Video
resume
resume
Audio
resume
Video
stop
switch
To
Camera
unmute
unmute
Audio
unmute
Video
Constructors
constructor
new
Local
Stream
(
)
:
LocalStream
Returns
LocalStream
Properties
has
Audio
has
Audio
:
boolean
= false
has
Video
has
Video
:
boolean
= false
id
id
:
string
topics
topics
:
Record
<
"trackChanged"
,
ITopic
<
any
>
[]
>
= ...
Methods
close
Audio
close
Audio
(
)
:
void
Returns
void
close
Video
close
Video
(
)
:
void
Returns
void
create
create
(
config
)
:
Promise
<
void
>
Parameters
config
:
CreateLocalStreamConfig
Returns
Promise
<
void
>
dispose
dispose
(
)
:
void
移除所有的监听事件
Returns
void
get
Media
Stream
get
Media
Stream
(
)
:
MediaStream
Returns
MediaStream
get
Track
get
Track
(
kind
)
:
MediaStreamTrack
Parameters
kind
:
"audio"
|
"video"
Returns
MediaStreamTrack
get
Tracks
get
Tracks
(
)
:
MediaStreamTrack
[]
Returns
MediaStreamTrack
[]
is
Audio
Paused
is
Audio
Paused
(
)
:
boolean
Returns
boolean
is
Video
Paused
is
Video
Paused
(
)
:
boolean
Returns
boolean
mute
mute
(
)
:
void
Returns
void
mute
Audio
mute
Audio
(
)
:
void
Returns
void
mute
Video
mute
Video
(
)
:
void
Returns
void
off
off
<
K
>
(
topic
,
listener
?
)
:
void
移除监听事件
Type Parameters
K
extends
"trackChanged"
Parameters
topic
:
K
Optional
listener
:
IListener
<
IStreamEvent
[
K
]
>
Returns
void
on
on
<
K
>
(
topic
,
listener
,
order
?
)
:
{
unsub
:
(
(
)
=>
void
)
;
}
添加事件监听器
Type Parameters
K
extends
"trackChanged"
Parameters
topic
:
K
listener
:
IListener
<
IStreamEvent
[
K
]
>
Optional
order
:
number
Returns
{
unsub
:
(
(
)
=>
void
)
;
}
unsub
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
once
once
<
K
>
(
topic
,
listener
,
order
?
)
:
{
unsub
:
(
(
)
=>
void
)
;
}
添加事件监听器,单个 listener 只执行1次
Type Parameters
K
extends
"trackChanged"
Parameters
topic
:
K
listener
:
IListener
<
IStreamEvent
[
K
]
>
Optional
order
:
number
Returns
{
unsub
:
(
(
)
=>
void
)
;
}
unsub
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
open
Audio
open
Audio
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
open
Video
open
Video
(
videoConstraints
?
)
:
Promise
<
void
>
Parameters
Optional
videoConstraints
:
MediaTrackConstraints
Returns
Promise
<
void
>
pause
pause
(
)
:
void
Returns
void
pause
Audio
pause
Audio
(
)
:
void
Returns
void
pause
Video
pause
Video
(
)
:
void
Returns
void
resume
resume
(
)
:
void
Returns
void
resume
Audio
resume
Audio
(
)
:
void
Returns
void
resume
Video
resume
Video
(
)
:
void
Returns
void
stop
stop
(
)
:
void
Returns
void
switch
To
Camera
switch
To
Camera
(
targetCamera
)
:
Promise
<
void
>
Parameters
targetCamera
:
MediaDeviceInfo
|
"front"
|
"back"
Returns
Promise
<
void
>
unmute
unmute
(
)
:
void
Returns
void
unmute
Audio
unmute
Audio
(
)
:
void
Returns
void
unmute
Video
unmute
Video
(
)
:
void
Returns
void
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
constructor
has
Audio
has
Video
id
topics
close
Audio
close
Video
create
dispose
get
Media
Stream
get
Track
get
Tracks
is
Audio
Paused
is
Video
Paused
mute
mute
Audio
mute
Video
off
on
once
open
Audio
open
Video
pause
pause
Audio
pause
Video
resume
resume
Audio
resume
Video
stop
switch
To
Camera
unmute
unmute
Audio
unmute
Video
@xverse/core
Color3
Color4
Vector3
EApplyType
EApprovalType
EAuthCheckResType
EAuthType
EAvatarComponentType
EAvatarSkinType
EBroadcastLevel
EChatMsgType
ECodes
EFPSStatus
EFolloweTypeV2
EGroupStatus
EGroupStatusV2
EGroupTypeV2
ELoggerLevels
EMediaSourceType
ENetworkDetector
ENetworkDetectorType
Loading...
Generated using
TypeDoc
移除所有的监听事件