Issues with getting video duration from dropbox - dropbox-api

I have an application where i use dropbox-api V1 to get the video duration from files user shares from dropbox. Recently it broken, but I didn't change my codes.
I decided to migrate to dropbox-api V2, but it didn't solve my problem.
I'm now using dropbox-sdk-js as follows:
dropbox.sharingGetSharedLinkMetadata({
url: url
}).then((
dropbox.filesGetMetadata({
path: file.id,
include_media_info: true
}).then((metadata) => {
console.log(metadata)
})
})
But metadata.media_info.metadata object doesn't include the video duration.
I wonder if this is a bug in dropbox-api??
Note: for very rear cases it returns the duration, but i need to get it for all cases.
Update
It was an issue in dropbox and seems it is fixed end of December, 2016.
The issue was only with files newly uploaded to dropbox.

Related

Agora.io - How to share video timestamps using mediaPlayer? - iOS

Here's what I'm trying to do: Using Agora.io's MediaPlayer API, I want to be able to publish video to a channel (which I can do using RtcChannelPublishPlugin), but I need to be able to then receive the media's current timestamp on the non-publishing device. Then, I will be able to "re-publish" the video from the other user starting at the same timestamp.
I've tried using AgoraRtm, but I don't think messages sent using rtm can be saved as variables.
I've found a way to get the timestamp and print it out, but the trouble is getting it to the other users in the channel and using it as a variable.
Has anyone experienced something like this? Any help would be greatly appreciated.
I'm using Agora's API example project as a base.
I would recommend the use of meta data that goes with the video stream. See the following API:
https://docs.agora.io/en/Interactive%20Broadcast/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/setMediaMetadataDataSource:withType:

Firestore how to set serverTimestamp behaviour in Flutter?

I am trying to make my app save local changes (e.g. saving notes) to firestore db while it is offline. When I use DateTime.now() for timeCreated, everything (most of job) works, but obviously, it is not correct time. I found solution with using FieldValue.serverTimestamp() to have correct time, but once I try to use it while app is offline, I can't get a value of previous timeCreated fields. Furthermore, I found out about DocumentSnapshot.ServerTimestampBehavior in firebase docs, and now I don't have clue how to use it or is it even available in flutter mobile apps. Link for Android: Android docs.
EDIT
I already gave up from using serverTimestamp, but I gave it another shot and successfully solved it. The problem was that I used hasPendingWriteson whole query, instead on single document which is added (updated) offline. In this article everything is described link. Still, I didn't find solution for my question.

ReactJS 5.3.0 not loading from unpkg.com

We have been using the following library for months:
https://unpkg.com/react#15.3.0/dist/react.min.js
Yes - I know we can just reference 15.3 and get the URL rewrite to the latest, but they released a breaking change. That's another issue for another day. Don't get distracted.
Yesterday this simply stopped working. You'll notice that if you load the URL mentioned, that the file is TRUNCATED. Simply cuts off. This made everything we use react with break. Interestingly, if you go to the following URL (without the .js extension) - things work.
https://unpkg.com/react#15.3.0/dist/react.min
My question is - what the heck happened? Why did the URL we've been using for 8 months suddenly stop working, and who can we get to fix it. In the interim, we had a copy locally that we've started referencing (which we probably should have been doing to begin with, since we don't want the automatic upgrade). When things like this happen, who do you inform?
I'm not sure you'll find the answer as to why this file is no longer working here but based off of the website you could reached out to the creator on twitter: https://twitter.com/mjackson
On the website it says:
SUPPORT
unpkg is a free, best-effort service and cannot provide any uptime or
support guarantees.
i.e. you should probably only use this link if you are messing around with a small project and shouldn't be used for any website where you actually care about the uptime of the site.

SoundCloud track.stream_url not working for some of the tracks

I noticed that on some tracks on soundcloud stream_url points to 404 - page not found.
The track is set as streamable, but still stream url is not working.
Here is an example:
http://api.soundcloud.com/tracks/129894766.json?consumer_key=KEY
returns streamable: true, embeddable_by: "all" but: stream_url: "http://api.soundcloud.com/tracks/129894766/stream?consumer_key=KEY" is not working.
Has anyone experienced this and maybe have some solution?
The reason the stream URL isn't working for certain tracks is that they use different streaming protocols (RTMP / HLS). SoundCloud is in the process of updating their SDK's and documentation for this, but the current (2.0) version of the Javascript SDK should fix this issue for now.

Creating dynamic manifest files that work with ipads and iphones

Problem: The browsers within apples ipad and iphone don't seem to like dynamically generated manifest files (we constantly get errors involving either missing images or .aspx pages that can be accessed from the device or "Application Cache manifest could not be fetched"). We originally had a manifest.ashx acting as our manifest that would dynamically create and pull some pieces from the web server for offline app functionality. This process worked fine for the majority of browsers and mobile devices but failed on the apple products.
Thoughts: For some reason safari doesn't seem to register the manifest.ashx correctly (this is where we dynamically create the manifest file) and just gives up on trying to open it. We truly need a dynamic manifest file for the requirements of the project so switching to a static manifest file would not work. Does anyone have any suggestions towards alternative creation methods for dynamic manifest files?
Code:
manifest.ashx
public class Manifest : IHttpHandler
{
public void ProcessRequest( HttpContext context )
{
ManifestGenerator generator = new ManifestGenerator();
context.Response.ContentType = "text/cache-manifest";
//Create the dynamic manifest file here (returns the manifest as a string)
context.Response.Write( generator.GenerateManifest() );
context.Response.Flush();
}
}
Thanks,
Updated Thoughts v1: Leaning towards thinking this maybe a device specific manifest fault as all the other mobile and desktop devices are accessing the app just fine (including being able to go offline). Currently I have moved back to a dynamically generated manifest (within the manifest.ashx) and the ipad / iphone still dies when trying to fetch but it does get further then it did before (error was: "Application Cache update failed, because "file path goes here" could not be fetched"). A strange aside to this is the fact that the desktop version of safari handles the web app just fine (as well as an install of chrome on the ipad had no troubles accessing the site on/off line) while the mobile versions of it do not.
Updated Thoughts v2: Seems that this issue is safari specific as I have the web app running online/offline with chrome for the apple products (iphone/ipad). Still looking for a fix / work around for the safari browsers though...
For Safari/iPad, the manifest file must end with .manifest. Atleast, that's what my tests determined.
So, in order to make this work, you will have to dynamically generate the .manifest file using a HttpHandler and some changes in web.config to do map cache.maifest to the handler. The idea is that the call to the non-existent cache.manifest would actually get mapped to the handler, which would then send back dynamic content.
This is currently the part I'm stuck at, so I cannot help you here yet.