• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

problem video html5 canvas with Apple devices

Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

Hello,

I just saw that I have a big problem regarding videos with Apple devices (smatphone, tablett...) while everything works fine on windows and android device.

 

In image 1 I have a simple button that allows you to go to image 2. I have a simple video with a loop in frame 2. I cut the video sound by checking mute in component settings.

 

this.stop();

canvas.style.zIndex = "1"

this.button1.addEventListener("click", fl_ClickToGoToAndStopAtFrame_49.bind(this));

function fl_ClickToGoToAndStopAtFrame_49()
{
	this.gotoAndStop(1);
}

 

Either the video appears but is blocked without being played or it does not appear at all and we only see a black background.

 

While searching, I came across this video, many have this problem in html :

https://developer.apple.com/forums/thread/690523?page=2 

but it's only for html not JS.

 

Has anyone encountered this problem before?

Thank you for your answers.

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

use a start button to play your video.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

Hi,
You mean i have to add a button in the video image just to start playback ?

 

Video can't play automatically when you click the button of Frame 1 to switch to Frame 2 like Windows and Android devices?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

clicking any button should be sufficient to trigger the video, but because of apple's finickiness and the problems you report, (imo) it's worth testing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

I'll try and let you know if it works like that.

But since I'm using the video for a title screen, it's not going to be great to have to click to play it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

well, wait.

 

you have to click something to start a video or sound in html5.

 

i understood you have a button that initiates a goto where the video is located (and supposed to start), correct?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

yes I have a goto in the previous frame to start the video.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

has that previous frame played before the goto?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

I have 2 other frames that precede the one with this goto

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

I also tried with a version where I only have 2 frames. The one with the goto and the second with the video

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

how many times does that frame with the video play prior to the goto?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

The video is not played before

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

i don't know how many times i can ask the same question.

 

can you just answer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

sorry but i don't understand what you want to know?

 

the number of times the video is played ? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

how many times does that frame with the video play prior to the goto?

 

ie, i know that frame is entered after the goto. is it ever entered before that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

Ok sorry.

No it has been read 0 times before.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

ok.

 

does adding a start button for the video solve the problem with apple devices?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

I found the solution for autostart on APPLE devices.
By reading apple oriented forums, I thought it was necessary to use : playsinline=true

car may encounter problems but it did not change anything.

 

On windows or android, videos can be played when triggered (goto...)
With Apple devices, the trigger as goto only works if the sound parameter in the code is disabled.


On Windows/Android, you can play a video with sound with a simple trigger (goto). On the other hand, still under windows/android, if you want the video to start without any triggering, the sound parameter must be muted.

 

So for APPLE devices just put the sound parameter on mute so that the video is triggered with goto.

You have to play the sound separately.
I will therefore add the reading of an mp3 file in addition.

 

If you want video and sound to play at the same time, I have to put a button in the video frame to activate it, but that's not what I wanted.
I needed an autoplay.

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

that's pretty close to what i stated.  (though i didn't know you were ok starting the video muted.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

I especially wanted the video to be triggered with a goto and not with a button on it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

But it's still annoying to have to mute the sound on purpose.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

understood.  that's on apple, though.

 

otoh, i'm very happy that a button press/user interaction is required.  (can you imagine the old days before browsers restricted sounds > open a website > annoying, sometimes very loud, sound starts, and sometimes it wasn't even easy to find the video/sound source.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

Yes of course.
I also knew the era of the web with sound on all the pages. Very annoying it's true.
But here I'm doing something game-oriented, that's why I needed the automatic triggering of the videos.

Thanks a lot for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

I just saw that it does not work on iphone while it works on IPAD and MAC.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

try a play button for the video.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines