Skip to content

Commit

Permalink
chore: fix demo loading issue (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
embbnux committed Oct 9, 2022
1 parent 2ac2ee4 commit 89e9764
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions demo/index.html
Expand Up @@ -263,9 +263,8 @@ <h4 class="modal-title">Incoming Call</h4>
</div>
</div>
</script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://unpkg.com/es6-promise@latest/dist/es6-promise.auto.js"></script>
<script type="text/javascript" src="https://unpkg.com/pubnub@4.37.0/dist/web/pubnub.js"></script>
<script type="text/javascript" src="https://unpkg.com/whatwg-fetch@latest/dist/fetch.umd.js"></script>
Expand Down
9 changes: 7 additions & 2 deletions demo/index.js
Expand Up @@ -57,7 +57,9 @@ $(function() {
}

function showCallPage() {
$loadingModal.modal('show');
if (!rcCallControl.ready) {
$loadingModal.modal('show');
}
$callPage = cloneTemplate($callTemplate);
var $deviceSelect = $callPage.find('select[name=device]').eq(0);
var $phoneNumber = $callPage.find('input[name=number]').eq(0);
Expand All @@ -84,7 +86,10 @@ $(function() {
refreshCallList();
});
});
$loadingModal.modal('hide');
// need to wait loading modal to show then hide it
setTimeout(function() {
$loadingModal.modal('hide');
}, 2000);
}
if (rcCallControl.ready) {
onInitializedEvent();
Expand Down

0 comments on commit 89e9764

Please sign in to comment.