Hi,
I want to make a screen that is divided into two parts. On the left side for example have a video (html container) that is continuously played and repeated, and on the right side a screen that shows data recovered in an RPG program and has a refresh every x seconds (savetimer).
The problem is that in each refreshment, the video starts again from the beginning and therefore it is never fully visualized.
I have done different tests.
If I do it in a single record format, the video is interrupted in each refresh.
By creating two differentiated record formats, with overlay, having only one of them the automatic refresh (savetimer), the video is also interrupted in each refresh.
Are there any possibilities?
Any idea how to do it or examples?
Thanks
Problem on a screen with embedded video
-
- Profound User
- Posts: 54
- Joined: Fri Dec 19, 2014 12:24 pm
- First Name: Juan
- Last Name: Perez Garcia
- Company Name: NISA
- State / Province: Outside Canada/USA
- Country: Spain
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Problem on a screen with embedded video
I don't have an example, unfortunately.
But... the best way is to have the auto-refresh RPG code use AJAX rather than submitting the screen each time. Submitting the screen will always cause the entire screen to start over.
But... the best way is to have the auto-refresh RPG code use AJAX rather than submitting the screen each time. Submitting the screen will always cause the entire screen to start over.
-
- Profound User
- Posts: 54
- Joined: Fri Dec 19, 2014 12:24 pm
- First Name: Juan
- Last Name: Perez Garcia
- Company Name: NISA
- State / Province: Outside Canada/USA
- Country: Spain
- Contact:
Re: Problem on a screen with embedded video
Thanks, Scott
Do you have more information to try to do what you say?
Do you have more information to try to do what you say?
-
- Profound User
- Posts: 54
- Joined: Fri Dec 19, 2014 12:24 pm
- First Name: Juan
- Last Name: Perez Garcia
- Company Name: NISA
- State / Province: Outside Canada/USA
- Country: Spain
- Contact:
Re: Problem on a screen with embedded video
The idea is to have a single screen with two independent partitions.
In one of them, the current RPG program is executed which, thanks to the automatic refresh, reads data every x seconds of a file. This currently works correctly, but somehow the video to be incorporated in the other part is interrupted and restarted in each soda.
In the other one, a video that plays at the moment the previous program should be played and repeated indefinitely.
In one of them, the current RPG program is executed which, thanks to the automatic refresh, reads data every x seconds of a file. This currently works correctly, but somehow the video to be incorporated in the other part is interrupted and restarted in each soda.
In the other one, a video that plays at the moment the previous program should be played and repeated indefinitely.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Problem on a screen with embedded video
I don't have an example, as I said before.
The idea is to not submit the screen. Instead use JavaScript code that makes an AJAX call, if you like you can use our APIs for this, such as ajaxJSON https://docs.profoundlogic.com/x/JwFK
This can be run on a timer, so every "x seconds" it runs ajaxJSON. ajaxJSON will call a web service -- this can be a normal web program that you code yourself, or you can use a tool like our Universal Displays to make this a bit easier. It can look up database data or whatever it is that needs to refresh and send it back as a JSON document. The ajaxJSON() function will pass that JSON document in the form of a JavaScript object to a JavaScript function when it is received. That function can use pui.set() or applyProperty(), etc to update the screen.
This way, the screen values can update every x second without submitting the screen back to the server. Every time the server uses EXFMT or WRITE to write the display, it has to start over, that's why your video is getting interrupted. But if you update the screen using AJAX, you are just changing values on the existing screen, and not re-drawing the whole thing.
The idea is to not submit the screen. Instead use JavaScript code that makes an AJAX call, if you like you can use our APIs for this, such as ajaxJSON https://docs.profoundlogic.com/x/JwFK
This can be run on a timer, so every "x seconds" it runs ajaxJSON. ajaxJSON will call a web service -- this can be a normal web program that you code yourself, or you can use a tool like our Universal Displays to make this a bit easier. It can look up database data or whatever it is that needs to refresh and send it back as a JSON document. The ajaxJSON() function will pass that JSON document in the form of a JavaScript object to a JavaScript function when it is received. That function can use pui.set() or applyProperty(), etc to update the screen.
This way, the screen values can update every x second without submitting the screen back to the server. Every time the server uses EXFMT or WRITE to write the display, it has to start over, that's why your video is getting interrupted. But if you update the screen using AJAX, you are just changing values on the existing screen, and not re-drawing the whole thing.
-
- Profound User
- Posts: 54
- Joined: Fri Dec 19, 2014 12:24 pm
- First Name: Juan
- Last Name: Perez Garcia
- Company Name: NISA
- State / Province: Outside Canada/USA
- Country: Spain
- Contact:
Re: Problem on a screen with embedded video
Thanks again Scott. I will see all that information and try.
I don't know if someone in the forum has any example of what you indicate in order to start.
I don't know if someone in the forum has any example of what you indicate in order to start.
Who is online
Users browsing this forum: Google [Bot] and 3 guests