...
Previously, asset streamer URLs would never be returned for renditions that weren’t generated yet. However, with the new transcode system, asset streamer URLs are returned for renditions that can be generated but are not necessarily ready.
For users of the SDK, this This is relevant for all the URLs that are returned returned in the following cases:
SDK: All URLs in the
AssetResponse
class returned from the servicesIAssetSearchService
andIAssetService
.
...
API: All URLs returned in responses from the endpoints prefixed with
<api-url>/DigizuiteCore/LegacyService/api/assets
.
...
Additionally, it is relevant for URLs returned from Search2 searches at
<api-url>/dmm3bwsv3/SearchService.js
.
By default, when requesting a rendition of an asset with the asset streamer (prefixed with <api-url>/DigizuiteCore/LegacyService/api/assetstream
), the request will not terminate before the rendition is available. This process can take a while. If you do not want to wait for renditions to become available, the query parameter mode=getFallbackImageIfUnavailable
can be added to the asset streamer request when using the API. With this query parameter set, it is possible to get a fallback image will be returned with the HTTP status code 202 if the requested rendition is not immediately available. This can be done in the following way:
SDK: Set the
mode
argument toGetRenditionBehavior.GetFallbackImageIfUnavailable
in theINewAssetStreamerService.GetAssetDownloadStream
method.API: Add the query parameter
mode=getFallbackImageIfUnavailable
to asset streamer requests prefixed with<api-url>/DigizuiteCore/LegacyService/api/assetstream
.
Note that most modern browsers limit the maximum number of simultaneous HTTP connections. Thus, if you show a lot of images simultaneously (e.g. thumbnails in an asset list), strongly consider adding using the mode=getFallbackImageIfUnavailable
query parameter to your requests to argument to limit the number of simultaneous HTTP connections. Please be careful that you do not cache the fallback image as the requested image.
If you are using the INewAssetStreamerService.GetAssetDownloadStream
method in the SDK, note that the mode
discussed above can now also be set. Furthermore, be aware that the default HTTP client used by the SDK has a timeout of 100 seconds. Thus, if you request a rendition that takes more than 100 seconds to become available with the INewAssetStreamerService.GetAssetDownloadStream
method, your request will time out before the rendition is returned. To disable this timeout, use the following setup in your application startup logic:
...