Video playing on ios device help

Hi, i have an android phone.

When i run my project that plays a video on the 2D Screen, its just a small panel where i set it up to be. and it plays there.
But when i play it on an ios phone, it causes it to open up the video window(?) (the full screen video player). is there a way i could disable that?

Extra question: Is there a way to have an input system to send an email to a particular person?

Hi @bestdenki7,

Does the following example works on your iPhone? I’ve just tried it now and it works quite fine:

https://developer.playcanvas.com/en/tutorials/video-textures/

That’s definitely doable, you will need a server or 3rd part service to send the email using usually a Rest Call. Search online on how to send an email from Javascript and you will find a lot of resources.

yea it works just fine, but im doing it via 2D, and when i button press to play the video on my iPhone, the full screen video player opened up and it gave a black screen. audio still plays.

i tried on my android phone, it works fine. no extra windows appeared. the video plays where the ui is set.

Hmm, try sharing an example project to take a look.

On iOS to get the video to not open the fullscreen player you need to make sure that this property is set to true, on your DOM video element:

video.playsInline = true;
1 Like

that worked!

However i have another question, do you have any idea on how to get a direct .mp4 link to play my video from?

You upload a MP4 somewhere assuming the MP4 file is yours to upload? Are you talking about from a service like Vimeo or YouTube?

yea…but from what ive been searching on, i cant find anywhere that would allow me to get the https://video.mp4 link for me to play a video from that is free.

im trying to play a video in my project via streaming/a link, because playing via saved videos would cause the project file to be too large, unless theres another work-around on this?

Generally, we recommend you host the video on an external server such as AWS, or your own web host.

If you are including the video in your project, then I would disable preload so it doesn’t load the file on the loading screen. Then you can just use getFileUrl () to get the URL for the video.

aws (amazon web services)?
can i ask how would that work?

also i cant really do that because i need to incoporate afew videos which probably would exceed the 1GB limit i only have in my playcanvas account :confused:

You would most likely need S3 service:


https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html