Media player - weird behaviour

This works...

You get a very brief flash of full screen white before the video starts, but it's better than a weird, grainy symbol.

Mad amount of block to play a single video

Now to be able to play 2 videos, I assume I am going to have to have 2x Players?

What should have changed compared to my version?

No.

What should have changed? Not sure what you mean.
Basically, the videos must be exactly 25fps (well in my case anyway).
I am also using the loading block to switch off the arrangement screen to hide the horrible play symbol.

I have them all working now.

Just trying to work out how to configure for multiple videos with one player.
Wish I could get rid of the white flash at the start of the video player (while it initialises), but have not managed to do that.

I have still images that are 1080x1920 captures of the video. Great quality here, but when uploaded to the phone, the quality is appalling.
I assume due to compression.

Any way around that? Maybe load the file from the phone (if at all possible)

Firsr set the source, then play the video
Taifun

Can't get past the terrible image quality. I can only assume its because the 1080x1920 image gets compressed (it's set to fill parent)

You could also try this extension:

For your image, try resizing it so that it does not have to be compressed, make it the size of your device, e.g. if viewing when device held in portrait mode, resize your image width to the device width.

Tried that. Still looks terrible. Just cannot work that out.

Anyway, for some bizarre reason, this morning the entire app doesn't work properly.
I blasts past wait touch commands and does all kind of weird things.
It was working fine last night.

I am asking too much of this software with my limits knowledge.
I can't put any more time into it.

Share the image, and the blocks/code you are using to display the image.

Have you told us about your device: make/model/android version ?

I am struggling with this and the trouble is I hate to be beaten.

This is my list of issues (apart from being newbie and not understanding the way it all works).

The standard media player shows the 'tools'. No good, I need video playback that is clean and not 'stoppable'.

So, using the PLYR extension. Great, does what I need. Except it keeps doing things I don't expect.

At the moment, it blasts past the first video and starts the second video. I can't see why it doesn't wait for PLYR1 to finish first. Annoying... It used to work until I fired it up yesterday, so something changed.

Ideally that would be one video instead of two, but I can't upload the video in one piece as its too large (and already reduced resolution)

The backpack appears broken this morning. Gone all glitchy.

Yes.. I know I don't need two instances of the PLYR for 2 videos, but I have not worked that out yet.

The sequence starts with an image and waits for the screen press.
That image touch turns off that arrangement and image and opens the video arrangement.

I am having all kinds of issues with scaling and quality. All the videos and images are 1080 x 1920. All video are now 25fps as that messes up the PLYR if not exact.

But, fit to screen, percentages, fill parent etc.... none of them work well. My images are distorted and change from one section to the next.

Currently, using percentage works best, but that won't work well when used on a different device (Curerntly an S22+)

I thought of binning images (because the compressed images are terrible) and pausing the video after one frame (if possible) and waiting there for input.
But then how do you tell when someone has touched the video screen?

The final issue is touchscreen option selection. When the video ends, it loads an image in Canvas which is the last frame of the video that has the choices.

Canvas then sends you off to the next part of the story depending on where you touched the screen.
The Background Canvas image is also terrible.

Tried uploading various resolutions of images. None of them work very well.

Its a horrible mess now. It just not viable on this platform with my (useless) skill level

Use only 1 player and your issues of a second player starting while the first still has not finished are gone

Don't try to fix everything in one step... do it step by step... start with using only one player

Taifun

I don't yet know how to use one player.... hence I used 2.
I have been going step by step, but for some reason it randomly broke and odd issues keep popping up.

My biggest issue by far is the random quality and sizes of the media. Ideally 'Fill parent' would be used for everything, but that just doesn't work.

Currently look at other possible options. I just don't think I will ever get this working

Use 1 player
Set the first source, then start playing
If player finished, set the secomd source and start playing
Like this you can use 1 player to play n files, no need to have a separate player for each file

And generally it would help very much to learn some basics...

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I have used MIT a fair bit before.
But... its the images and scaling that I think will end this anyway.
From what I understand, there is an ongoing issue with the quality of the Canvas background image for starters.

Anyway, thanks for the advice

Again: don't try to fix everything at the same time
This thread is about media player

Create a separate thread for each issue
And create an example project as simple as possible to experiment and to find a solution for each issue
Then put everything together in your main project

How many times did you already anounce this, but you are still here?

Taifun

Thanks for all the advice.
I had it working, which is why I got as far as the Canvas part. Then the video stopped working.

I have purchased a 27" touchscreen and a BrightSign media player. Already got that working.

Not going down the tablet with an app avenue. Too much hassle.

To play multiple videos in a row with one VideoPlayer, see this example:


VideoPlayer_withoutControls_2.aia (2.4 MB)


Post your aia (or send it to me via PM).

Thank you for that example. I had worked out the single usage of the Plyr extension but your example is slightly neater than mine.

But, it does not get me past all the other shortfalls of various parts of the app that I cannot seem to get past.

The screen still transitions horribly between videos because of the play symbol issue
The images are garbage no matter what resolution or format I upload or set the screen to.
The Canvas touch image is terrible.

I constantly have to exit MIT App inventor entirely and come back in because it shows red errors that don't exist and won't clear. The only way to clear them is to log out and log back in.

The Backpack this morning won't let me pick up blocks of code that are set to disabled. So they are stuck in the backpack and I cannot retrieve them.

Looking at it now, there is a yellow warning but there is nothing wrong. A reboot cleared that.
Then every 20 minutes... 'Oops, we tripped on a bug' comes up.

Sticking with the touchscreen and media player.
This software is just a bit too rough around the edges for my needs (probably due to me, but life is too short to put any more time into it)

My test app runs smoothly on all Android versions, with no loss of quality or transition issues between video clips (and, as requested, without any controls). Period.

Whatever your concern or problem may be, it remains in the dark...
We've obviously been talking past each other from the start in these 50 posts. What a waste of time.

I think we should close this topic (inconclusively).

I did manage to get this to kind of work.
But, I ended up having 8 pages. 1 page for each section of the process.
There is a slight flicker between pages, and I cannot get past that.
I got over the image resolution problem by not using them... I started them immediately paused video clips instead. Therefore the image exactly matched the video content.

I used an extension to allow me to overlay video and Canvas (as the touch detection)

But...
Using pages like this is not the correct way to do it (I believe).

When a choice is made on a page, it then opens the next page.
First off, nothing ever closes a page behind it which must be bad practice for memory reasons?
And also you can return home on most pages which simple opens page 1 again.

This must be a bad thing?
Maybe if each page closed as you progressed to the next? Not sure that is possible.

I have sat to try and work out how you could make this complex process work on a single page, but it's bafflingly complicated.

Also, MIT App inventor is riddled with errors and glitches. I basically refresh the page every 10 minutes to clear all the errors it says I have when there are actually none.

Anyway. Still going with the media player option.

page - do you mean screen ? If so, this sounds unnecessary and a bit wrong.

You never provided examples of the problem you were facing with your images, therefore we were unable to help you fix it.

You need to be more specific if you believe you have found a bug. Provide an example aia project with the repeatable (unwanted) behaviour. (there is a current issue with yellow/red errors remaining in the blocks editor, even when the issue has been resolved, this does require a refresh, but it does not affect app functionality.)

If you would share your work, then we can see what you are doing and advise accordingly, otherwise we cannot help.