IEditableResourceFile
Hierarchy
- IResourceFile
- IEditableResourceFile
Index
Properties
cacheToHardDisk
readonlyconvertedHash
dirty
readonlyduration
If the resource is a video or an audio, a numeric value should be provided to calculate the progress and timing of the playing process.
episodeIds
The episode id of this resource belongs to, we use this value to manage resource preloading and offline bundle building.
extensionConfigurations
All configuration generated by Recative Studio, could be used by the player or interface components, like the audio backend or the atlas dimension information.
readonlyid
The unique ID of this resource file, for most of the case, the value is randomly generated by Nano ID while importing the resource. Some extension may use meaningful value. However, this is a very special case, except developers have a specific purpose, this value should always be a random ID to prevent any kind of conflict.
readonlyimportTime
The time of the file is imported.
label
Human readable label to identity the resource file, this field is manually filled by developers, developers should avoid name conflict, at lease for each episode or resource group.
Please notice if there is a resource group and a resource file with the same label, Recative System selects resource groups over resource files in preference.
managedBy
A managed file means all managed fields will be locked, should never be changed manually.
For Recative Studio, while the target file changes, extension configuration
not marked as nonMergeableResourceExtensionConfiguration and tags not end
with ! will be applied to managed files.
Mergeable field is defined in the resource processor extension of Recative Studio.
readonlymimeType
The MIME type
of this resource file.
For video and audio files, developers should avoid filling
application/octet-stream, and provide codec information
to this field or Safari may failed to play these media.
Recative Studio will automatically detect the type and codec of the media files, for developers that manually filling these fields, it is recommend to use this script to generate the MIME type with codec information for the media file.
readonlyoriginalHash
The xxHash value of the file while importing.
This field is considered legacy. In earlier versions of Recative
Studio, files might be imported with some pre-processing process, this
field can help Recative System determine whether a particular file has been
imported even after the file is converted. But this mechanism is considered
to be harmful. We now process the files through an extension system. The
converted files are stored in the database as a new file, and the original
files are preserved, the new file and the original file are linked by the
managedBy field.
preloadLevel
If the resource need to be preloaded. Developers could set this field if the resources need to loaded when the act point or the episode starts playing. This is for providing a more complete first-screen experience, to avoid the visual experience regression caused by the image loading.
preloadTriggers
optionalredirectTo
Use resource with the value of this field, instead this resource definition.
This should ONLY be available for online resource in production mode, the field will appear while multiple resources are merged into one group.
removed
If the file is soft removed, Recative System do not remove files even if developers removed the file in the Recative Studio since the resource is possible to be published in production, remove the record of these resource is not safe.
removedTime
The time of the file is removed.
resourceGroupId
The resource group of this resource file belongs to, provide an empty string if the resource file do not contains in any resource group.
This is a bi-directional field, developers should maintain this field and
the files field of the resource group. Or the resource querying may not
working correctly, Recative Studio did this automatically but if you are
writing resource definition manually, please be careful.
tags
Tags for smart resource selection, including the language, device type
definition, the format is [field]:[value](!), like:
lang:en: Resource that used for English environment.role:video!: The role of this resource for a video is the video channel, the tags would not be changed when the resource is managed or being merged.
readonlythumbnailSrc
The URL of the thumbnail image, this field is only used in the Recative Studio, would not be uploaded to the CDN, and would not be used by any part of the Recative System.
readonlytype
The type of this resource, for a resource file, the value should be file.
url
A map of the url of this resource, the key is the identity of the uploader, this could be the name of the CDN or the name of the storage solution, like build-in resource of the package.
If this resource need to be cached:
barebuilding solution.Cache APIor theIndexedDB API.