closes #10
This commit is contained in:
@ -23,6 +23,10 @@ public:
|
||||
|
||||
// Prevent page loads from navigating away from our single page web app
|
||||
bool pageAboutToLoad(const String& newURL) override;
|
||||
bool pageisLoaded = false;
|
||||
void pageFinishedLoading(const String& newURL) override {
|
||||
pageisLoaded = true;
|
||||
}
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
@ -60,6 +64,31 @@ public:
|
||||
|
||||
void timerCallback() override
|
||||
{
|
||||
|
||||
if(webComponent->pageisLoaded){
|
||||
webComponent->pageisLoaded = false;
|
||||
reload_count = 60;
|
||||
}
|
||||
if (reload_count) {
|
||||
if (--reload_count == 0) {
|
||||
/*for (int i = 0; i < processorRef.parameters.sliderIds.size(); ++i) {
|
||||
slider_attatchments.push_back(new
|
||||
WebSliderParameterAttachment(
|
||||
*processorRef.state.getParameter(processorRef.parameters.sliderIds[i]),
|
||||
*slider_relays.back(),
|
||||
processorRef.state.undoManager));
|
||||
}
|
||||
|
||||
for (int i = 0; i < processorRef.parameters.toggleIds.size(); ++i) {
|
||||
toggle_attatchments.push_back(new
|
||||
WebToggleButtonParameterAttachment(
|
||||
*processorRef.state.getParameter(processorRef.parameters.toggleIds[i]),
|
||||
*toggle_relays.back(),
|
||||
processorRef.state.undoManager));
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr size_t numFramesBuffered = 5;
|
||||
|
||||
SpinLock::ScopedLockType lock{ processorRef.midiLock };
|
||||
@ -108,6 +137,7 @@ private:
|
||||
SinglePageBrowser* webComponent = nullptr;
|
||||
|
||||
std::deque<Array<var>> spectrumDataFrames;
|
||||
int reload_count = 0;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WebViewPluginAudioProcessorEditor)
|
||||
};
|
||||
Reference in New Issue
Block a user