Video component not playing on IOS device

There seems to be a problem with using a URL in the video component. We use dropbox to share the link. It works in android but not in IOS. The size is below 50MB and it’s an MP4 format. Is there anything we can do?

Hoping you can help us figure it out. Thunkable

2 Likes

Does it work if you copy the URL and put it direct in Safari?

1 Like

It does work but it’s a download link:

https://www.dropbox.com/s/16lpy9n3yd3bdvd/intro.mp4_1.mp4?dl=1

I think it will need to end in .mp4

Edit: yep, it should work with this url:
https://www.dropbox.com/s/16lpy9n3yd3bdvd/intro.mp4_1.mp4

2 Likes

Yes, it plays in Safari.

Thank you so much. We’ll try it.

I tried removing ?dl=1 from the URL and it was not working on Android.

If this is the case then the workaround I can think of is

Basically check the platform
if iOS then use the URL ending with .mp4
else use the URL ending with ?dl=1

1 Like

It’s still not working.

1 Like

Did you add the code in the screen Opens block?

I updated your project.
https://x.thunkable.com/projectPage/615de318ab391e0010e942fb

Please test and let me know.

1 Like

Yes, I did. Still not playing on IOS. Works fine under an Android device.

Hi,

Sorry, the link was set to private. Unable to check it.

1 Like

Sorry for that.
It is public now. Please check.

It’s still not working.

1 Like

I’ll have to check it tomorrow with my iPhone. I am using the Android now.

I made the blocks according to @tatiang testing that it works on iOS when removing ?dl=1.

1 Like

Yes, please do update us. Thank you so much for your help.

Looking forward to it.

I’m surprised the original link works on either type of device. According to Dropbox, the dl=1 parameter causes the video file to be downloaded instead of rendered.

1 Like

@tatiang The video must be downloaded for the video to play in the player. If you don’t include dl=1, then the url returns a webpage with the video inside of it. The video component is not smart enough to look through any webpage it is passed and returned a video.

The issue for this app, is they will have a lot of videos. How do you dynamically load a video from a url and play it in the app. Uploading all the videos to the app will make it too big.

@muneer Your tweaks do NOT work on my iPhone.

If something works on Android, but not iOS, I call it a bug.

3 Likes

Thanks for the comment @Darren

I know how to load videos from GDrive and make them work from the app but this is my first attempt with DropBox.

Thanks! Please share.

I always have trouble sharing things from Google Drive. :grimacing:

1 Like

The idea is simple.
When you share a file in GDrive it will look like something like this

https://drive.google.com/file/d/12f9MKR4VbbaMAO7X3l0bktveybYkF6Ql/view?usp=sharing

The default format of GDrive shared links does not work in web pages but you can change it by taking the main part of the URL and add to it /uc?id= and use the file-id in the URL. The file id is the strings between /d/ and /View. So the link above will turn into:

https://drive.google.com/uc?id=12f9MKR4VbbaMAO7X3l0bktveybYkF6Ql

You will now get a fully functional URL for a file in GDrive.

2 Likes

@expertauthor2020 Can you try Muneer’s suggestion above and use Google Drive to serve the videos instead of Dropbox?

4 Likes