Xibo-Linux Player 0.5.0-Alpha Build 2 Buld with webkit2 instead of webkit (v1)

Hello Maxim and Alex
So i wanted to try to Contribute, i am a sys admin, and right now i am testing Stivius Forked Xibo-player 0.5.0-Alpha build 2 on Arch Linux Raspberrypi! Sorry if this is not relevant! just wanted to share (Sharing is caring right?) what i found!

So i did a successful compile of the Linux Player on a Raspberry pi 3 B+ with Arch Linux.:heart_eyes::sunglasses:

I did compile the Linux Player with webkit2gtk-4.0 Version 2.22.5 but i had to do some tweeking to get it working.

  1. Edited Player/CMakelist.txt
    pkg_check_modules(WebKit REQUIRED webkit2gtk-4.0>=2.22.5)

  2. Edited XiboLinuxStack/player/adaptors/WebKitWebViewAdaptor.cpp
    Line 4: #include <webkit2/webkit2.h> (Changed from webkit/webkit.h)

Line 41: Need to be changed, this function is not working in Webkit after version 1. (i removed line 41 webkit_web_view_set_transparent(m_webView, true))

Note Maby the correct command webkit_web_view_set_background_color (m_webView, #(not sure how to get this function working. sorry i am not a programmer)#);

(To do the test build on my Raspberry pi i Removed line 41, and did rerun the make command. and it succeeded.)

Looks like this are are the only 2 lines needed to be changed to Upgrade to a newer version of the WEBKIT.
I have successfully started the client, it loads the layout from our Xibo CMS server, Video with audio works, Images, and it shows webpages from another webserver!

Wish you all a great afternoon! XIBO IS AWSOME! :wink:

PS:
Here are my temporary notes from how i built the client. sorry they are messy, but its only notes to i can reproduce the system later on:

How i Built my Build enviroment

sudo pacman -Syu
sudo pacman -S cmake
sudo pacman -S boost
sudo pacman -S gst-plugins-bad gst-plugins-base gst-plugins-base-libs gst-plugins-good
sudo pacman -S webkit2gtk webkit2-sharp
sudo pacman -S gst-libav
sudo pacman -S patch
sudo pacman -S bison
sudo pacman -S flex
sudo pacman -S GTest
sudo pacman -S gmock

#Install spdlog
yaourt -S spdlog-git

mkdir DEV
cd DEV
git clone https://github.com/Stivius/XiboLinuxStack.git
cd XiboLinuxStack/

Edited Player/CMakelist.txt
pkg_check_modules(WebKit REQUIRED webkit2gtk-4.0>=2.22.5)

mkdir build
cd build

cmake …
make
#Here i got error messages and needed to do some tweeking before running make command again:

Edit
/home/archpi/DEV/XiboLinuxStack/player/adaptors/WebKitWebViewAdaptor.cpp

Line 4: #include <webkit2/webkit2.h> (Changed from webkit/webkit.h)

Line 41: Need to be changed, this function is not working in Webkit - 4.0(i removed line 41 since i do not understand what command to replace it with)

I think this could be the correct command webkit_web_view_set_background_color (m_webView, something);
(changed from: webkit_web_view_set_transparent(m_webView, true); )

####NOTE from internet: https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-set-background-color ####

GdkRGBA
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
A GdkRGBA is used to represent a (possibly translucent) color, in a way that is compatible with cairo’s notion of color.

Members
gdouble red;

The intensity of the red channel from 0.0 to 1.0 inclusive

gdouble green;

The intensity of the green channel from 0.0 to 1.0 inclusive

gdouble blue;

The intensity of the blue channel from 0.0 to 1.0 inclusive

gdouble alpha;

The opacity of the color from 0.0 for completely translucent to 1.0 for opaque

NOTE END

Did a new rebuild where i commented out the fixed size and changed it to full screen.
Uncommented the Fullscreen in XiboLinuxStack/player/XiboApp.cpp

// m_mainWindow->setSize(1920, 1080);
m_mainWindow->setFullscreen(true);

And that seems to work GREAT to! You guys have done a great job! :wink:

How does it handle playing a 1080p video with scrolling text put over it?

Transparent background is crucial so we can’t have a Player that doesn’t use that unfortunately.

We’re not planning on supporting RPi for the reasons we’ve set out before in the FAQ. I’d be interested to hear how it performs though as a curiosity.

Let me test tomorrow morning, I will post results here :wink:

Ok, so i have to do some more investigation, after running 1080P video i had a MASSIVE drop in framerate. I did not test 1080P video before (only smaller videos), as we do not use video to show XIBO, we use it to show webpages from our production system, I tried to run the video direcly in LXDE (Linux desktop) but video lags there also… Tried to run the same video in Rasbian (instead of arch linux) and the video works. but there i am missing libraries to run the Xibo Client… I will do some compiling, and see if i can manage to get my Build enviroment working in raspbian.

I will keep you updated whenever i have any news :slight_smile:

Yeah it’s as we’ve tested in the past. The hardware just isn’t up to running video and something else at the same time. The RPi makes a nice video Player device if that’s all you want it to do, but it just isn’t suitable for a Xibo Player unfortunately.