mirror of
https://github.com/openvk/openvk
synced 2025-06-07 21:04:40 +03:00
fix: audio playing on report page
This commit is contained in:
parent
8d01f9b0f3
commit
1424ca2708
1 changed files with 8 additions and 16 deletions
|
@ -845,22 +845,14 @@ u(document).on('click', '.audioEntry .playerButton > .playIcon', async (e) => {
|
|||
|
||||
if(!window.player.hasTrackWithId(id) && !window.player.isAtAudiosPage()) {
|
||||
let _nodes = null
|
||||
if(u(e.target).closest('.attachments').length > 0) {
|
||||
window.player.connectionType = '.attachments'
|
||||
_nodes = u(e.target).closest('.attachments').find('.audioEmbed').nodes
|
||||
} else if(u(e.target).closest('.content_list').length > 0) {
|
||||
window.player.connectionType = '.content_list'
|
||||
_nodes = u(e.target).closest('.content_list').find('.audioEmbed').nodes
|
||||
} else if(u(e.target).closest('.generic_audio_list').length > 0) {
|
||||
window.player.connectionType = '.generic_audio_list'
|
||||
_nodes = u(e.target).closest('.generic_audio_list').find('.audioEmbed').nodes
|
||||
} else if(u(e.target).closest('.audiosInsert').length > 0) {
|
||||
window.player.connectionType = '.audiosInsert'
|
||||
_nodes = u(e.target).closest('.audiosInsert').find('.audioEmbed').nodes
|
||||
} else if(u(e.target).closest('.scroll_container').length > 0) {
|
||||
window.player.connectionType = '.scroll_container'
|
||||
_nodes = u(e.target).closest('.scroll_container').find('.audioEmbed').nodes
|
||||
}
|
||||
|
||||
try_these_containers = [".attachments", ".content_list", ".generic_audio_list", ".audiosInsert", ".scroll_container", ".container_gray"]
|
||||
try_these_containers.forEach(__container => {
|
||||
if(u(e.target).closest(__container).length > 0) {
|
||||
window.player.connectionType = __container
|
||||
_nodes = u(e.target).closest(__container).find('.audioEmbed').nodes
|
||||
}
|
||||
})
|
||||
|
||||
window.player.tracks = []
|
||||
_nodes.forEach(el => {
|
||||
|
|
Loading…
Reference in a new issue