aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-06 23:18:38 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-06 23:18:38 +0200
commit0572bbde72514a9584b19fe031a03d4c9b23d74c (patch)
tree389ea23aa646ffe7da56dd6e3fa30c9405fa0fd2 /packages
parent92b7afcb186d7aaf475939d58a0385f408425eeb (diff)
downloadmeshbay-0572bbde72514a9584b19fe031a03d4c9b23d74c.tar.gz
fix(hub): play video on iPhone through ManagedMediaSource
An iPhone has no MediaSource; every film was refused as an unsupported codec. A browser with neither now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/de.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/en.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/es.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/it.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js1
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/video-player.js16
11 files changed, 24 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
index 6e42af9..f4151f7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
@@ -283,6 +283,7 @@ export default {
'group.upload_indexing': 'wird indiziert …',
'video.err_transport': 'Transport nicht verbunden',
'video.err_mse': 'Codec wird für das Streaming nicht unterstützt: {codec}',
+ 'video.err_no_mse': 'Dieser Browser kann keine Videos streamen (auf dem iPhone ist iOS 17.1 oder neuer nötig)',
'video.mode_poster': 'Poster',
'video.mode_flat': 'Flache Liste',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
index f94b438..84607e7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
@@ -281,6 +281,7 @@ export default {
'group.upload_indexing': 'indexing…',
'video.err_transport': 'Transport not connected',
'video.err_mse': 'Codec not supported for streaming: {codec}',
+ 'video.err_no_mse': 'This browser cannot stream video (an iPhone needs iOS 17.1 or later)',
'video.mode_poster': 'Posters',
'video.mode_flat': 'Flat list',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
index 6ff8be2..28ad85e 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
@@ -281,6 +281,7 @@ export default {
'group.upload_indexing': 'indexando…',
'video.err_transport': 'Transporte no conectado',
'video.err_mse': 'Códec no compatible con la reproducción en continuo: {codec}',
+ 'video.err_no_mse': 'Este navegador no puede reproducir vídeo en continuo (un iPhone necesita iOS 17.1 o posterior)',
'video.mode_poster': 'Pósteres',
'video.mode_flat': 'Lista plana',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
index 9132bd2..9e8dbbe 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
@@ -282,6 +282,7 @@ export default {
'group.upload_indexing': 'indexation…',
'video.err_transport': 'Transport non connecté',
'video.err_mse': 'Codec non pris en charge pour la diffusion : {codec}',
+ 'video.err_no_mse': 'Ce navigateur ne sait pas diffuser de vidéo (un iPhone doit être en iOS 17.1 ou plus récent)',
'video.mode_poster': 'Affiches',
'video.mode_flat': 'Liste à plat',
'video.filter_all': 'Tous',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
index f3ff714..493455d 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
@@ -282,6 +282,7 @@ export default {
'group.upload_indexing': 'indicizzazione…',
'video.err_transport': 'Trasporto non connesso',
'video.err_mse': 'Codec non supportato per lo streaming: {codec}',
+ 'video.err_no_mse': 'Questo browser non può riprodurre video in streaming (un iPhone richiede iOS 17.1 o successivo)',
'video.mode_poster': 'Locandine',
'video.mode_flat': 'Elenco semplice',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
index 0690034..35a639a 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
@@ -279,6 +279,7 @@ export default {
'group.upload_indexing': 'インデックスを作成中…',
'video.err_transport': 'トランスポートが接続されていません',
'video.err_mse': 'ストリーミング再生に対応していないコーデックです:{codec}',
+ 'video.err_no_mse': 'このブラウザーは動画のストリーミング再生に対応していません(iPhone では iOS 17.1 以降が必要です)',
'video.mode_poster': 'ポスター表示',
'video.mode_flat': 'フラット表示',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
index ce6312c..73731cf 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
@@ -283,6 +283,7 @@ export default {
'group.upload_indexing': 'indexeren…',
'video.err_transport': 'Transport niet verbonden',
'video.err_mse': 'Codec wordt niet ondersteund voor streamen: {codec}',
+ 'video.err_no_mse': 'Deze browser kan geen video streamen (een iPhone heeft iOS 17.1 of nieuwer nodig)',
'video.mode_poster': 'Posters',
'video.mode_flat': 'Platte lijst',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
index 2737532..849c632 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
@@ -288,6 +288,7 @@ export default {
'group.upload_indexing': 'indeksowanie…',
'video.err_transport': 'Transport nie jest połączony',
'video.err_mse': 'Kodek nieobsługiwany przy odtwarzaniu strumieniowym: {codec}',
+ 'video.err_no_mse': 'Ta przeglądarka nie obsługuje strumieniowania wideo (iPhone wymaga iOS 17.1 lub nowszego)',
'video.mode_poster': 'Plakaty',
'video.mode_flat': 'Lista płaska',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
index c7cdf01..5672b60 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
@@ -283,6 +283,7 @@ export default {
'group.upload_indexing': 'indexando…',
'video.err_transport': 'Transporte não conectado',
'video.err_mse': 'Codec sem suporte para transmissão: {codec}',
+ 'video.err_no_mse': 'Este navegador não consegue transmitir vídeo (um iPhone precisa do iOS 17.1 ou mais recente)',
'video.mode_poster': 'Pôsteres',
'video.mode_flat': 'Lista simples',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
index 06f61ff..26025ef 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
@@ -276,6 +276,7 @@ export default {
'group.upload_indexing': '建立索引中…',
'video.err_transport': '传输未连接',
'video.err_mse': '该编解码器不支持流式播放:{codec}',
+ 'video.err_no_mse': '此浏览器不支持视频流式播放(iPhone 需要 iOS 17.1 或更高版本)',
'video.mode_poster': '海报视图',
'video.mode_flat': '平铺列表',
'video.filter_all': 'All',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/video-player.js b/packages/meshbay-hub/src/meshbay_hub/static/video-player.js
index 21abe8e..5ea14ef 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/video-player.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/video-player.js
@@ -1104,7 +1104,16 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose, onDownload, onCopyL
setAudioTrack(msg.audio_track);
}
- if (!window.MediaSource || !MediaSource.isTypeSupported(mime)) {
+ // An iPhone has no MediaSource, only ManagedMediaSource (iOS 17.1+):
+ // testing for the first alone refused every film there, and blamed
+ // the codec for it.
+ const MS = window.MediaSource || window.ManagedMediaSource;
+ if (!MS) {
+ setError(t('video.err_no_mse'));
+ setPhase('error');
+ return;
+ }
+ if (!MS.isTypeSupported(mime)) {
setError(t('video.err_mse', { codec: msg.codec }));
setPhase('error');
return;
@@ -1186,7 +1195,7 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose, onDownload, onCopyL
castRestartPendingRef.current = true;
}
- const ms = new MediaSource();
+ const ms = new MS();
msRef.current = ms;
if (blobUrlRef.current) URL.revokeObjectURL(blobUrlRef.current);
const url = URL.createObjectURL(ms);
@@ -1235,6 +1244,9 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose, onDownload, onCopyL
});
if (videoRef.current) {
+ // A ManagedMediaSource never opens on an element AirPlay could take
+ // over, unless it is given a second source to hand AirPlay instead.
+ if (MS !== window.MediaSource) videoRef.current.disableRemotePlayback = true;
videoRef.current.src = url;
videoRef.current.addEventListener('seeking', onSeeking);
videoRef.current.addEventListener('timeupdate', pump);