Video abspielen

Here is a slightly upgraded version

htmlVidv2.aia (304.5 KB)

With this one, the video is played on screen initialise, then sets a button enabled when the video is finished. Pressing the button takes you to another arrangement.

Think of the html file as a container for the video, which also supplies instructions of how the video should be handled,e.g. setting the video size, and for it to autoplay. (muted is required in order for autoplay to work. The preload setting should load an image of the first frame)

I added some css in order to centre the video on the webviewer, and a small script to capture when the video has ended, and returning a message using the webviewstring.

The video file and the html file MUST be in the same location(folder) for this to work.

1 Like

1 Like


Hi, I managed to play my video. Now I have another question: when I start the app and the video is playing, when I touch the display, the control element comes back. A plus and minus like in the picture, where does that come from, from the web viewer from the app inventor or from the cell phone,how do I get rid of it?

This has nothing to do with Video control elements but with the WebViewer (itself).

Ok then you can't influence that? Is there no other way to play a video when the app is started without controls?

Use the webviewextra extension to remove the zoom controls

1 Like

htmlVid_2.aia (378.9 KB)

You must disable Zoom for that. (It's not removed automatically.)

Just as for using custom webview :wink:
image

Further update, removing zoom controls

htmlVidv3.aia (320.9 KB)

(note: video.html; video size has been edited)

Hmm, what is wrong with my app (aia)?
Yours gives me this (Android 13):

Not for me on Android 13 (companion). Odd....

Google Pixel 4XL. On a Pixel 2XL, Android 11 and Galaxy Note8, Android 9 it seems to work.
But my aia works on all - doesn't it?

Hi, I've managed to run video without controls. The video is displayed fullscreen on my xiaomi Note Pro 11 Plus. I'll send the aia then you can see for yourself.Thank you for your help, it was very instructive for me.
htmlVid4.aia (319.8 KB)

Mine tested on Google Pixel 4a, so it "should" work....

How can I upload the code?

Try this:
htmlVid_2a.aia (380.5 KB)

Only works when coming back from Screen2, but not when companion refreshed

This works with custom webview (you can use just one of the property blocks, but not using the second one will still allow the user to pinch and zoom)

Yes, that's exactly why my blocks...
(but it should work with the APK - not tested)