Media player - weird behaviour

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.

I have the first 3 pages here of 9.
I have added a process that closes the page as it progresses to the next page.
This therefore 'seems' to have fixed any issue with pages being left open behind it.

So currently, this actually nearly works.
I randomly flashes the screen between pages sometimes and I have not worked out what causes that.

Sometimes you still see the PLYR 'Play' symbol for a couple of ms.
The switching off of the VideoContainer while loading mostly fixed that issue.

I know its rough. First go and all that.

But, it does actually now follow the path of selecting questions at the end of the video.

I have worked out (using the test X+Y co-ords disabled block), where the 'Questions' in the video are when the Canvas (TouchScreen) is enabled.

Will these scale up if viewed on a table for instance? Or, will I need to re-find these co-ords.

All pages are now set to fill parent.

As for crashing. Yes, the errors are pretty much there all the time and I just have to refresh every 5/10 minutes.

I does also properly crash and asks to submit a report probably every 15 minutes and I don't know why that is (Oops... we encountered a problem)

Doesn't seem as stable as it was last time I uesd it (which was a while back).

I did start to try and re-write this on a single page, using a variable called 'Step'.
Each process in the chain of videos etc moved that variable along.

But the blocks soon got horribly complicated and hard to read.

This method, right or wrong. Currently is the best I have got it to work.



This seems to grow up to be a personal diary of your coding efforts. Starting with mediaplayer issues and ends up with color of buttons issues. Maybe someone can close this thread?

2 Likes

Yes, this should have happened much earlier.

1 Like

As suggested earlier

Taifun

1 Like