void HTMLTrackElement::SetSrc(const nsAString& aSrc, ErrorResult& aError) { SetHTMLAttr(nsGkAtoms::src, aSrc, aError); uint16_t oldReadyState = ReadyState(); SetReadyState(TextTrackReadyState::NotLoaded); if (!mMediaParent) { return; } if (mTrack && (oldReadyState != TextTrackReadyState::NotLoaded)) { // Remove all the cues in MediaElement. mMediaParent->RemoveTextTrack(mTrack); // Recreate mTrack. CreateTextTrack(); } // Stop WebVTTListener. mListener = nullptr; if (mChannel) { mChannel->Cancel(NS_BINDING_ABORTED); mChannel = nullptr; } DispatchLoadResource(); }
void NesulatorApp::OnReadyCommand( IMainBoard* mainBoard ) { ReadyState( mainBoard ); ReadyState.disconnect_all_slots(); }