Preparing search index...
The search index is not available
EbinPlayer API Documentation - v0.0.1
EbinPlayer API Documentation
PluginDefinition
Interface PluginDefinition<Config, Exports>
interface
PluginDefinition
<
Config
,
Exports
>
{
onInit
?
(
ctx
)
:
void
|
Exports
|
Promise
<
Exports
>
;
onStart
?
(
ctx
)
:
void
|
Promise
<
void
>
;
onEvent
?
<
T
>
(
event
,
ctx
)
:
void
;
onConfigChange
?
(
newConfig
,
ctx
)
:
void
;
onDestroy
?
(
ctx
)
:
void
|
Promise
<
void
>
;
meta
:
PluginMeta
;
defaultConfig
?:
Config
;
validateConfig
?
(
config
)
:
{
valid
:
boolean
;
errors
?:
string
[]
;
}
;
commands
?:
Record
<
string
,
(
(
args
,
ctx
)
=>
unknown
)
>
;
configVersion
?:
number
;
migrations
?:
{
from
:
number
;
to
:
number
;
migrate
:
(
(
oldConfig
)
=>
unknown
)
;
}
[]
;
}
Type Parameters
Config
=
unknown
Exports
=
unknown
Hierarchy (
view full
)
PluginHooks
<
Config
,
Exports
>
PluginDefinition
Index
Properties
meta
default
Config?
commands?
config
Version?
migrations?
Methods
on
Init?
on
Start?
on
Event?
on
Config
Change?
on
Destroy?
validate
Config?
Properties
meta
meta
:
PluginMeta
Optional
default
Config
default
Config
?:
Config
Optional
commands
commands
?:
Record
<
string
,
(
(
args
,
ctx
)
=>
unknown
)
>
Type declaration
(
args
,
ctx
)
:
unknown
Parameters
args
:
unknown
ctx
:
PluginContext
Returns
unknown
Optional
config
Version
config
Version
?:
number
Optional
migrations
migrations
?:
{
from
:
number
;
to
:
number
;
migrate
:
(
(
oldConfig
)
=>
unknown
)
;
}
[]
Type declaration
from
:
number
to
:
number
migrate
:
(
(
oldConfig
)
=>
unknown
)
(
oldConfig
)
:
unknown
Parameters
oldConfig
:
unknown
Returns
unknown
Methods
Optional
on
Init
on
Init
(
ctx
)
:
void
|
Exports
|
Promise
<
Exports
>
Parameters
ctx
:
PluginContext
Returns
void
|
Exports
|
Promise
<
Exports
>
Optional
on
Start
on
Start
(
ctx
)
:
void
|
Promise
<
void
>
Parameters
ctx
:
PluginContext
Returns
void
|
Promise
<
void
>
Optional
on
Event
on
Event
<
T
>
(
event
,
ctx
)
:
void
Type Parameters
T
extends
PlayerEventType
Parameters
event
:
PlayerEventBase
<
T
>
ctx
:
PluginContext
Returns
void
Optional
on
Config
Change
on
Config
Change
(
newConfig
,
ctx
)
:
void
Parameters
newConfig
:
Partial
<
Config
>
ctx
:
PluginContext
Returns
void
Optional
on
Destroy
on
Destroy
(
ctx
)
:
void
|
Promise
<
void
>
Parameters
ctx
:
PluginContext
Returns
void
|
Promise
<
void
>
Optional
validate
Config
validate
Config
(
config
)
:
{
valid
:
boolean
;
errors
?:
string
[]
;
}
Parameters
config
:
unknown
Returns
{
valid
:
boolean
;
errors
?:
string
[]
;
}
valid
:
boolean
Optional
errors
?:
string
[]
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
meta
default
Config
commands
config
Version
migrations
on
Init
on
Start
on
Event
on
Config
Change
on
Destroy
validate
Config
EbinPlayer API Documentation - v0.0.1
Loading...