Open acellam opened 7 years ago
Just started using this library. Everything works nice and straight forward with getArchive - until cloud storage (e.g. s3) is added, and then I had similar confusion.
tl:dr: makes sense, the file was moved somewhere else.
And then, a litany of notes:
After some digging, it probably makes sense, as the file has been moved off the TokBox servers and over to somebody else's storage. I had assumed the files would still be openTok accessible for the 72 hour period, but now my previously working prototype requires me to go figure out s3 APIs for individual user permission downloads and deletes.
Note that delete (at least in the node sdk) no longer removes items from the archive list, and instead returns 'Unexpected response from OpenTok' which after digging has an error from the rest api. Also, cannot modify archive entries, so you cannot sync to any deleted files from the s3 bucket. And the call for listArchives does not seem to respond to a status in the options json. So you'll manage this in your app, too.
I can think of a few things that would help here:
There seem to be two distinct flows supported by OpenTok:
When using OpenTok storage, url
field is also null
when the status of archive is uploaded
. This is outlined in the documentation. However, in this flow, OpenTok server sends another status
– available
. This is when you're supposed to receive the url
for archive.
When using external S3 or Azure (only tested with S3), url
field is always null
and the archive never shifts to available
status. While this is inconsistent with the previous flow, it also makes sense because you basically always know the URL of the file, you only need to know when OpenTok finished uploading to S3.
https://${bucketName}.s3.amazonaws.com/${apiKey}/${archiveId}/archive.mp4
My files are being saved on s3 and status is uploaded on my tokbox account but when i query for file details using getArchive, the url property is always null