Hello Fellow developers!
Been a while!
Once again I’m having problems with iOS (who would have thought) and especially video playback.
I noticed that for ios I have to use
in order to find out if a video is loaded.
Now this only works for me on iOS and I use an if to check if it is an iOS device.
//Bind the loadedmetadata function
But Tablets do not seem to be considered as ‘ios’ devices and the pc.platform.ios returns false.
Anyone got an idea how to handle this ? Can I just bind this method no matter what ?
wait we can set our game sto certain platforms in code?
October 24, 2019, 5:58pm
This may provide an explanation about why pc.platform.ios is now set to false for iPad with iOS 13:
Maybe the current test for ios should be updated in the PlayCanvas engine source:
September 10, 2021, 1:03pm
It seems it’s still the case, on an iPad I got:
console.log("is desktop : " + pc.platform.desktop); true
console.log("is mobile : " + pc.platform.mobile); false
console.log("is iOS : " + pc.platform.ios); false
September 10, 2021, 1:36pm
Apple consider iPad OS Safari to be a desktop browser, not mobile now.
There’s little we can do on our side as it’s a desktop browser.
September 10, 2021, 1:39pm
I’m personally hesitant on whether we should/shouldn’t cater for this as technically, it is no longer consider to be iOS and is rendering in desktop mode.
September 10, 2021, 2:52pm
Ok, so if Apple says it’s a desktop browser… ok, why not… but perhaps having a property here to know if it’s an iPad
platform | PlayCanvas API Reference so we can manage this specific case?
September 10, 2021, 3:08pm
Maybe. The question for me here (and probably some discussion) is whether a device that wants to treat the web as a desktop should be identifiable as an iPad?
October 13, 2021, 3:55pm
Because it uses touch input? Running back into the problem now with using pc.platform.touch which is true on windows. Finally I will made my test against windows because I’m not able to know if it’s an iPad.
Edit windows return false, even if I’m a on windows because I’m in the browser?
This is madness
October 13, 2021, 4:15pm
Because Apple considers the device to be a desktop device, not an iOS, iPad OS device. Whether it’s using touch or not doesn’t matter.
All the current detection methods for iPadOS are effectively ‘hacks’ because Apple want this to be treated as a desktop browser.