Highlighted

How to make video using playsinline for iPhone?

Participant ,
Jul 13, 2019

Copy link to clipboard

Copied

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!

Views

671

Likes

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

How to make video using playsinline for iPhone?

Participant ,
Jul 13, 2019

Copy link to clipboard

Copied

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!

Views

672

Likes

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
Jul 13, 2019 0
Participant ,
Jul 14, 2019

Copy link to clipboard

Copied

Should I post this in the dreamweaver forum?

Likes

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
Reply
Loading...
Jul 14, 2019 0
Adobe Community Professional ,
Jul 14, 2019

Copy link to clipboard

Copied

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();

Likes

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
Reply
Loading...
Jul 14, 2019 1
Participant ,
Jul 14, 2019

Copy link to clipboard

Copied

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?

Likes

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
Reply
Loading...
Jul 14, 2019 0
Adobe Community Professional ,
Jul 14, 2019

Copy link to clipboard

Copied

are you creating an air or html5/canvas project?

Likes

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
Reply
Loading...
Jul 14, 2019 0
Participant ,
Jul 14, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 14, 2019 0
Adobe Community Professional ,
Jul 14, 2019

Copy link to clipboard

Copied

are you using the video component?

Likes

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
Reply
Loading...
Jul 14, 2019 0
Participant ,
Jul 14, 2019

Copy link to clipboard

Copied

yeah

Likes

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
Reply
Loading...
Jul 14, 2019 0
Adobe Community Professional ,
Jul 15, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 15, 2019 0
Participant ,
Jul 15, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 15, 2019 0
Adobe Community Professional ,
Jul 15, 2019

Copy link to clipboard

Copied

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?

Likes

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
Reply
Loading...
Jul 15, 2019 0
Participant ,
Jul 15, 2019

Copy link to clipboard

Copied

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;

}

Likes

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
Reply
Loading...
Jul 15, 2019 0
Adobe Community Professional ,
Jul 15, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 15, 2019 0
Participant ,
Jul 15, 2019

Copy link to clipboard

Copied

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)

Likes

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
Reply
Loading...
Jul 15, 2019 0
Participant ,
Jul 15, 2019

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 15, 2019 0
Adobe Community Professional ,
Jul 16, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 16, 2019 0
Participant ,
Jul 16, 2019

Copy link to clipboard

Copied

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)

Likes

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
Reply
Loading...
Jul 16, 2019 0
Adobe Community Professional ,
Jul 16, 2019

Copy link to clipboard

Copied

what’s line 339 of second.js

Likes

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
Reply
Loading...
Jul 16, 2019 0
Participant ,
Jul 16, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 16, 2019 0
Adobe Community Professional ,
Jul 17, 2019

Copy link to clipboard

Copied

copy and paste line 339

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 17, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 17, 2019

Copy link to clipboard

Copied

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;

};

Likes

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
Reply
Loading...
Jul 17, 2019 0
Adobe Community Professional ,
Jul 17, 2019

Copy link to clipboard

Copied

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 17, 2019

Copy link to clipboard

Copied

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";

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 17, 2019

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 17, 2019 0
Adobe Community Professional ,
Jul 17, 2019

Copy link to clipboard

Copied

use

$("#video1")[0].play()

to make your video play or click the play button on video component.

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 17, 2019

Copy link to clipboard

Copied

Ok, that was admittedly a stupid mistake... I'm new to all this!

More updates in a min. There are other problems too.

Thanks tho!

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 17, 2019

Copy link to clipboard

Copied

Ok so (before we move on to the play/pause functionality which isn't working again...) this doesn't actually solve my playsinline problem. I uploaded the files to my server space and the video file still opens in the ios native player.

To be more specific, the page shows a black video box with a greyed out play button (it doesn't show the video component poster image), then when I click the playBtn I made the posted image flashes on and then the video opens the native iOS player and plays.

Likes

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
Reply
Loading...
Jul 17, 2019 0
Adobe Community Professional ,
Jul 17, 2019

Copy link to clipboard

Copied

i don't know why you want to add more buttons but try this,  http://www.kglad.com/Files/forums/Untitled-1.fla

Likes

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
Reply
Loading...
Jul 17, 2019 0
Participant ,
Jul 18, 2019

Copy link to clipboard

Copied

bump?

Likes

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
Reply
Loading...
Jul 18, 2019 0
Participant ,
Jul 19, 2019

Copy link to clipboard

Copied

And bump again...here's hoping...

Likes

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
Reply
Loading...
Jul 19, 2019 0
Participant ,
Jul 21, 2019

Copy link to clipboard

Copied

Bumping this again hoping someone sees it. I've tried posting at stackoverflow and I can't get an answer from anyone. Which is weird because it seems like iOS has been allowing playsinline to play videos in the browser for a long time now. I can't get it to work but maybe I'm just not adding the code at the right place? I opened up the html files that Animate published but I'm not sure where to add the code.

Likes

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
Reply
Loading...
Jul 21, 2019 0