Constructor
new FakeEvent(type, dictopt)
Create an Event work-alike object based on the provided dictionary. The event should contain all of the same properties from the dict.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | ||
dict |
Map.<string, Object> |
<optional> |
- Extends:
- Event
- Source:
Extends
- Event
Members
EventName :string
An internal enum that contains the string values of all of the player events.
This exists primarily to act as an implicit list of events, for tests.
Type:
- string
Properties:
Name | Value | Type | Description |
---|---|---|---|
AbrStatusChanged |
abrstatuschanged | string | |
Adaptation |
adaptation | string | |
Buffering |
buffering | string | |
Complete |
complete | string | |
DownloadFailed |
downloadfailed | string | |
DownloadHeadersReceived |
downloadheadersreceived | string | |
DrmSessionUpdate |
drmsessionupdate | string | |
Emsg |
emsg | string | |
Prft |
prft | string | |
Error |
error | string | |
ExpirationUpdated |
expirationupdated | string | |
FirstQuartile |
firstquartile | string | |
GapJumped |
gapjumped | string | |
KeyStatusChanged |
keystatuschanged | string | |
Loaded |
loaded | string | |
Loading |
loading | string | |
ManifestParsed |
manifestparsed | string | |
ManifestUpdated |
manifestupdated | string | |
MediaQualityChanged |
mediaqualitychanged | string | |
Metadata |
metadata | string | |
Midpoint |
midpoint | string | |
OnStateChange |
onstatechange | string | |
RateChange |
ratechange | string | |
SegmentAppended |
segmentappended | string | |
SessionDataEvent |
sessiondata | string | |
StallDetected |
stalldetected | string | |
Started |
started | string | |
StateChanged |
statechanged | string | |
Streaming |
streaming | string | |
TextChanged |
textchanged | string | |
TextTrackVisibility |
texttrackvisibility | string | |
ThirdQuartile |
thirdquartile | string | |
TimelineRegionAdded |
timelineregionadded | string | |
TimelineRegionEnter |
timelineregionenter | string | |
TimelineRegionExit |
timelineregionexit | string | |
TracksChanged |
trackschanged | string | |
Unloading |
unloading | string | |
VariantChanged |
variantchanged | string |
- Source:
stopped :boolean
Non-standard property read by FakeEventTarget to stop processing
listeners.
Type:
- boolean
- Source:
timeStamp :number
According to MDN, Chrome uses high-res timers instead of epoch time.
Follow suit so that timeStamps on FakeEvents use the same base as
on native Events.
Type:
- number
Methods
fromRealEvent(eventnon-null) → {shaka.util.FakeEvent}
Parameters:
Name | Type | Description |
---|---|---|
event |
Event |
- Source:
Returns:
- Type
- shaka.util.FakeEvent
recastDictAsObject_(dictnon-null) → {Object}
Allows us to tell the compiler that the dictionary "map" is actually a
generic object, for backwards compatibility.
Parameters:
Name | Type | Description |
---|---|---|
dict |
Map.<string, Object> |
- Source:
Returns:
- Type
- Object
preventDefault()
Prevents the default action of the event. Has no effect if the event isn't
cancellable.
- Source:
stopImmediatePropagation()
Stops processing event listeners for this event. Provided for
compatibility with native Events.
- Source:
stopPropagation()
Does nothing, since FakeEvents do not bubble. Provided for compatibility
with native Events.
- Source: