Quark
#
Modules #
quark/actionquark/appquark/bubblesquark/bufferquark/checkboxquark/cssquark/ctrquark/defsquark/dialogquark/eventquark/fontquark/fsquark/hashquark/httpquark/indexquark/jsonbquark/keyboardquark/lmdbquark/mediaquark/navquark/netquark/osquark/pathquark/pkgquark/screenquark/statequark/stepperquark/storagequark/testquark/typesquark/uriquark/utilquark/viewquark/windowquark/wsquark/_bufferquark/_commonquark/_decoratorsquark/_eventquark/_extquark/_md5quark/_sha1quark/_sha256quark/_utilquark/_watching
Quark v1.4.0 Documentation
Contents
quark/media #
Enum: MediaType #
MediaType #
kVideo
Video typekAudio
Audio type
Enum: MediaSourceStatus #
MediaSourceStatus #
kNormal
Normal status, UninitializedkOpening
Opening statuskPlaying
Playing statuskPaused
Paused statuskError
Error statuskEOF
EOF, end status
Enum: AudioChannelLayoutMask #
AudioChannelLayoutMask #
kInvalid
nonekFront_Left
front leftkFront_Right
front rightkFront_Center
front centerkLow_Frequency
low frequencykBack_Left
back leftkBack_Right
back rightkFront_Left_Of_Center
front left of centerkFront_Right_Of_Center
front right of centerkBack_Center
back centerkSide_Left
side leftkSide_Right
side rightkTop_Center
top centerkTop_Front_Left
top front leftkTop_Front_Center
top front centerkTop_Front_Right
top front rightkTop_Back_Left
top back leftkTop_Back_Center
top back centerkTop_Back_Right
top back right
Interface: Stream #
Stream #
stream.type #
type
readonly type: MediaType
stream.mime #
mime type
readonly mime: string
stream.language #
language
readonly language: string
stream.codecId #
codec id
readonly codecId: number
stream.codecTag #
codec tag
readonly codecTag: number
stream.format #
codec av format output
readonly format: number
stream.profile #
profile
readonly profile: number
stream.level #
level
readonly level: number
stream.width #
video width
readonly width: number
stream.height #
video height
readonly height: number
stream.bitrate #
bit rate
readonly bitrate: number
stream.sampleRate #
audio sample rate
readonly sampleRate: number
stream.channels #
audio channel count
readonly channels: number
stream.channelLayout #
audio channel layout to enum AudioChannelLayoutMask
readonly channelLayout: number
stream.duration #
duration of the stream, in stream time base.
readonly duration: number
stream.avgFramerate #
video frame average framerate
readonly avgFramerate: number[]
stream.timeBase #
Unit of pts,dts on Packet,Frame by Numerator/Denominator (seconds)
readonly timeBase: number[]
stream.index #
stream index in source
readonly index: number
stream.hashCode #
key params hash code
readonly hashCode: number
Interface: Player #
Player #
player.pts #
Presentation timestamp (ms or engine-specific units).
readonly pts: Uint
player.volume #
Playback volume, 0.0–1.0.
volume: number
player.mute #
Whether audio is currently muted.
mute: boolean
player.isPause #
True if media is currently paused.
readonly isPause: boolean
player.type #
Media container type.
readonly type: MediaType
player.duration #
Total duration of the media, in ms.
readonly duration: Uint
player.status #
The playback status of the current media source
readonly status: MediaSourceStatus
player.src #
set/get media source path
src: string
player.video #
Active video stream, if any.
readonly video: Stream | null
player.audio #
Active audio stream, if any.
readonly audio: Stream | null
player.audioStreams #
Get the number of audio tracks in the current media source
readonly audioStreams: Uint
player.play() #
Begin or resume playback.
play(): void
player.pause() #
Pause playback.
pause(): void
player.stop() #
Stop playback completely.
stop(): void
player.seek(timeMs) #
Seek to a new position in the media.
seek(timeMs: Uint): void
Parameters:
timeMs— Target timestamp in milliseconds.
player.switchAudio(index) #
Switch the currently playing audio by track index
switchAudio(index: Uint): void
Parameters:
index— The index < [Player.audioStreams]
Class: AudioPlayer #
AudioPlayer #
Extends: Notification
Implements: Player
audioplayer.onLoad #
@eventonLoad:EventNoticer<Event<AudioPlayer,void>>
Trigger when the media source opened and start playing
audioplayer.onStop #
@eventonStop:EventNoticer<Event<AudioPlayer,void>>
Trigger when stop playing
audioplayer.onError #
@eventonError:EventNoticer<Event<AudioPlayer,Error>>
Trigger when an error occurs
audioplayer.onBuffering #
@eventonBuffering:EventNoticer<Event<AudioPlayer,number>>
Trigger when the data needs buffering, event.data range for 0-1