How To Add A Video In Javascript?

125 views
Skip to first unread message

Mighty Apps Studio

unread,
Jun 3, 2017, 7:37:05 AM6/3/17
to DroidScript
How Can I Add I Video In Javascript?

Symbroson

unread,
Jun 3, 2017, 10:01:59 AM6/3/17
to DroidScript
Use the video view:

vid = app.CreateVideoView(1,1);
vid.SetFile(path);
vid.Play();

Mighty Apps Studio

unread,
Jun 3, 2017, 6:40:08 PM6/3/17
to DroidScript
How to i add it to laySlide3

Mighty Apps Studio

unread,
Jun 3, 2017, 6:48:04 PM6/3/17
to DroidScript
And pause button

Steve Garman

unread,
Jun 3, 2017, 6:53:33 PM6/3/17
to DroidScript
Have you looked at the sample that comes with DroidScript "Video Player (Simple video player)"?

Please try writing the code for yourself an post here any problems you may have.

Mighty Apps Studio

unread,
Jun 12, 2017, 9:22:10 AM6/12/17
to DroidScript
Alex I Want To Add Alteast 3 or 4 videos and i Am Using DS Video Player As An Example but on DS Video Player Sample I Can Only See Videos I Recorder Not the ones i downloaded?

Symbroson

unread,
Jun 12, 2017, 9:25:20 AM6/12/17
to DroidScript
Have you seen this line?

var folder = "/sdcard/DCIM/Camera";

And this one?

mp4List = app.ListFolder( folder, ".mp4", 10 );

Mighty Apps Studio

unread,
Jun 12, 2017, 3:27:15 PM6/12/17
to DroidScript
Thanks Bro And One More Thing I Can Add Line Breaks And Make Pages Long In Layout Slide

Symbroson

unread,
Jun 12, 2017, 3:33:17 PM6/12/17
to DroidScript
maybe you want lay.SetSize()?
Sorry hvnt understood what you want...

Mighty Apps Studio

unread,
Jun 12, 2017, 4:29:10 PM6/12/17
to DroidScript
Sorry, I Was Saying I Can't Add Line Breaks In App.CreateText And I Can't increase the pages length in slide layout

Mighty Apps Studio

unread,
Jun 12, 2017, 4:42:13 PM6/12/17
to DroidScript
AND CAN I ADD VIDEO FROM YOUTUBE THROGH LINK. LIKE YOU CAN ONLY WATCH THE VID IF YOU ARE ONLINE

Symbroson

unread,
Jun 13, 2017, 12:50:51 AM6/13/17
to DroidScript
"\n" represents a "line break" in any text.
like "\t" for tabs and so on

Of course you can just watch YT vids if you are connected to wifi or mobile data. Either create a webview and load the YT page or download it (I dont know how but u can search on the forum - we had this question already)

JustAnotherDude

unread,
Jun 13, 2017, 1:16:37 AM6/13/17
to DroidScript
note : so i know the \n only works i " and not in '

Steve Garman

unread,
Jun 13, 2017, 1:26:13 AM6/13/17
to DroidScript
@JustAnotherDude, that is not correct.
In JavaScript, strings delimited with " are no different from those delimited with '

@Mighty,
If you want to use multiple lines in a text control, you need to use the option "MuliLine" in app.CreateText

txt= app.CreateText("hello",-1,-1,"MultiLine");

Symbroson

unread,
Jun 13, 2017, 2:21:05 AM6/13/17
to DroidScript
Right you need the MultiLine optio

app.CreateText("hello\nworld",-1,-1,"MultiLine");

Tenz WH

unread,
Jun 13, 2017, 2:55:50 AM6/13/17
to DroidScript
some video not played.

Mighty Apps Studio

unread,
Jun 16, 2017, 10:16:14 AM6/16/17
to DroidScript
Thanks Steve And One More thing I Can't Add Scroll to a page where there are buttons. Even increasing the size of the page doesn't do anything.

Steve Garman

unread,
Jun 16, 2017, 12:04:12 PM6/16/17
to DroidScript
Mighty,

Can you please try to stick to one subject in one thread.

Asking multiple unrelated questions in the same topic makes it difficult for people searching the forum to find answers that have already been given.

Can I suggest you start a new topic for your scroll question and post a simple code example that demonstrates your problem.

Reply all
Reply to author
Forward
0 new messages