New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Chromium Embedded Framework #372

Closed
fenryxo opened this Issue Sep 8, 2017 · 20 comments

Comments

Projects
3 participants
@fenryxo
Member

fenryxo commented Sep 8, 2017

Primary Targets

  • Spotify - it doesn't work with WebKit at all. Requires Widevine. #374
  • Google Play Music - Flash-free playback doesn't work in WebKit. #91
  • Deezer - Flash-free playback doesn't work in WebKit. tiliado/nuvola-app-deezer#12
  • BBC iPlayer - Requires MSE. Might work better with Chromium. tiliado/nuvola-app-bbc-iplayer#8
  • Microsoft Groove - Requires MSE. Might work better with Chromium. Discontinued? tiliado/nuvola-app-groove#8

Unresolved Issues

  • Background playback: Nuvola quits when the window is closed. Fixed in Nuvola 4.9.50.
  • Proxy settings: It is grabbed from the system and cannot be changed yet.
  • Clipboard: CEF cannot paste text from the system clipboard unless external message pump is disabled, but CPU usage is higher then tiliado/valacef#2
  • Missing support for web_app.allow_insecure_content - it is used by only a single script.
  • Password manager does not work and may crash.#418
  • Request filtering is not implemented.
  • Scripts depending on deprecated synchronous API calls need to be ported:
    • Amazon Cloud Player: Nuvola._keyValueStorageSetDefaultValue
  • Poor performance with NVidia GTX 1070 (driver 387.34) - see tiliado/valacef#1

Testing

  • Users with Nuvola Premium/Patron account have been invited.
  • Users with Nuvola Basic account will be invited later.
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Nov 19, 2017

Member

CEF is not compatible with GTK+ 3.22: cztomczak/cefcapi#9

Member

fenryxo commented Nov 19, 2017

CEF is not compatible with GTK+ 3.22: cztomczak/cefcapi#9

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Nov 19, 2017

Member

Neither compatible: 3.20.9-1ubuntu2.1 (Ubuntu 16.10), 3.18.9-1ubuntu3.3 (Ubuntu 16.04).

Member

fenryxo commented Nov 19, 2017

Neither compatible: 3.20.9-1ubuntu2.1 (Ubuntu 16.10), 3.18.9-1ubuntu3.3 (Ubuntu 16.04).

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Dec 1, 2017

Member
  • Neither compatible: 3.16.7 (Ubuntu 15:10)
  • Compatible: 3.14.13 (Ubuntu 15.04)
Member

fenryxo commented Dec 1, 2017

  • Neither compatible: 3.16.7 (Ubuntu 15:10)
  • Compatible: 3.14.13 (Ubuntu 15.04)
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Dec 3, 2017

Member
  • Neither compatible: 3.16.7, 3.16.0, 3.15.5, 3.15.2
  • Compatible: 3.15.1, 3.15.0, 3.14.14
  • Need to go through commits between 3.15.1 and 3.15.2
Member

fenryxo commented Dec 3, 2017

  • Neither compatible: 3.16.7, 3.16.0, 3.15.5, 3.15.2
  • Compatible: 3.15.1, 3.15.0, 3.14.14
  • Need to go through commits between 3.15.1 and 3.15.2
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Dec 3, 2017

Member

The first failing commit between 3.15.1 and 3.15.2 is GNOME/gtk@dae4477

Member

fenryxo commented Dec 3, 2017

The first failing commit between 3.15.1 and 3.15.2 is GNOME/gtk@dae4477

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Dec 5, 2017

Member

This works:

GtkWidget* create_gtk_window(char* title, int width, int height) {
    printf("create_gtk_window\n");
    // Create window.
    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    ...
    // GTK+ > 3.15.1 uses an X11 visual optimized for GTK+'s OpenGL stuff
    // since revid dae447728d: https://github.com/GNOME/gtk/commit/dae447728d
    // However, it breaks CEF: https://github.com/cztomczak/cefcapi/issues/9
    // Let's use the default X11 visual instead the GTK's blessed one.
    GdkScreen* screen = gdk_screen_get_default();
    GList* visuals = gdk_screen_list_visuals(screen);
    printf("n visuals: %u\n", g_list_length(visuals));
    GdkX11Screen* x11_screen = GDK_X11_SCREEN(screen);
    g_assert(x11_screen != NULL);
    Visual* default_xvisual = DefaultVisual(GDK_SCREEN_XDISPLAY(x11_screen),
        GDK_SCREEN_XNUMBER(x11_screen));
    GdkVisual* default_visual = NULL;
    int i = 0;
    while (visuals != NULL) {
	GdkVisual* visual = GDK_X11_VISUAL (visuals->data);
        if (default_xvisual->visualid == gdk_x11_visual_get_xvisual(
           GDK_X11_VISUAL (visuals->data))->visualid) {
           printf("Default visual %d\n", i);
           default_visual = visual;
        }
        i++;
        visuals = visuals->next;
    }
    gtk_widget_set_visual(GTK_WIDGET(window), default_visual);
    gtk_widget_show_all(window);
    return vbox;
}
Member

fenryxo commented Dec 5, 2017

This works:

GtkWidget* create_gtk_window(char* title, int width, int height) {
    printf("create_gtk_window\n");
    // Create window.
    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    ...
    // GTK+ > 3.15.1 uses an X11 visual optimized for GTK+'s OpenGL stuff
    // since revid dae447728d: https://github.com/GNOME/gtk/commit/dae447728d
    // However, it breaks CEF: https://github.com/cztomczak/cefcapi/issues/9
    // Let's use the default X11 visual instead the GTK's blessed one.
    GdkScreen* screen = gdk_screen_get_default();
    GList* visuals = gdk_screen_list_visuals(screen);
    printf("n visuals: %u\n", g_list_length(visuals));
    GdkX11Screen* x11_screen = GDK_X11_SCREEN(screen);
    g_assert(x11_screen != NULL);
    Visual* default_xvisual = DefaultVisual(GDK_SCREEN_XDISPLAY(x11_screen),
        GDK_SCREEN_XNUMBER(x11_screen));
    GdkVisual* default_visual = NULL;
    int i = 0;
    while (visuals != NULL) {
	GdkVisual* visual = GDK_X11_VISUAL (visuals->data);
        if (default_xvisual->visualid == gdk_x11_visual_get_xvisual(
           GDK_X11_VISUAL (visuals->data))->visualid) {
           printf("Default visual %d\n", i);
           default_visual = visual;
        }
        i++;
        visuals = visuals->next;
    }
    gtk_widget_set_visual(GTK_WIDGET(window), default_visual);
    gtk_widget_show_all(window);
    return vbox;
}
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Dec 10, 2017

Member

Vala + GTK+ 3 bindings of CEF for Nuvola:
cefium

Widevine DRM works (Spotify):
cef_spotify

Member

fenryxo commented Dec 10, 2017

Vala + GTK+ 3 bindings of CEF for Nuvola:
cefium

Widevine DRM works (Spotify):
cef_spotify

fenryxo added a commit that referenced this issue Dec 19, 2017

Add --cef option to link with CEF
https://github.com/tiliado/valacef

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 20, 2017

Add skeleton of CefEngine
Set environment variable NUVOLA_USE_CEF=true to enable it.

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 20, 2017

Add skeleton of CefEngine
Set environment variable NUVOLA_USE_CEF=true to enable it.

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Load actual home url but without integration
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

Add CefRendererExtension
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Integrate zoom level
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: integrate is-loading, can-go-back/forward
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Restore last uri
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: add no-op apply_network_proxy call
Not to forget.

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Mark web_app.allow_insecure_content as not implemented
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Render extension receives browser_id
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Integrate load_started signal
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Remember initial browser_id
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: inject integration scripts
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Populate Nuvola.meta
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 23, 2017

cef: Add JS funcs for IPC methods
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit to tiliado/nuvola-app-spotify that referenced this issue Dec 26, 2017

Integrate new Spotify player
- Issue: tiliado/nuvolaruntime#374
- Issue: tiliado/nuvolaruntime#372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit to tiliado/nuvola-app-spotify that referenced this issue Dec 26, 2017

Require Chromium 63 & Widevine
- Issue: tiliado/nuvolaruntime#374
- Issue: tiliado/nuvolaruntime#372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 26, 2017

cef: Support Nuvola.log API
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 26, 2017

cef: Support Nuvola.warn API
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 26, 2017

cef: Support album art download
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 26, 2017

cef: Add flash & widevine checks
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 26, 2017

cef: Add build option --cef-default
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 30, 2017

cef: Use autoloading of renderer extensions
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Dec 30, 2017

cef: Don't use line breaks before script
To preserve script line number

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo
Member

fenryxo commented Dec 31, 2017

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Jan 3, 2018

Member

New issue: Poor performance with NVidia GTX 1070 (driver 387.34) - see tiliado/valacef#1

Member

fenryxo commented Jan 3, 2018

New issue: Poor performance with NVidia GTX 1070 (driver 387.34) - see tiliado/valacef#1

@bartlibert

This comment has been minimized.

Show comment
Hide comment
@bartlibert

bartlibert Jan 4, 2018

From my initial tests with Google Play Music (with a subscriptions), it seems at least as fast and smooth as the WebKit version on my system (if not smoother) and playing music works as expected. Developer toolbar also does wat is has to.

However, I noticed one big problem: any action in the "overflow menu" (3 dots) does not work, but only if it is called from that menu.

So for example, when pressing "Shuffle" as seen in the screenshot below, it works...
screenshot from 2018-01-04 08-06-06
... but when clicked here it does not (neither do any of the other options).
screenshot from 2018-01-04 08-06-38

Same thing for example in the "recent activity" screen (screenshots are in Dutch, but I hope it's clear enough): The "play" button works, but the overflow actions don't.
screenshot from 2018-01-04 08-07-11
screenshot from 2018-01-04 08-07-23

In proper Chromium and in the WebKit version these actions work. I have not seens any logs in the terminal, nor in the developer tools console.

bartlibert commented Jan 4, 2018

From my initial tests with Google Play Music (with a subscriptions), it seems at least as fast and smooth as the WebKit version on my system (if not smoother) and playing music works as expected. Developer toolbar also does wat is has to.

However, I noticed one big problem: any action in the "overflow menu" (3 dots) does not work, but only if it is called from that menu.

So for example, when pressing "Shuffle" as seen in the screenshot below, it works...
screenshot from 2018-01-04 08-06-06
... but when clicked here it does not (neither do any of the other options).
screenshot from 2018-01-04 08-06-38

Same thing for example in the "recent activity" screen (screenshots are in Dutch, but I hope it's clear enough): The "play" button works, but the overflow actions don't.
screenshot from 2018-01-04 08-07-11
screenshot from 2018-01-04 08-07-23

In proper Chromium and in the WebKit version these actions work. I have not seens any logs in the terminal, nor in the developer tools console.

fenryxo added a commit that referenced this issue Jan 6, 2018

Start-up check selects suitable engine
- It is the first one that satisfies requirements
- Default engine is WebKitGTK+ unless --cef-default build flag is used.
- Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Jan 6, 2018

CEF backend is built by default (unless --no-cef)
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Jan 6, 2018

Member

Thanks @bartlibert. I cannot reproduce the issue on my machine. It might disappear after I solve tiliado/valacef#1. Can you reproduce the issue also with Cefium demo browser?

flatpak run --command=Cefium eu.tiliado.NuvolaAppGooglePlayMusic//master --url="https://play.google.com/music/" --disable-flash
Member

fenryxo commented Jan 6, 2018

Thanks @bartlibert. I cannot reproduce the issue on my machine. It might disappear after I solve tiliado/valacef#1. Can you reproduce the issue also with Cefium demo browser?

flatpak run --command=Cefium eu.tiliado.NuvolaAppGooglePlayMusic//master --url="https://play.google.com/music/" --disable-flash

fenryxo added a commit that referenced this issue Jan 6, 2018

AppRunner: Add replaceable main loop
This allows CefEngine to use CEF main loop to achieve high performance.

Issue: tiliado/valacef#1
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@bartlibert

This comment has been minimized.

Show comment
Hide comment
@bartlibert

bartlibert Jan 8, 2018

Hi, I tried testing it with Cefium and got:

[0108/125313.206216:WARNING:browser_main_loop.cc(297)] GLib-GObject: invalid cast from 'GdkWaylandVisual' to 'GdkX11Visual'

Soo... this pointed me to try everything in X11 instead of Wayland and guess what: there it works.
So the issue is most likely related to running under Wayland.

bartlibert commented Jan 8, 2018

Hi, I tried testing it with Cefium and got:

[0108/125313.206216:WARNING:browser_main_loop.cc(297)] GLib-GObject: invalid cast from 'GdkWaylandVisual' to 'GdkX11Visual'

Soo... this pointed me to try everything in X11 instead of Wayland and guess what: there it works.
So the issue is most likely related to running under Wayland.

@fenryxo fenryxo referenced this issue Jan 10, 2018

Closed

RIP Groove #8

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Jan 16, 2018

Member

Thanks, @bartlibert. Could you test again under Wayland with Cefium which comes with Nuvola 4.9.93?

Member

fenryxo commented Jan 16, 2018

Thanks, @bartlibert. Could you test again under Wayland with Cefium which comes with Nuvola 4.9.93?

@bartlibert

This comment has been minimized.

Show comment
Hide comment
@bartlibert

bartlibert Jan 17, 2018

I don't get the "invalid cast" error anymore and get into google music, but the popup menus are still not working. (No errors in terminal nor web console)

bartlibert commented Jan 17, 2018

I don't get the "invalid cast" error anymore and get into google music, but the popup menus are still not working. (No errors in terminal nor web console)

@TrevorScheitrum

This comment has been minimized.

Show comment
Hide comment
@TrevorScheitrum

TrevorScheitrum Feb 26, 2018

I don't know if this is where I should post this, or if I should create a new issue (clicking report bug took me here instead of the general 'issues' page) But here's my bug report:

OS - Linux Mint 18.3
Hardware - Dell Latitude E5470
Video Hardware - Intel Skylake Integrated Graphics
Nuvola Apps Installed version - 4.9.149
Nuvola Spotify App Installed version - 2.4
Nuvola web engine installed version - Experimental Chromium 63.0.3239.109 web engine through the flatpak repo
Problem - Launching Spotify through the Chrome-ported Nuvola flatpak crashes randomly during playback or just leaving the window open. Not sure how to collect more details but just wanted to report it in case it hasn't already.

Not sure if this matters but I also have the official spotify app installed through their flatpak as well, 'flatpak list' returns:
Ref Options
com.spotify.Client/x86_64/stable system,current
eu.tiliado.Nuvola/x86_64/master system
eu.tiliado.Nuvola/x86_64/stable system,current
eu.tiliado.NuvolaAppSpotify/x86_64/master system,current
eu.tiliado.NuvolaAppSpotify/x86_64/stable system
io.github.Pithos/x86_64/stable system,current
org.musicbrainz.Picard/x86_64/stable system,current
org.freedesktop.Platform.VAAPI.Intel/x86_64/1.6 system,runtime
org.freedesktop.Platform.ffmpeg/x86_64/1.6 system,runtime
org.freedesktop.Platform/x86_64/1.6 system,runtime
org.gnome.Platform/x86_64/3.24 system,runtime
org.gnome.Platform/x86_64/3.26 system,runtime

TrevorScheitrum commented Feb 26, 2018

I don't know if this is where I should post this, or if I should create a new issue (clicking report bug took me here instead of the general 'issues' page) But here's my bug report:

OS - Linux Mint 18.3
Hardware - Dell Latitude E5470
Video Hardware - Intel Skylake Integrated Graphics
Nuvola Apps Installed version - 4.9.149
Nuvola Spotify App Installed version - 2.4
Nuvola web engine installed version - Experimental Chromium 63.0.3239.109 web engine through the flatpak repo
Problem - Launching Spotify through the Chrome-ported Nuvola flatpak crashes randomly during playback or just leaving the window open. Not sure how to collect more details but just wanted to report it in case it hasn't already.

Not sure if this matters but I also have the official spotify app installed through their flatpak as well, 'flatpak list' returns:
Ref Options
com.spotify.Client/x86_64/stable system,current
eu.tiliado.Nuvola/x86_64/master system
eu.tiliado.Nuvola/x86_64/stable system,current
eu.tiliado.NuvolaAppSpotify/x86_64/master system,current
eu.tiliado.NuvolaAppSpotify/x86_64/stable system
io.github.Pithos/x86_64/stable system,current
org.musicbrainz.Picard/x86_64/stable system,current
org.freedesktop.Platform.VAAPI.Intel/x86_64/1.6 system,runtime
org.freedesktop.Platform.ffmpeg/x86_64/1.6 system,runtime
org.freedesktop.Platform/x86_64/1.6 system,runtime
org.gnome.Platform/x86_64/3.24 system,runtime
org.gnome.Platform/x86_64/3.26 system,runtime

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Feb 27, 2018

Member

Hello @TrevorScheitrum. Thanks for reporting your issue. Could you create a new ticket for that with debug logs from Nuvola 4.9.163?

Member

fenryxo commented Feb 27, 2018

Hello @TrevorScheitrum. Thanks for reporting your issue. Could you create a new ticket for that with debug logs from Nuvola 4.9.163?

@TrevorScheitrum

This comment has been minimized.

Show comment
Hide comment
@TrevorScheitrum

TrevorScheitrum Feb 28, 2018

Since posting this report it hasn't crashed, so i'm wondering if my system was low on ram or something. If it starts crashing again I'll try to grab debug logs and open a new issue ticket.

TrevorScheitrum commented Feb 28, 2018

Since posting this report it hasn't crashed, so i'm wondering if my system was low on ram or something. If it starts crashing again I'll try to grab debug logs and open a new issue ticket.

@fenryxo fenryxo referenced this issue Mar 11, 2018

Open

Let's get rid of Flash [Due: 09/2018] #33

0 of 2 tasks complete
@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo Apr 7, 2018

Member

Recently ported:

Overral progress:

Member

fenryxo commented Apr 7, 2018

Recently ported:

Overral progress:

@fenryxo

This comment has been minimized.

Show comment
Hide comment
@fenryxo

fenryxo May 9, 2018

Member

Closing in favor of #424.

Member

fenryxo commented May 9, 2018

Closing in favor of #424.

@fenryxo fenryxo closed this May 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment