Skip to content

Commit

Permalink
Fix when the play buttons appear
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed May 23, 2021
1 parent 2b23c5d commit 24a0210
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions html/public/js/jquery.mediaplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jQuery( document ).ready( function( $ ) {
w.player.load();
w.player.oncanplaythrough = w.player.play();
}
if ($('.playThisAyah').hasClass('hide')) {
$('.playThisAyah').removeClass('hide');
}
$('.playThisAyah').on('click', function() {
$('.ayahAudio' + number).removeClass('ayah-playing');
number = Number($(this).data('number'));
Expand Down
2 changes: 1 addition & 1 deletion src/AlQuranCloud/Renderer/Quran.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function renderZoomIcon($ayah)

public static function renderPlayIcon($ayah)
{
return '<span class="linkify pull-left playThisAyah" id ="playThisAyah' . $ayah->number . '" data-number="' . $ayah->number . '"><i class="glyphicon glyphicon-play-circle"></i></span>';
return '<span class="linkify pull-left playThisAyah hide" id ="playThisAyah' . $ayah->number . '" data-number="' . $ayah->number . '"><i class="glyphicon glyphicon-play-circle"></i></span>';
}

}
2 changes: 1 addition & 1 deletion src/AlQuranCloud/Renderer/Surah.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static function renderZoomIcon($ayah)

public static function renderPlayIcon($ayah, $surah)
{
return '<span class="linkify pull-left playThisAyah" data-numberInSurah="' . $ayah->numberInSurah . '" data-surah="' . $surah->data->number . '" data-number="' . $ayah->number . '"><i class="glyphicon glyphicon-play-circle"></i></span>';
return '<span class="linkify pull-left playThisAyah hide" data-numberInSurah="' . $ayah->numberInSurah . '" data-surah="' . $surah->data->number . '" data-number="' . $ayah->number . '"><i class="glyphicon glyphicon-play-circle"></i></span>';
}

}
2 changes: 1 addition & 1 deletion views/ayah.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</div>

<script src="/public/js/jquery.ayah.js?v=1"></script>
<script src="/public/js/jquery.mediaplayer.js?v=7"></script>
<script src="/public/js/jquery.mediaplayer.js?v=8"></script>
<script>
$(function() {
$('#editionSelector').multiselect({ enableFiltering: true, enableCaseInsensitiveFiltering: true, dropUp: true, maxHeight: 400 });
Expand Down
2 changes: 1 addition & 1 deletion views/quran.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</div>
</div>
</div>
<script src="/public/js/jquery.mediaplayer.js?v=7"></script>
<script src="/public/js/jquery.mediaplayer.js?v=8"></script>
<script src="/public/js/jquery.quran.js?v=1"></script>
<script>
var quran = <?php echo json_encode($quran->data); ?>;
Expand Down
2 changes: 1 addition & 1 deletion views/surah.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</div>
<hr />
</div>
<script src="/public/js/jquery.mediaplayer.js?v=7"></script>
<script src="/public/js/jquery.mediaplayer.js?v=8"></script>
<script src="/public/js/jquery.surah.js?v=7"></script>

<script>
Expand Down

0 comments on commit 24a0210

Please sign in to comment.