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

How to make video using playsinline for iPhone?

Engaged ,
Jul 13, 2019 Jul 13, 2019

Hi. I'm just learning coding, but I see here that in order to prevent a video from automatically playing in quicktime on an iPhone you have to add

<video playsinline>

New <video> Policies for iOS | WebKit

Where do I add this in Animate?

Thanks!

3.8K
Translate
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
Engaged ,
Jul 14, 2019 Jul 14, 2019

Should I post this in the dreamweaver forum?

Translate
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 ,
Jul 14, 2019 Jul 14, 2019

if you're using the video component just assign the src and don't execute a play().  eg,

$("#video_component_name")[0].src = videoURL;

if you wanted it to play automatically,

$("#video_component_name")[0].src = videoURL;

$("#video_component_name")[0].play();

Translate
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
Engaged ,
Jul 14, 2019 Jul 14, 2019

Sorry I meant I don’t want it to play in iPhone‘s native player, I want it to play on the page where it’s at. But not open the player, so you see what I mean?

Translate
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 ,
Jul 14, 2019 Jul 14, 2019

are you creating an air or html5/canvas project?

Translate
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
Engaged ,
Jul 14, 2019 Jul 14, 2019

Html5 sorry I thought I mentioned that in the original post.

Translate
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 ,
Jul 14, 2019 Jul 14, 2019

are you using the video component?

Translate
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
Engaged ,
Jul 14, 2019 Jul 14, 2019

yeah

Translate
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 ,
Jul 15, 2019 Jul 15, 2019

then remove that webkit stuff and just use your createjs code.

Translate
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
Engaged ,
Jul 15, 2019 Jul 15, 2019

Thanks! but what is that, and where do I put it in animate?

Translate
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 ,
Jul 15, 2019 Jul 15, 2019

where is what?  webkit?

it's not in animate.  you're the one that mentioned it.

look, start a new fla

add the video component

assign an instance name

then, while the component is still selected, use the web snippets panel to assign your video's url

test.

any problem?

Translate
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
Engaged ,
Jul 15, 2019 Jul 15, 2019

Ok now nothing works, the page just won't load. Here's my code with the changes you mentioned, did I do something wrong?:

this.stopBtn.addEventListener("click", fl_MouseClickHandler.bind(this));

function fl_MouseClickHandler()

{

$("#video1")[0].stop();

}

this.playBtn.addEventListener("click", fl_MouseClickHandler_2.bind(this));

function fl_MouseClickHandler_2()

{

$("#video1")[0].src = /videos/2.mp4;

this.pauseBtn.visible = true;

}

this.pauseBtn.addEventListener("click", fl_MouseClickHandler_3.bind(this));

function fl_MouseClickHandler_3()

{

$("#video1")[0].pause();

this.pauseBtn.visible = false;

}

Translate
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 ,
Jul 15, 2019 Jul 15, 2019

open your browser's console and check for error messages (in particular, that path/name to your mp4)

Translate
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
Engaged ,
Jul 15, 2019 Jul 15, 2019

Ok but the page won't even load at all. There are two errors:

Uncaught SyntaxError: Invalid regular expression flags

second.html?12111564:32

Uncaught ReferenceError: AdobeAn is not defined

    at init (second.html?12111564:32)

    at onload (second.html?12111564:70)

Translate
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
Engaged ,
Jul 15, 2019 Jul 15, 2019

Also I really appreciate you teaching me this stuff but if at any point you'd want me to send you the .fla file so you can see things first hand just let me know and I will.

Translate
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 ,
Jul 16, 2019 Jul 16, 2019

there's no stop() method of videos.  ie, remove your stop button or have it call your pause function.

Translate
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
Engaged ,
Jul 16, 2019 Jul 16, 2019

Oh thanks I was not aware of that. However, I've deleted the stop button code altogether and it's still giving the same error messages and won't load at all:

Uncaught SyntaxError: Invalid regular expression flags

second.html?44938056:32 second.js:339 

Uncaught ReferenceError: AdobeAn is not defined

    at init (second.html?44938056:32)

    at onload (second.html?44938056:70)

Translate
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 ,
Jul 16, 2019 Jul 16, 2019

what’s line 339 of second.js

Translate
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
Engaged ,
Jul 16, 2019 Jul 16, 2019

It's the code you told me to enter. What does that mean?

Translate
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 ,
Jul 17, 2019 Jul 17, 2019

copy and paste line 339

Translate
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
Engaged ,
Jul 17, 2019 Jul 17, 2019

$("#video1")[0].src = /videos/2.mp4;

Translate
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
Engaged ,
Jul 17, 2019 Jul 17, 2019

Line 339 is above, but here's my complete frame 1 code in case it helps:

this.stop();

var nextBtnVAR = this.nextBtn;

var timelineVAR = this;

this.playBtn.addEventListener("click", playVideoFUNC.bind(this));

function playVideoFUNC()

{

$("#video1")[0].src = /videos/2.mp4;

this.pauseBtn.visible = true;

}

this.pauseBtn.addEventListener("click", pauseVideoFUNC.bind(this));

function pauseVideoFUNC()

{

$("#video1")[0].pause();

this.pauseBtn.visible = false;

}

this.nextBtn.addEventListener("click", nextFrameFUNC.bind(this));

function nextFrameFUNC()

{

this.gotoAndStop(2);

}

this.video1.on("added", function()

{

$("#video1")[0].addEventListener('ended', timelineVAR.endedHandler);

}

);

this.endedHandler = function(e)

{

timelineVAR.gotoAndStop(1);

this.pauseBtn.visible = false;

};

Translate
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 ,
Jul 17, 2019 Jul 17, 2019
Translate
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
Engaged ,
Jul 17, 2019 Jul 17, 2019

Now the page loads but the video won't play, here's the error message:

Failed to load resource: the server responded with a status of 404 (Not Found)

e9cf12a0-7c4b-414f-a5c9-97ef49340aa9_20160203035417.960x540at1200_h264.mp4:1

and here's the code:

$("#video1")[0].src = "https://images-tv.adobe.com/avp/vr/15a99ccf-0e7c-4601-b270-87dd82624086/5078a43c-81f9-4a93 -836c-815278b83a8e/e9cf12a0-7c4b-414f-a5c9-97ef49340aa9_20160203035417.960x540at1200_h264.mp4";

Translate
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
Engaged ,
Jul 17, 2019 Jul 17, 2019

Edit: I noticed there was a line break in the code I just pasted, so I deleted the empty space. Now the page loads but the video won't play and it gives me no error message.

Translate
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