Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions apps/chromium/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG BASE_IMAGE=ghcr.io/m1k1o/neko/base:latest
FROM $BASE_IMAGE

COPY ./widevinecdm.sh /widevine.sh

#
# install neko chromium
RUN set -eux; \
Expand All @@ -12,19 +14,10 @@ RUN set -eux; \
CHROMIUM_DIR="/usr/lib/chromium"; \
ARCH=$(dpkg --print-architecture); \
if [ "${ARCH}" = "amd64" ]; then \
# https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/chromeos-lacros-arm64-squash-zstd-120.0.6098.0
apt-get install -y --no-install-recommends unzip; \
WIDEVINE_ARCH="x64"; \
WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | sort --version-sort | tail -n 1); \
wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip"; \
mkdir -p "${CHROMIUM_DIR}/WidevineCdm/_platform_specific/linux_${WIDEVINE_ARCH}"; \
unzip -p /tmp/widevine.zip LICENSE.txt > "${CHROMIUM_DIR}/WidevineCdm/LICENSE"; \
unzip -p /tmp/widevine.zip manifest.json > "${CHROMIUM_DIR}/WidevineCdm/manifest.json"; \
unzip -p /tmp/widevine.zip libwidevinecdm.so > "${CHROMIUM_DIR}/WidevineCdm/_platform_specific/linux_${WIDEVINE_ARCH}/libwidevinecdm.so"; \
find "${CHROMIUM_DIR}/WidevineCdm" -type d -exec chmod 0755 '{}' \;; \
find "${CHROMIUM_DIR}/WidevineCdm" -type f -exec chmod 0644 '{}' \;; \
rm /tmp/widevine.zip; \
apt-get --purge autoremove -y unzip; \
apt-get install -y --no-install-recommends xz-utils; \
./widevine.sh "${CHROMIUM_DIR}/WidevineCdm"; \
rm -f /widevine.sh; \
apt-get --purge autoremove -y xz-utils; \
else \
echo "Widevine is not supported on ${ARCH}"; \
fi; \
Expand Down
17 changes: 6 additions & 11 deletions apps/chromium/Dockerfile.nvidia
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG BASE_IMAGE=ghcr.io/m1k1o/neko/nvidia-base:latest
FROM $BASE_IMAGE

COPY ./widevinecdm.sh /widevine.sh

#
# install neko chromium
RUN set -eux; \
Expand All @@ -10,22 +12,15 @@ RUN set -eux; \
# and nvidia base is ubuntu not debian
add-apt-repository ppa:system76/pop; \
apt-get update; \
apt-get install -y --no-install-recommends unzip chromium openbox; \
apt-get install -y --no-install-recommends xz-utils chromium openbox; \
#
# install widevine module
CHROMIUM_DIR="/usr/lib/chromium"; \
WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | sort --version-sort | tail -n 1); \
wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-x64.zip"; \
mkdir -p "${CHROMIUM_DIR}/WidevineCdm/_platform_specific/linux_x64"; \
unzip -p /tmp/widevine.zip LICENSE.txt > "${CHROMIUM_DIR}/WidevineCdm/LICENSE"; \
unzip -p /tmp/widevine.zip manifest.json > "${CHROMIUM_DIR}/WidevineCdm/manifest.json"; \
unzip -p /tmp/widevine.zip libwidevinecdm.so > "${CHROMIUM_DIR}/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"; \
find "${CHROMIUM_DIR}/WidevineCdm" -type d -exec chmod 0755 '{}' \;; \
find "${CHROMIUM_DIR}/WidevineCdm" -type f -exec chmod 0644 '{}' \;; \
rm /tmp/widevine.zip; \
./widevine.sh "${CHROMIUM_DIR}/WidevineCdm"; \
rm -f /widevine.sh; \
#
# clean up
apt-get --purge autoremove -y unzip; \
apt-get --purge autoremove -y xz-utils; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*

Expand Down
44 changes: 44 additions & 0 deletions apps/chromium/widevinecdm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -e

TARGET_DIR="$(realpath "$1")"
if [ -z "$TARGET_DIR" ]; then
echo "Usage: $0 /path/to/install/WidevineCdm"
exit 1
fi

TMPDIR=$(mktemp -d)
cd "$TMPDIR"

function cleanup {
rm -rf "$TMPDIR"
}
trap cleanup EXIT

# Fetch manifest and extract URL
URL=$(python3 -c "
import json, urllib.request
data = json.load(urllib.request.urlopen('https://raw.githubusercontent.com/mozilla/gecko-dev/master/toolkit/content/gmp-sources/widevinecdm.json'))
for v in data['vendors'].values():
for k, p in v['platforms'].items():
if 'Linux_x86_64-gcc3' in k:
print(p['fileUrl'])
break
")

# Download CRX
curl -L -o widevinecdm.crx "$URL"

# Install go-crx3
echo "Fetching latest go-crx3 version..."
VERSION=$(curl -s https://api.github.com/repos/m1k1o/go-crx3/releases/latest | grep 'tag_name' | cut -d '"' -f4)
ARTIFACT="go-crx3_${VERSION#v}_linux_amd64.tar.gz"
URL="https://github.com/m1k1o/go-crx3/releases/download/${VERSION}/${ARTIFACT}"
echo "Downloading $URL"
curl -L -o "$ARTIFACT" "$URL"
tar -xzf "$ARTIFACT"

# Unpack with go-crx3
./go-crx3 unpack widevinecdm.crx
mkdir -p "$TARGET_DIR"
cp -ar widevinecdm/* "$TARGET_DIR"
10 changes: 5 additions & 5 deletions apps/ungoogled-chromium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FROM $BASE_IMAGE

ARG API_URL="https://api.github.com/repos/macchrome/linchrome/releases/latest"

COPY ./widevinecdm.sh /widevine.sh

#
# install custom chromium build from woolyss with support for hevc/x265
SHELL ["/bin/bash", "-c"]
Expand All @@ -21,11 +23,9 @@ RUN set -eux; apt-get update; \
chmod 4755 /usr/lib/chromium/chrome-sandbox; \
#
# install widevine module
WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | sort --version-sort | tail -n 1); \
wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-x64.zip"; \
unzip -p /tmp/widevine.zip libwidevinecdm.so > /usr/lib/chromium/libwidevinecdm.so; \
chmod 644 /usr/lib/chromium/libwidevinecdm.so; \
rm /tmp/widevine.zip; \
CHROMIUM_DIR="/usr/lib/chromium"; \
./widevine.sh "${CHROMIUM_DIR}/WidevineCdm"; \
rm -f /widevine.sh; \
#
# install latest version of uBlock Origin and SponsorBlock for YouTube
CHROMIUM_VERSION="$(wget -O - "${API_URL}" 2>/dev/null | jq -r ".tag_name" | sed -e 's/v//' -e 's/-.*//')"; \
Expand Down
4 changes: 2 additions & 2 deletions apps/ungoogled-chromium/preferences.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"homepage": "http://www.google.com",
"homepage": "https://duckduckgo.com/",
"homepage_is_newtabpage": false,
"first_run_tabs": [
"https://www.google.com/_/chrome/newtab?ie=UTF-8"
"https://duckduckgo.com/"
],
"custom_links": {
"initialized": true,
Expand Down
44 changes: 44 additions & 0 deletions apps/ungoogled-chromium/widevinecdm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -e

TARGET_DIR="$(realpath "$1")"
if [ -z "$TARGET_DIR" ]; then
echo "Usage: $0 /path/to/install/WidevineCdm"
exit 1
fi

TMPDIR=$(mktemp -d)
cd "$TMPDIR"

function cleanup {
rm -rf "$TMPDIR"
}
trap cleanup EXIT

# Fetch manifest and extract URL
URL=$(python3 -c "
import json, urllib.request
data = json.load(urllib.request.urlopen('https://raw.githubusercontent.com/mozilla/gecko-dev/master/toolkit/content/gmp-sources/widevinecdm.json'))
for v in data['vendors'].values():
for k, p in v['platforms'].items():
if 'Linux_x86_64-gcc3' in k:
print(p['fileUrl'])
break
")

# Download CRX
curl -L -o widevinecdm.crx "$URL"

# Install go-crx3
echo "Fetching latest go-crx3 version..."
VERSION=$(curl -s https://api.github.com/repos/m1k1o/go-crx3/releases/latest | grep 'tag_name' | cut -d '"' -f4)
ARTIFACT="go-crx3_${VERSION#v}_linux_amd64.tar.gz"
URL="https://github.com/m1k1o/go-crx3/releases/download/${VERSION}/${ARTIFACT}"
echo "Downloading $URL"
curl -L -o "$ARTIFACT" "$URL"
tar -xzf "$ARTIFACT"

# Unpack with go-crx3
./go-crx3 unpack widevinecdm.crx
mkdir -p "$TARGET_DIR"
cp -ar widevinecdm/* "$TARGET_DIR"
11 changes: 11 additions & 0 deletions client/src/components/video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
@touchmove.stop.prevent="onTouchHandler"
@touchstart.stop.prevent="onTouchHandler"
@touchend.stop.prevent="onTouchHandler"
@compositionstart="onCompositionStartHandler"
@compositionend="onCompositionEndHandler"
/>
<div v-if="!playing && playable" class="player-overlay" @click.stop.prevent="playAndUnmute">
<i class="fas fa-play-circle" />
Expand Down Expand Up @@ -250,6 +252,7 @@
private focused = false
private fullscreen = false
private mutedOverlay = true
private lastTextAreaValue = ''

get admin() {
return this.$accessor.user.admin
Expand Down Expand Up @@ -756,6 +759,14 @@
first.target.dispatchEvent(simulatedEvent)
}

onCompositionStartHandler() {
this.lastTextAreaValue = this._overlay.value
}

onCompositionEndHandler() {
this._overlay.value = this.lastTextAreaValue
}

isMouseDown = false

onMouseDown(e: MouseEvent) {
Expand Down
2 changes: 2 additions & 0 deletions client/src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as cn from './zh-cn'
import * as tw from './zh-tw'
import * as ja from './ja-jp'
import * as id from './id-id'
import * as pl from './pl-pl'

export const messages = {
en,
Expand All @@ -28,4 +29,5 @@ export const messages = {
tw,
ja,
id,
pl,
}
127 changes: 127 additions & 0 deletions client/src/locale/pl-pl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
export const logout = 'Wyloguj się'
export const unsupported = 'Ta przeglądarka nie obsługuje WebRTC'
export const admin_loggedin = 'Jesteś zalogowany jako administrator'
export const you = 'Ty'
export const somebody = 'Ktoś'
export const send_a_message = 'Wyślij wiadomość'

export const side = {
chat: 'Czat',
files: 'Pliki',
settings: 'Ustawienia',
}

export const connect = {
login_title: 'Zaloguj się',
invitation_title: 'Otrzymałeś zaproszenie do tego pokoju',
displayname: 'Podaj swoją nazwę',
password: 'Hasło',
connect: 'Połącz',
error: 'Błąd logowania',
empty_displayname: 'Pole nazwy użytkownika nie może być puste.',
}

export const context = {
ignore: 'Ignoruj',
unignore: 'Przestań ignorować',
mute: 'Wycisz',
unmute: 'Cofnij wyciszenie',
release: 'Wymuś zwolnienie sterowania',
take: 'Wymuś przejęcie sterowania',
give: 'Przekaż sterowanie',
kick: 'Wyrzuć',
ban: 'Zbanuj IP',
confirm: {
kick_title: 'Wyrzucić {name}?',
kick_text: 'Czy na pewno chcesz wyrzucić {name}?',
ban_title: 'Zbanować {name}?',
ban_text: 'Czy chcesz zbanować {name}? Aby cofnąć, musisz zrestartować serwer.',
mute_title: 'Wyciszyć {name}?',
mute_text: 'Czy na pewno chcesz wyciszyć {name}?',
unmute_title: 'Cofnąć wyciszenie {name}?',
unmute_text: 'Czy chcesz cofnąć wyciszenie {name}?',
button_yes: 'Tak',
button_cancel: 'Anuluj',
},
}

export const controls = {
release: 'Zwolnij sterowanie',
request: 'Poproś o sterowanie',
lock: 'Zablokuj sterowanie',
unlock: 'Odblokuj sterowanie',
has: 'Masz sterowanie',
hasnot: 'Nie masz sterowania',
}

export const locks = {
control: {
lock: 'Zablokuj sterowanie (dla użytkowników)',
unlock: 'Odblokuj sterowanie (dla użytkowników)',
locked: 'Sterowanie zablokowane (dla użytkowników)',
unlocked: 'Sterowanie odblokowane (dla użytkowników)',
notif_locked: 'zablokował sterowanie dla użytkowników',
notif_unlocked: 'odblokował sterowanie dla użytkowników',
},
login: {
lock: 'Zablokuj pokój (dla użytkowników)',
unlock: 'Odblokuj pokój (dla użytkowników)',
locked: 'Pokój zablokowany (dla użytkowników)',
unlocked: 'Pokój odblokowany (dla użytkowników)',
notif_locked: 'zablokował pokój',
notif_unlocked: 'odblokował pokój',
},
file_transfer: {
lock: 'Zablokuj transfer plików (dla użytkowników)',
unlock: 'Odblokuj transfer plików (dla użytkowników)',
locked: 'Transfer plików zablokowany (dla użytkowników)',
unlocked: 'Transfer plików odblokowany (dla użytkowników)',
notif_locked: 'zablokował transfer plików',
notif_unlocked: 'odblokował transfer plików',
},
}

export const setting = {
scroll: 'Czułość przewijania',
scroll_invert: 'Odwróć przewijanie',
autoplay: 'Autoodtwarzanie wideo',
ignore_emotes: 'Ignoruj emotki',
chat_sound: 'Odtwarzaj dźwięk czatu',
keyboard_layout: 'Układ klawiatury',
broadcast_title: 'Transmisja na żywo',
}

export const connection = {
logged_out: 'Zostałeś wylogowany.',
reconnecting: 'Ponowne łączenie...',
connected: 'Połączono',
disconnected: 'Rozłączono',
kicked: 'Zostałeś usunięty z pokoju.',
button_confirm: 'OK',
}

export const notifications = {
connected: '{name} dołączył',
disconnected: '{name} opuścił',
controls_taken: '{name} przejął sterowanie',
controls_taken_force: 'przejął sterowanie siłą',
controls_taken_steal: 'przejął sterowanie od {name}',
controls_released: '{name} zwolnił sterowanie',
controls_released_force: 'zwolnił sterowanie siłą',
controls_released_steal: 'zwolnił sterowanie od {name}',
controls_given: 'przekazał sterowanie {name}',
controls_has: '{name} ma sterowanie',
controls_has_alt: 'Ale poinformowałem osobę, że chciałeś je otrzymać',
controls_requesting: '{name} prosi o sterowanie',
resolution: 'zmienił rozdzielczość na {width}x{height}@{rate}',
banned: 'zbanował {name}',
kicked: 'wyrzucił {name}',
muted: 'wyciszył {name}',
unmuted: 'cofnął wyciszenie {name}',
}

export const files = {
downloads: 'Pobrane pliki',
uploads: 'Wysyłane pliki',
upload_here: 'Kliknij lub przeciągnij pliki tutaj, aby przesłać',
}
Loading