A media object can have several different statuses during its life cycle. The status tells your application when it's available to display to the user or not. A rule of thumb for when an object is in the "Ready" status is that it should stay in that status until it's deleted.
From time to time we may move objects around from server to server to free up space on an old server. During this time, the status will be "Migrating to New Host" and your media object should be available on the old host while the object is in this status. Keep in mind, when you see the status "Migrating to New Host" it won't be there long.
Below is a full list of object status'. There will be more to come in the future as we build more into the platform.
|1||Preparing Submission||Our network has been notified about a file that needs to be added. MediaServ has this file queued.|
|2||Downloading File||MediaServ is downloading the file from your server for further processing.|
|3||In Processing Queue||MediaServ has added the file to the processing queue, it will be processed soon.|
|4||Sending to Processing Node||MediaServ has instructed the processing node to download the file for processing. The processing node is downloading the file and all needed information.|
|5||Processing||The processing node is processing the file. If it's a video file, it will generate all the thumbnails and resized the video several times over. This may take a few minutes depending on how big the file is and the quality.|
|6||Receiving From Processing Node||The processing node has finished processing your file. MediaServ's control node is new downloading the file from the processing node.|
|7||Pending Storage||This media object is now in the storage queue. It is scheduled to be stored.|
|8||Sending to Storage Node||MediaServ has now instructed the storage node to download all the files for the media object. When this is finished, your object will be ready.|
|9||Ready||You can use your media object. All files are intact and ready for public access.|
|10||Failed||MediaServ failed to process and store your file. This could be do to an incompatibility issue.|
|11||Migrating to New Host||Your media object is still "Ready" on the old host, but it won't be for long. The media object will be moved rather quickly to a new host server.|
|12||Marked for Deletion||You've either marked the file for deletion through the API or the user backend. The object is still "Ready," but keep in mind it will be deleted soon. The media object is in the deletion queue and this cannot be undone.|
|13||Deleting||The media object is new being deleted from our storage node and CDN networks. This process doesn't take very long.|
|14||Deleted||The media object is deleted. The file doesn't exist anywhere on our network.|
Check out this example of getting the status of an object
//Define the API Key and Secret $key = "--- API Key Here ---"; $secret = "--- Secret Key Here ---"; //define the object id $id = 1543623; //Include the MediaServ SDK and invoke the getStatus() function include_once "path/to/mediaserv.php"; $mediaserv = new mediaserv($key, $secret); $status = $mediaserv->getStatus($id); var_dump($status);
curl -X POST -d 'key=--API KEY HERE-- &secret=--API SECRET HERE-- &id=1543623' 'http://api.mediaserv.x25.co/media/status'