detached 90f2a23

fix(webkit): enable missing WebKitGTK6 platform features

Enables critical web platform APIs that were missing from WebView initialization:
- MediaSource Extensions (MSE) for video streaming
- Encrypted Media Extensions (EME) for DRM content
- WebRTC for real-time communication
- WebAudio for audio processing
- MediaStream for camera/microphone access
- LocalStorage and IndexedDB for data persistence
- Clipboard API for copy/paste in web apps

Required for modern sites (Twitch, YouTube, Netflix, etc.)
commit
90f2a23bed703d7c4064063ee188ebc077cd4dd8
author
bamen · · 2025-10-08 06:45 UTC
parent
16fcc8d
signature
unsigned
1 file · +32 -0
M pkg/webkit/webview_cgo.go +32 -0
@@ -1296,6 +1296,38 @@ func NewWebView(cfg *Config) (*WebView, error) {
12961296 log.Printf("[webkit] Enabled JavaScript popup windows")
12971297 }
12981298
1299+ // Enable critical web platform features for modern websites (Twitch, YouTube, etc.)
1300+ if settings := C.webkit_web_view_get_settings(v.native.wv); settings != nil {
1301+ // MediaSource Extensions - CRITICAL for video streaming (Twitch, YouTube, Netflix)
1302+ C.webkit_settings_set_enable_mediasource(settings, C.gboolean(1))
1303+
1304+ // Encrypted Media Extensions - for DRM protected content
1305+ C.webkit_settings_set_enable_encrypted_media(settings, C.gboolean(1))
1306+
1307+ // Media Capabilities API - for codec/quality detection
1308+ C.webkit_settings_set_enable_media_capabilities(settings, C.gboolean(1))
1309+
1310+ // WebAudio API - for advanced audio processing
1311+ C.webkit_settings_set_enable_webaudio(settings, C.gboolean(1))
1312+
1313+ // HTML5 LocalStorage - for site data persistence
1314+ C.webkit_settings_set_enable_html5_local_storage(settings, C.gboolean(1))
1315+
1316+ // HTML5 Database/IndexedDB - for offline storage
1317+ C.webkit_settings_set_enable_html5_database(settings, C.gboolean(1))
1318+
1319+ // WebRTC - for real-time communication
1320+ C.webkit_settings_set_enable_webrtc(settings, C.gboolean(1))
1321+
1322+ // Media Stream API - for camera/microphone access
1323+ C.webkit_settings_set_enable_media_stream(settings, C.gboolean(1))
1324+
1325+ // JavaScript Clipboard API - for copy/paste in web apps
1326+ C.webkit_settings_set_javascript_can_access_clipboard(settings, C.gboolean(1))
1327+
1328+ log.Printf("[webkit] Enabled web platform features: MSE, EME, MediaCapabilities, WebAudio, Storage, WebRTC, Clipboard")
1329+ }
1330+
12991331 // Apply custom User-Agent for codec negotiation
13001332 if settings := C.webkit_web_view_get_settings(v.native.wv); settings != nil {
13011333 if cfg.CodecPreferences.CustomUserAgent != "" {
@@ -1296,6 +1296,38 @@ func NewWebView(cfg *Config) (*WebView, error) {
1296 log.Printf("[webkit] Enabled JavaScript popup windows")1296 log.Printf("[webkit] Enabled JavaScript popup windows")
1297 }1297 }
1298 1298
1299+ // Enable critical web platform features for modern websites (Twitch, YouTube, etc.)
1300+ if settings := C.webkit_web_view_get_settings(v.native.wv); settings != nil {
1301+ // MediaSource Extensions - CRITICAL for video streaming (Twitch, YouTube, Netflix)
1302+ C.webkit_settings_set_enable_mediasource(settings, C.gboolean(1))
1303+
1304+ // Encrypted Media Extensions - for DRM protected content
1305+ C.webkit_settings_set_enable_encrypted_media(settings, C.gboolean(1))
1306+
1307+ // Media Capabilities API - for codec/quality detection
1308+ C.webkit_settings_set_enable_media_capabilities(settings, C.gboolean(1))
1309+
1310+ // WebAudio API - for advanced audio processing
1311+ C.webkit_settings_set_enable_webaudio(settings, C.gboolean(1))
1312+
1313+ // HTML5 LocalStorage - for site data persistence
1314+ C.webkit_settings_set_enable_html5_local_storage(settings, C.gboolean(1))
1315+
1316+ // HTML5 Database/IndexedDB - for offline storage
1317+ C.webkit_settings_set_enable_html5_database(settings, C.gboolean(1))
1318+
1319+ // WebRTC - for real-time communication
1320+ C.webkit_settings_set_enable_webrtc(settings, C.gboolean(1))
1321+
1322+ // Media Stream API - for camera/microphone access
1323+ C.webkit_settings_set_enable_media_stream(settings, C.gboolean(1))
1324+
1325+ // JavaScript Clipboard API - for copy/paste in web apps
1326+ C.webkit_settings_set_javascript_can_access_clipboard(settings, C.gboolean(1))
1327+
1328+ log.Printf("[webkit] Enabled web platform features: MSE, EME, MediaCapabilities, WebAudio, Storage, WebRTC, Clipboard")
1329+ }
1330+
1299 // Apply custom User-Agent for codec negotiation1331 // Apply custom User-Agent for codec negotiation
1300 if settings := C.webkit_web_view_get_settings(v.native.wv); settings != nil {1332 if settings := C.webkit_web_view_get_settings(v.native.wv); settings != nil {
1301 if cfg.CodecPreferences.CustomUserAgent != "" {1333 if cfg.CodecPreferences.CustomUserAgent != "" {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close