(ANCC html5) Copy files to Android phone. The file could not be played. --Help,Help,Help me

Enthusiast ,
Oct 22, 2020

Copy link to clipboard

Copied

I made an animation to HTML5 and copied it to my phone.The file cannot be played.

I don't know what's going on.

I don't know what the problem is.

 

What I'm doing is clicking switch video files.It can be played in a computer browser.

But copying to an Android phone won't play.

 

Help me, I'm very worried

 

I have uploaded my source file.

 

https://drive.google.com/file/d/1xso58WA7MboW3lCxK9kTGvN8ZHNmvm9Z/view?usp=sharing

 

@Preran  @kglad @JoãoCésar  @ClayUUID    @ankushr40215001 

Views

115

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 22, 2020

Copy link to clipboard

Copied

upload your files (all the ones published by your fla) to a file server and navigate to that url using your mobile's browser.

 

if that's not what you want, what is it that you expect to do with those files on your mobile?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 22, 2020

Copy link to clipboard

Copied

Play offline on your phone.

Do not connect to the Internet.

This can be done when it is pure animation。

But now video can't be played.

 

 It can also be played using windows phone 10

However, this does not play on Android.

 

Now I need to send it to someone else who uses Android.

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 22, 2020

Copy link to clipboard

Copied

I tested dozens of Android browsers.

Some browsers can display buttons.

But all browsers can't play videos.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 23, 2020

Copy link to clipboard

Copied

333.PNG

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 22, 2020

Copy link to clipboard

Copied

Android 10

Android 10.gif

 

Windows 10 Mobile

 

Windows 10 Mobile.gif

 

Can't play on Android。

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 23, 2020

Copy link to clipboard

Copied

videos won't play automatically on mobiles.  a play button press is required.

 

in addition, if the video is not embedded in the app timeline, you'll need to load the video (to the correct location) on your mobile.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 23, 2020

Copy link to clipboard

Copied

Buttons were made from the start.  

 

"correct position"What does that mean?Is there a path problem?

 

The video doesn't play on Android phone.

 

 

 

The code for the first frame.

 

 

 

var ts=this
canvas.style.zIndex = "1"; 

//Full-screen code.

var isInFullScreen = (document.fullscreenElement && document.fullscreenElement !== null) ||
(document.webkitFullscreenElement && document.webkitFullscreenElement !== null) ||
(document.mozFullScreenElement && document.mozFullScreenElement !== null) ||
(document.msFullscreenElement && document.msFullscreenElement !== null);
var docElm = document.documentElement;

 

//py is a button for playing video and full screen.
this.py.addEventListener("click", bfsp.bind(this));
function bfsp()
{ts.py.gotoAndStop('cc');
var videoURL = "videos/kc.mp4";
$("#video1")[0].src=videoURL;
$("#video1")[0].addEventListener("ended",nextFrame);
$("#video1")[0].play();

if (docElm.requestFullscreen) {
docElm.requestFullscreen();
} else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
} else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
} else if (docElm.msRequestFullscreen) {
docElm.msRequestFullscreen();
}

}


function nextFrame(evt) {
evt.currentTarget.removeEventListener("ended",nextFrame);
ts.gotoAndPlay("Framepy")
}

 


var myInstance = createjs.Sound.play("sy", {loop:999});//Background music
myInstance.on("loop", handleLoop);
function handleLoop(event) {
//myInstance.volume = myInstance.volume * 0.5;
}

this.stop()

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 23, 2020

Copy link to clipboard

Copied

I think I probably know why.

Local protocols are different from network protocols.

(file:///)Caused an error.Cross-domain.

 

But I don't know how to write code to solve this problem.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 24, 2020

Copy link to clipboard

Copied

the "correct location" according to your code is "videos/kc.mp4" and that location is relative to the folder that contains your app.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
chenjil43641795 AUTHOR LATEST
Enthusiast ,
Oct 24, 2020

Copy link to clipboard

Copied

The video file is in the video folder(videos/kc.mp4).

Now I know why, visit file:///   This is not supported.Support only (https  http).

Cross-domain. Error. The local resource could not be read.

Not just videos,

pictures and Js Jq,

If it's not hosted, it can't be read.

That's why it can't be played.

But I don't know the code.

 

View a large amount of material.

 

Other Android developers use the following methods to load.

Use WebView.(LoadUrl, LoadData, LoadDataWithBaseURL.)

webView.loadUrl("file:///android_assets/file_name");

 

But how to write code in ANimate CC.

 

Likes

Translate

Translate

Report

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