video
1.create videoElement
HTMLTreeBuilder::processStartTagForInBody
HTMLConstructionSite::insertHTMLElement(此时已经解析出了end)
cHTMLConstructionSite::createHTMLElement
HTMLElementFactory::createHTMLElement
HTMLElementFactory::videoConstructor
HTMLVideoElement::create
2.get element attribute
in "videoConstructor"
will call "MediaPlayer::isAvailable()" decide to create media or html
in " HTMLElementFactory::createHTMLElement"
will create different element according to the tag name.
3.in "processStartTagForInBody"
will enter different process according to the tag
4.in "HTMLConstructionSite::createHTMLElement"
after createHTMLElemen
will call element->setAttributeMap
3.from insert to attach to area
in "HTMLConstructionSite::insertHTMLElement"
a.will call "attachToCurrent(createHTMLElement(token)"
b.HTMLConstructionSite::attach
c.and then
HTMLVideoElement::attach()//depending on different Element
d.final will call
Element::attach()
e.
HTMLVideoElement::attach() //HTMLMediaElement::attach()
4.from attach to render area
a.in "HTMLMediaElement::attach()"
renderer()->updateFromElement()
b.RenderVideo::updateFromElement()
c1.RenderMedia::updateFromElement()
"RenderMedia::updateControls"
"MediaControlElement::attach()"
c2.RenderMedia::updatePlayer();
5. event handle
a. for controller bar
code is
in "MediaControlMuteButtonElement::defaultEventHandler"
b. for video event
Node::dispatchEvent
HTMLMediaElement::defaultEventHandler
RenderMedia::forwardEvent
6.play controller
all in "MediaControlElements.cpp"
MediaControlMuteButtonElement
MediaControlPlayButtonElement,mediaElement()->togglePlayState()
HTMLMediaElement::togglePlayState()
MediaControlSeekButtonElement
MediaControlRewindButtonElement
MediaControlReturnToRealtimeButtonElement
MediaControlToggleClosedCaptionsButtonElement
MediaControlTimelineElement
MediaControlVolumeSliderElement
MediaControlFullscreenButtonElement
7.simple play procedure
a HTMLMediaElement.defaultEventHandler()
b RenderMedia.forwardEvent()
c MediaControlElement.defaultEventHandler();
8.
HTMLVideoElement::createRenderer
RenderVideo::RenderVideo
9.
video stop image
a.Button was drawn in:
RenderSkinMediaButton.cpp
b. call trace
MediaLayer::drawGL
LayerAndroid::drawChildrenGL
VideoLayerAndroid::drawGL//VideoLayerAndroid be child of LayerAndroid
VideoLayerAndroid::createPosterTexture
RenderSkinMediaButton::Draw
c
MediaLayer--->LayerAndroid
VideoLayerAndroid--->LayerAndroid