Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Lily/Video extension doesn't work on iPhone when packaged. #1675

Open
nickwong168 opened this issue Sep 6, 2024 · 11 comments
Open

Lily/Video extension doesn't work on iPhone when packaged. #1675

nickwong168 opened this issue Sep 6, 2024 · 11 comments

Comments

@nickwong168
Copy link

I was testing the Video extension and found the packaged iPhone problem. It works perfectly at editor, and also works fine on Android when packaged. But does't work on iPhone.

Here are the only blocks I'm using(and only one sprite for now):
block_2024_9_5-16_51_50

The URL of the video is https://newtousa.club/RRL/sample.mp4 (only 1.3MB)

I'm using the newest version of Turbowarp and add the Video extension from the official extension library.

All the package options are left default. And I've put the generated HTML file here: https://newtousa.club/RRL/a.html

Is there anything I did incorrectly? Thanks!

@unknown07724
Copy link

it's probably apple doing something

@SharkPool-SP
Copy link
Collaborator

when I tried loading the video in the editor it failed. It seems to be a CORS proxy issue, correct me if im wrong

@nickwong168
Copy link
Author

when I tried loading the video in the editor it failed. It seems to be a CORS proxy issue, correct me if im wrong

Yes, please use this link instead:
https://bm.weiqiyun.net/upload/file/20250109/677f8a0566dd2.mp4

Thank you.

@SharkPool-SP
Copy link
Collaborator

ok, this link works on windows, but not on mobile (tested safari so far). I tried it in the editor

@GarboMuffin
Copy link
Member

Seems to work fine on my iPad

Image

@nickwong168
Copy link
Author

ok, this link works on windows, but not on mobile (tested safari so far). I tried it in the editor

Yes, appreciated if it can be solved. I think playing videos on Safari is a relatively significant requirement.

@nickwong168
Copy link
Author

Seems to work fine on my iPad

Image

How about running it again after packaging?

@GarboMuffin
Copy link
Member

So far your issue just says "does't work" so it's hard to figure out if you mean the video doesn't load at all, if its loading as a black screen, if its loading initially but not playing, etc.

Some browsers restrict starting videos when not in response to a user action. Safari seems to be more aggressive about this. Might be able to get around it by setting the video to be muted.

@GarboMuffin
Copy link
Member

Here is an example of it working fine

8mb.video-2kU-Y6NrDFEY.mp4

@nickwong168
Copy link
Author

So far your issue just says "does't work" so it's hard to figure out if you mean the video doesn't load at all, if its loading as a black screen, if its loading initially but not playing, etc.

Some browsers restrict starting videos when not in response to a user action. Safari seems to be more aggressive about this. Might be able to get around it by setting the video to be muted.

Thanks you for your reply. I've tested your method of setting the video to be muted when loading and set the volume to be 50% later when click a sprite. Here are the codes:

Image

Image

Then I packaged it with default options and put to my website as: https://hua24.com/test.html

I can play the video normally on PC and Android:

Image

But it appeared blank on iPhone:

Image

@GarboMuffin
Copy link
Member

For me, it takes a few seconds to load but does eventually load…

Image

The menu bar at the top of your image looks a little strange, is this Safari or a different app?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants