Embedded Html Package

CMS 4.0.15 Docker version
Android Player
Player version 4.404.

I’m testing the Embedded HTML Package functionality and encountering the following issues:

  1. The .zip archive fails to upload through the upload interface, being flagged as invalid.
  2. If I compress the files into a .zip archive and then manually change the extension to .htz (a workaround found on this forum), the folder uploads successfully and becomes available for use. However, when I publish the template, the panel displays “Error 404, file not found”.

The folder structure is as follows:
index.html
script.js
styles.css
images/example.jpg

What am I doing wrong? How does this feature work?

Right, so the .htz format is correct here, but what do you mean by ‘template’? Also, when you add the widget to the layout, what are you using for the default page in the widget Properties? This needs to point back to index.html.

Sorry, layout …
I’m using ‘index.html’. Is that wrong?"

image

As long as the main file in the root of your .htz (.zip) file is also called index.html, then you should be fine. I will note that you cannot preview anything from within the Layout itself, you must then assign it to the player and view it locally for testing.

I have uploaded the layout and associated it with a device, but I keep getting ‘page not found’.

So when you upload the .htz package, it will appear in the Media list as a file. Get the ID number from it. Then go to the player and find the file in the /files/ section of the application. Open the file and ensure that all is there and that it’s the most recent version of the media and that it displays correctly locally on the player with the embedded web browser.

It seems there is no file…

So there should definitely be a folder that corresponds to the ID of the .htz file in /data/data/uk.org.xibo.client/files/. If that doesn’t exist, then your content isn’t being delivered to the player via XMR correctly, so I’d start there and see why that might be the case.

I’ve: /sdcard/Android/data/uk.org.xibo.client/files
There are no files.

Well that much is to be expected, as those are not the same locations:

/sdcard/ is the same as /storage/emulated/0/, which is also aliased as /storage/self/primary/

You are looking for the contents of /data/data/uk.org.xibo.client/files/. You should be able to use ADB to connect to your device, then either elevate to root or run su 0 ls -laF /data/data/uk.org.xibo.client/files/ for proper confirmation

Ok, with ADB:

The file seems to be there…

Is there also a folder in there called package_73 where all of the 73.htz contents are extracted?

px30_evb:/data/data/uk.org.xibo.client/files # cd package_73/
px30_evb:/data/data/uk.org.xibo.client/files/package_73 # ls
htmlpackage

px30_evb:/data/data/uk.org.xibo.client/files/package_73 # cd htmlpackage/
px30_evb:/data/data/uk.org.xibo.client/files/package_73/htmlpackage # ls -l
total 1
-rw------- 1 u0_a49 u0_a49 529 2024-09-09 17:53 index.html
-rw------- 1 u0_a49 u0_a49 56 2024-09-09 17:53 script.js
-rw------- 1 u0_a49 u0_a49 441 2024-09-09 17:53 second_page.html
-rw------- 1 u0_a49 u0_a49 345 2024-09-09 17:53 style.css
-rw------- 1 u0_a49 u0_a49 437 2024-09-09 17:53 third_page.html

Okay, so the files are getting there and being extracted on the device correctly. In your HTML Package widget, it should be looking at the index.html file. I think maybe since you have js and css file and other things, perhaps you should start simple with just an index.html file to see if you can get it to display on screen.

example.htz
|_ index.html

index.html:

<html>
<head>
  <title>Test</title>
</head>
<body>
<div>
  <h1>Hello World!</h1>
</div>
</body>
</html>

Tried, nothing to do, still ‘error 404 …’

I’m at a loss then-- you are likely doing something wrong that is causing this. You can try enabling Debug logs on the player and looking in the CMS for anything that may indicate why the content is not playing in the layout that you scheduled to the player.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.