This property was never encouraged. The manual even stated that "You should avoid using it, unless you absolutely have to." Since we now have user-data which is superior in every single way and replaces this, delete this property. The manual also has threatened people for years with the line "It's a makeshift solution which could go away any time (for example, when a better solution becomes available)." We were nice and deprecated it in 1d00aee8e191c9689a20e67e3d6dfd2af6ad2588 for a while to give script authors some time to update. Let's remove it for good now.
Showing the changes to player/javascript (1 of 5 files). Show all
Unified · Split
| @@ -177,28 +177,6 @@ mp.abort_async_command = function abort_async_command(id) { · 176 unmodified lines | ||
| 177 | 177 | mp._abort_async_command(id); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | −// shared-script-properties - always an object, even if without properties | |
| 181 | −function shared_script_property_set(name, val) { | |
| 182 | − if (arguments.length > 1) | |
| 183 | − return mp.commandv("change-list", "shared-script-properties", "append", "" + name + "=" + val); | |
| 184 | − else | |
| 185 | − return mp.commandv("change-list", "shared-script-properties", "remove", name); | |
| 186 | −} | |
| 187 | − | |
| 188 | −function shared_script_property_get(name) { | |
| 189 | − return mp.get_property_native("shared-script-properties")[name]; | |
| 190 | −} | |
| 191 | − | |
| 192 | −function shared_script_property_observe(name, cb) { | |
| 193 | − return mp.observe_property("shared-script-properties", "native", | |
| 194 | − function shared_props_cb(_name, val) { cb(name, val[name]) } | |
| 195 | − ); | |
| 196 | −} | |
| 197 | − | |
| 198 | −mp.utils.shared_script_property_set = shared_script_property_set; | |
| 199 | −mp.utils.shared_script_property_get = shared_script_property_get; | |
| 200 | −mp.utils.shared_script_property_observe = shared_script_property_observe; | |
| 201 | − | |
| 202 | 180 | // osd-ass |
| 203 | 181 | var next_assid = 1; |
| 204 | 182 | mp.create_osd_overlay = function create_osd_overlay(format) { |