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

How to make video using playsinline for iPhone?

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

2.4K

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

Copy link to clipboard

Copied

Should I post this in the dreamweaver forum?

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 ,
Jul 14, 2019 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();

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

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

Copy link to clipboard

Copied

are you creating an air or html5/canvas project?

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

are you using the video component?

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

Copy link to clipboard

Copied

yeah

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

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

}

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

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

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

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

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

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

Copy link to clipboard

Copied

what’s line 339 of second.js

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

copy and paste line 339

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

Copy link to clipboard

Copied

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

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

};

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

Copy link to clipboard

Copied

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

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

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