ilyhalight / voice-over-translation

Небольшое расширение, которое добавляет закадровый перевод видео из YaBrowser в другие браузеры
MIT License
3.18k stars 225 forks source link

The audio format is not supported #365

Closed bropines closed 9 months ago

bropines commented 10 months ago

На сервисе начинающемся с X прикол с аудио. Так же на этом самом сервисе проблемы с сабами (они тупо не работают) и со скачиванием файла(приходится через консоль тыкать на ссылку файла) image

Вот логи: Картинкой: Аудио не поддерживается: image

Клик на кнопку сабов (в теории оно вообще не должно работать, но я хз как вы реализовывали) image

Клик на кнопку загрузки "аудио" image

[VOT] Video Data:  {translationHelp: null, isStream: false, duration: 343, videoId: 'video20144275/alix_lynx_-_-_', detectedLanguage: 'en', …}
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:3850 [VOT] Translation response:  VideoTranslationResponse {url: 'https://vtrans.s3-private.mds.yandex.net/tts/prod/…257309aee522fd9a90dd69c56a707dae288285a0ab9083647', duration: 837, status: 1, unknown1: '207412452'}
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:883  [VOT] [localizationProvider] locale {} doesn't contain key disableTranslate
getFromLocale @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:883
get @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:899
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:5133
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:3857
onload @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:626
St @ VM2598:9
(anonymous) @ VM2598:33
St @ VM2598:9
r @ VM2598:22
(anonymous) @ VM2598:23
(anonymous) @ VM2598:69
g @ VM2598:69
Mt @ content.js:8
p @ content.js:56
a @ content.js:57
setTimeout (асинхронно)
setTimeout @ content.js:34
processMessage @ content.js:37
(anonymous) @ content.js:66
m @ content.js:57
St @ VM2598:9
p @ VM2598:68
g @ VM2598:71
(anonymous) @ VM2598:71
Zn @ VM2598:16
send @ VM2598:71
Fo @ VM2598:23
jo @ VM2598:23
i @ VM2598:33
(anonymous) @ VM2598:42
await in (anonymous) (асинхронно)
(anonymous) @ VM2598:43
N @ VM2598:41
(anonymous) @ VM2598:41
(anonymous) @ VM2598:18
St @ VM2598:9
t @ VM2598:9
message @ VM2598:18
message @ VM2598:18
(anonymous) @ VM2598:73
g @ VM2598:69
Mt @ content.js:8
p @ content.js:56
m @ content.js:58
(anonymous) @ content.js:58
yn @ content.js:15
send @ content.js:58
postMessage @ content.js:16
(anonymous) @ content.js:32
s @ content.js:29
s @ content.js:29
await in s (асинхронно)
(anonymous) @ content.js:30
Show 18 more frames
Меньше
alix_lynx_-_-_:1  Refused to load media from 'ВОТ ТУТА ДОЛЖНА БЫТЬ ССЫЛКА НО Я Её не дам)' because it violates the following Content Security Policy directive: "default-src 'self' data: 'unsafe-inline' 'unsafe-eval' blob: *.xvideos.com *.xnxx.com *.red-cdn.com *.gold-cdn.com *.xvideos-cdn.com *.xnxx-cdn.com *.others-cdn.com 1868565294.rsc.cdn77.org *.trafficfactory.biz www.iwanttodeliver.com www.google.com www.gstatic.com fonts.gstatic.com fonts.googleapis.com ajax.googleapis.com fcm.googleapis.com accounts.google.com *.cdn77.org *.nk-img.com *.segpay.com *.online-metrix.net *.exoclick.com *.exosrv.com *.realsrv.com *.orbsrv.com *.exdynsrv.com *.ackcdn.net *.afcdn.net *.aucdn.net *.adtng.com *.adglare.net *.bngpt.com bngpt.com *.trafficjunky.net *.ohmybutt.com *.flirt4free.com *.acdn5165543.com *.protoawe.com *.google-analytics.com livejasmin.com *.livejasmin.com *.jsmcrptjmp.com *.promo-bc.com *.bongacams.com *.bongacash.com *.gammae.com engine.asf4f.us *.htdvt.com *.jerkmate.com *.vfgtb.com *.hytxg2.com *.ajxx98.online *.adworldmedia.com as.air2s.com cretgate.com mysexchatroom.com ajxx98.online go.hpyjmp.com bongacams.com bngpst.com *.smljmp.com vast.bimbim.com bngprl.com *.bngprl.com serving.stat-rock.com *.xxxjmp.com *.feelpornx.com *.crjugate.com *.hqscene.com *.xlviirdr.com *.javhd.com xlivrdr.com *.xlivrdr.com *.servetraff.com *.goaserv.com *.porndoe.com porndoe.com *.goasrv.com *.xxxvjmp.com *.aacdn.net *.tf4srv.com *.rtbsuperhub.com *.tfosrv.com *.entjgcr.com *.vcmdiawe.com *.justservingfiles.net *.stripcash.com serve.awmdelivery.com aj2204.online *.xliirdr.com *.bbrdbr.com *.wmptcd.com *.ctosrd.com *.crmentjg.com *.wmptengate.com *.adglare.net www.flirt4free.com www.ohmybutt.com www.secretpartners.com cdn.asf4f.us *.livejasmin.com *.jsmcrptjmp.com *.awemwh.com etahub.com ctrack.trafficjunky.net tracking.sexcash.com *.gtflixtv.com wss://*.1ka.com https://*.1ka.com https://media.1ka.com https://u.1ka.com https://n.1ka.com local.adguard.org ws://local.adguard.org wss://local.adguard.org". Note that 'media-src' was not explicitly set, so 'default-src' is used as a fallback.

player.html5hls.static.js:15 Show Info end
player.html5hls.static.js:15 html5player.play()
player.html5hls.static.js:15 closeAd() : Ad already closed
player.html5hls.static.js:11 VideoEvent: play at 595.719266 / 837.286222
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4768  [VOT] DOMException: The element has no supported sources.
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4768
Promise.catch (асинхронно)
lipSync @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4767
handleVideoEvent @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4811
play (асинхронно)
play @ player.html5hls.static.js:15
(anonymous) @ player.html5hls.static.js:12
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:883  [VOT] [localizationProvider] locale {} doesn't contain key audioFormatNotSupported
getFromLocale @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:883
get @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:899
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4780
Promise.catch (асинхронно)
lipSync @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4767
handleVideoEvent @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4811
play (асинхронно)
play @ player.html5hls.static.js:15
(anonymous) @ player.html5hls.static.js:12
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:883  [VOT] [localizationProvider] locale {} doesn't contain key audioFormatNotSupported
getFromLocale @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:883
get @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:899
VOTLocalizedError @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:914
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4784
Promise.catch (асинхронно)
lipSync @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4767
handleVideoEvent @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4811
play (асинхронно)
play @ player.html5hls.static.js:15
(anonymous) @ player.html5hls.static.js:12
player.html5hls.static.js:11 VideoEvent: Playing at 595.719266 / 837.286222
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4784  Uncaught (in promise) VOTLocalizedError: The audio format is not supported
    at userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4784:17
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4784
Promise.catch (асинхронно)
lipSync @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4767
handleVideoEvent @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4811
play (асинхронно)
play @ player.html5hls.static.js:15
(anonymous) @ player.html5hls.static.js:12
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4804  Uncaught (in promise) DOMException: The element has no supported sources.
lipSync @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4804
handleVideoEvent @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4811
playing (асинхронно)
play @ player.html5hls.static.js:15
(anonymous) @ player.html5hls.static.js:12
player.html5hls.static.js:15 html5player.pause()
player.html5hls.static.js:11 VideoEvent: Pause at 596.821513 / 837.286222
player.html5hls.static.js:15 Show Info end
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4223 
"ВОТ ТУТ ТОЖЕ ССЫЛКА НО УЖЕ НА САБЫ В ВРОДЕ ЖСОН ФОРМАТЕ, НО Я ЕЕ ТОЖЕ НЕ ДАМ)" 
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4225  Uncaught TypeError: Cannot read properties of null (reading 'focus')
    at HTMLElement.<anonymous> (userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4225:59)
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4225
player.html5hls.static.js:15 Show Info end
userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4218  Uncaught TypeError: Cannot read properties of null (reading 'focus')
    at HTMLElement.<anonymous> (userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4218:61)
(anonymous) @ userscript.html?name=%255BVOT%255D-Voice-Over-Translation.user.js&id=017dd2aa-a436-402c-84e0-821d66f72777:4218
2player.html5hls.static.js:15 Show Info end
ilyhalight commented 10 months ago

Поставьте расширение для отключения CSP, после этого проблема с аудио пройдет. Возможно, субтитры это тоже починит.

bropines commented 10 months ago

Поставьте расширение для отключения CSP, после этого проблема с аудио пройдет. Возможно, субтитры это тоже починит.

Помогло. А можно будет это как-то воткнуть в скрипт или там оч трудна?

iG8R commented 9 months ago

Прошу прощения, что вмешиваюсь, точно такая же ошибка, но причина немного иная - провайдер заблокировал доступ к Яндекс. Вот лог из консоли Firefox Может можно каким-то образом восстановить работоспосность скрипта в данном случае? PS. К сожалению, возможность отключать CSP в Firefox убрали.

Array(12) [ "ru", "en", "zh", "ko", "lt", "lv", "ar", "fr", "it", "es", … ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:3788:11
Array(12) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:3794:11
Array(12) [ "ru", "en", "zh", "ko", "lt", "lv", "ar", "fr", "it", "es", … ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:3788:11
Array(12) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:3794:11
Array(56) [ "bn", "pt", "cs", "hi", "mr", "te", "tr", "ms", "vi", "ta", … ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:3788:11
Array(56) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:3794:11
[VOT] Detected language:  en [VOT-Cloudflare]-Voice-Over-Translation.user.js:5096:11
[VOT] Set translation from en to ru [VOT-Cloudflare]-Voice-Over-Translation.user.js:1936:15
[VOT] Video Data:  
Object { translationHelp: null, duration: 1095.421, videoId: "7pOq9HzT3Fo", detectedLanguage: "en", responseLanguage: "ru" }
[VOT-Cloudflare]-Voice-Over-Translation.user.js:2311:15
[VOT] Translation response:  
Object { url: "https://vtrans.s3-private.mds.yandex.net/tts/prod/2996f3ce0df449ba9476f638f8760e65.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=TUjU1hKqZCA89kq9Wfr3%2F20231024%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T131214Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=0acc303c6addec6f35d57dd1f272edb9e632e0a84e25fdc3ebb2db3c0c692aba", duration: 1095, status: 1, unknown1: "209138970" }
[VOT-Cloudflare]-Voice-Over-Translation.user.js:1340:17
[VOT] Subtitles response:  
Object { subtitles: (1) […], unknown0: 0 }
[VOT-Cloudflare]-Voice-Over-Translation.user.js:4132:19
[VOT] subtitles list 
Array(3) [ {…}, {…}, {…} ]
[VOT-Cloudflare]-Voice-Over-Translation.user.js:4206:11
[VOT] Video Data:  
Object { translationHelp: null, duration: 1095.421, videoId: "7pOq9HzT3Fo", detectedLanguage: "en", responseLanguage: "ru" }
[VOT-Cloudflare]-Voice-Over-Translation.user.js:2311:15
[VOT] Translation response:  
Object { url: "https://vtrans.s3-private.mds.yandex.net/tts/prod/2996f3ce0df449ba9476f638f8760e65.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=TUjU1hKqZCA89kq9Wfr3%2F20231024%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T131225Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=f9932713d57b72fbc519bc42418af02b00dc1f55b7816f57872cc0c476f0d21e", duration: 1095, status: 1, unknown1: "209138970" }
[VOT-Cloudflare]-Voice-Over-Translation.user.js:1340:17
Ошибка карты кода: Error: NetworkError when attempting to fetch resource.
URL ресурса: moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/%5BVOT-Cloudflare%5D-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785
URL карты кода: protobuf.min.js.map
[VOT] DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable.
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2065
    handleVideoEvent moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2295
[VOT-Cloudflare]-Voice-Over-Translation.user.js:2068:21
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2068
    (Асинхронный: promise callback)
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2067
    handleVideoEvent moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2295
Uncaught (in promise) VOTLocalizedError: The audio format is not supported
    VOTLocalizedError moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:4410
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2084
    promise callback*lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2067
    handleVideoEvent moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2295
eval:4410:5
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2084
    (Асинхронный: promise callback)
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2067
    handleVideoEvent moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2295
Uncaught (in promise) DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable.
    lipSync moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2104
    handleVideoEvent moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/[VOT-Cloudflare]-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785:2295
[VOT-Cloudflare]-Voice-Over-Translation.user.js:2104
Ошибка карты кода: Error: NetworkError when attempting to fetch resource.
URL ресурса: moz-extension://c45b56fb-1e63-4bc1-a3ae-2c41e871054e/userscripts/%5BVOT-Cloudflare%5D-Voice-Over-Translation.user.js?id=300257d6-5648-4acf-bac8-a01a3e30c785
URL карты кода: protobuf.min.js.map
ilyhalight commented 9 months ago

Прошу прощения, что вмешиваюсь, точно такая же ошибка, но причина немного иная - провайдер заблокировал доступ к Яндекс.

Включите проксирование аудио в настройках расширения

iG8R commented 9 months ago

Включите проксирование аудио в настройках расширения

К сожалению, такого пункта в настройках не нахожу

ilyhalight commented 9 months ago

Включите проксирование аудио в настройках расширения

К сожалению, такого пункта в настройках не нахожу

До последней беты обновитесь. В релизе, насколько я помню, был баг из-за чего этот пункт пропадал