This PR introduces some code to replace the given domain for teachable machine models with a storage one discovered through interacting with the service. This is done so that we can append a randomly generated query parameter onto the end of our request for model data to ensure the results are not cached and thus updates to the model are observed (this generated query parameter is lost when google redirects the request from the teachable machine domain to the storage location).
However, this is vulnerable to google deciding to change the storage location. So the extension should be overhauled (slightly) so that we can try multiple model URLs when trying to load a model. First the storage one, and then the teachable machine one as a fallback (since we can assume that one is safe to use, since it is provided to students via the teachable machine interface).
This PR introduces some code to replace the given domain for teachable machine models with a storage one discovered through interacting with the service. This is done so that we can append a randomly generated query parameter onto the end of our request for model data to ensure the results are not cached and thus updates to the model are observed (this generated query parameter is lost when google redirects the request from the teachable machine domain to the storage location).
However, this is vulnerable to google deciding to change the storage location. So the extension should be overhauled (slightly) so that we can try multiple model URLs when trying to load a model. First the storage one, and then the teachable machine one as a fallback (since we can assume that one is safe to use, since it is provided to students via the teachable machine interface).