move play button overlay to javascript to avoid downloading the image
This commit is contained in:
parent
1b4b87b14e
commit
282ba4d095
@ -157,12 +157,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="openwebrx-autoplay-overlay" class="openwebrx-overlay" style="display:none;">
|
||||
<div class="overlay-content">
|
||||
<img id="openwebrx-play-button" src="static/gfx/openwebrx-play-button.svg" />
|
||||
<div>Start OpenWebRX</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="openwebrx-error-overlay" class="openwebrx-overlay" style="display:none;">
|
||||
<div class="overlay-content">
|
||||
<div>This receiver is currently unavailable due to technical issues.</div>
|
||||
|
@ -1213,12 +1213,20 @@ var audioEngine;
|
||||
|
||||
function openwebrx_init() {
|
||||
audioEngine = new AudioEngine(audio_buffer_maximal_length_sec, audioReporter);
|
||||
$overlay = $('#openwebrx-autoplay-overlay');
|
||||
$overlay.on('click', function(){
|
||||
$('body').on('click', '#openwebrx-autoplay-overlay', function(){
|
||||
audioEngine.resume();
|
||||
});
|
||||
audioEngine.onStart(onAudioStart);
|
||||
if (!audioEngine.isAllowed()) {
|
||||
var $overlay = $(
|
||||
'<div id="openwebrx-autoplay-overlay" class="openwebrx-overlay" style="display:none;">' +
|
||||
'<div class="overlay-content">' +
|
||||
'<img id="openwebrx-play-button" src="static/gfx/openwebrx-play-button.svg" />' +
|
||||
'<div>Start OpenWebRX</div>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
);
|
||||
$('body').append($overlay);
|
||||
$overlay.show();
|
||||
}
|
||||
fft_codec = new ImaAdpcmCodec();
|
||||
|
Loading…
Reference in New Issue
Block a user