Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I'm trying to play a video file stored in my Dropbox folder in an `AVPlayer`. The link was retrieved using getTemporaryLink() of SwiftyDropbox.
The Dropbox documentation states that getTemporaryLink() is used to "Get a temporary link to stream content of a file."
However, the link I get is in the form:
https://dl.dropboxusercontent.com/apitl/1/AAC1oJHO88Sfe7yzYA9Pz5a8n8WXu4wUQ8_xfIvmC1ks4nRk4e6i0Y29xYPjupsZZkqObkB3ZSdJA7Jr0ekSliygbbtStEft95ecebhJqewd52IZZ4aL4x0a_tG5XJCA9_i-xCkcLIFW1uSuqYKWD2OLeXPVtilD6zp_ukpi4b6-hORw9-VdX6PsxR9HV-KX9hDN_QqTTY3wjJ4S-dBneBvGlCJn4cnuJ3utEnu5w7eiRKFC3x0dFDkJIDnlOWQDQ0qGRXckcnRLmsbiybuT2px83GkxeUOW8gEWIhwM8M38bg
Which, is a download link. The file in question is in the `Apps/MyApp` Dropbox folder .
I use the following code to attempt to play the video:
self.previewPlayer.replaceCurrentItem(with: AVPlayerItem(url: URL(fileURLWithPath: url))) self.previewPlayer.play()
A few things to note:
Going to the temporary link in my browser downloads the file. I'm not sure if this is expected.
Any help is appreciated.
[Cross-linking for reference: https://stackoverflow.com/questions/51663916/ios-avplayer-not-playing-all-remote-files ]
I see you've already received some help from someone on StackOverflow, and have determined that the issue is likely with the file itself. We can't offer help with the file or AVPlayer themselves unfortunately.
For reference, the links returned by getTemporaryLink are supposed to be direct links to the file, and are not meant for display in browsers, so that browser behavior you described is expected.
I have the same problem.
Did you figure out why just particular video able to play in avplayer.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!