fix audio loading (HTTPS, GURT, relative, remove HTTP) and add paused prop

This commit is contained in:
Face
2025-09-11 17:44:37 +03:00
parent eddf0f370c
commit 67c7eb95fd
4 changed files with 68 additions and 17 deletions

View File

@@ -124,6 +124,9 @@ static func _lua_audio_index_handler(vm: LuauVM) -> int:
"duration":
vm.lua_pushnumber(audio_node.get_duration())
return 1
"paused":
vm.lua_pushboolean(not audio_node.is_playing)
return 1
_:
# Look up other methods/properties in the table itself
vm.lua_rawget(1)
@@ -216,6 +219,9 @@ static func handle_dom_audio_index(vm: LuauVM, element_id: String, key: String)
"duration":
vm.lua_pushnumber(audio_node.get_duration())
return 1
"paused":
vm.lua_pushboolean(not audio_node.is_playing)
return 1
return 0