summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-06-13 19:03:26 +0200
committerGitHub <noreply@github.com>2020-06-13 19:03:26 +0200
commit2424dfe007e451bb02f87884c2b272cf307d6e7c (patch)
treede43d4ab42126b0533bf5955de3ce68f97f53420 /doc
parent982a030f330bd4f4953ed7d4a7f88286f6fd645d (diff)
downloadminetest-2424dfe007e451bb02f87884c2b272cf307d6e7c.tar.gz
minetest-2424dfe007e451bb02f87884c2b272cf307d6e7c.tar.bz2
minetest-2424dfe007e451bb02f87884c2b272cf307d6e7c.zip
Server pushing media at runtime (#9961)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index ed060c4ad..cb968958f 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -5217,6 +5217,20 @@ Server
* Returns a code (0: successful, 1: no such player, 2: player is connected)
* `minetest.remove_player_auth(name)`: remove player authentication data
* Returns boolean indicating success (false if player nonexistant)
+* `minetest.dynamic_add_media(filepath)`
+ * Adds the file at the given path to the media sent to clients by the server
+ on startup and also pushes this file to already connected clients.
+ The file must be a supported image, sound or model format. It must not be
+ modified, deleted, moved or renamed after calling this function.
+ The list of dynamically added media is not persisted.
+ * Returns boolean indicating success (duplicate files count as error)
+ * The media will be ready to use (in e.g. entity textures, sound_play)
+ immediately after calling this function.
+ Old clients that lack support for this feature will not see the media
+ unless they reconnect to the server.
+ * Since media transferred this way does not use client caching or HTTP
+ transfers, dynamic media should not be used with big files or performance
+ will suffer.
Bans
----