logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
32.66k stars 1.91k forks source link

In Android, I can't play audio and video. I don't know whether the mobile terminal doesn't support it now, or whether my writing method has problems #8730

Open VondeSong opened 1 year ago

VondeSong commented 1 year ago

Search first

What Happened?

In Android, I can't play audio and video. I don't know whether the mobile terminal doesn't support it now, or whether my writing method has image problems style of writing [:audio {:controls true :src "https://fanyi.baidu.com/gettts?lan=uk&text=denied&spd=3&source=web"}] ![](../assets/2022-01-23 23-06-03.mp4)

Reproduce the Bug

Desktop 0817

Expected Behavior

No response

Screenshots

image

Desktop or Mobile Platform Information

No response

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

andelf commented 1 year ago
image

The request to Baidu fanyi tts API is blocked by the server.

andelf commented 1 year ago

@xyhp915 It seems this is caused by different HTTP request implementations on mobile platforms and Electron. Only Android fails to request the content.

andelf commented 1 year ago

This is caused by the Referer header in the HTTP request

> curl -i -H 'Referer: http://localhost/' https://fanyi.baidu.com/gettts\?lan\=uk\&text\=denied\&spd\=3\&source\=web
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Date: Wed, 01 Mar 2023 15:14:25 GMT
Server: Apache
Set-Cookie: BAIDUID=5F2F0CB214BB8F7FD8B5695618639E9E:FG=1; Path=/; Domain=baidu.com; Max-Age=31536000
Set-Cookie: BAIDUID_BFESS=5F2F0CB214BB8F7FD8B5695618639E9E:FG=1; Path=/; Domain=baidu.com; Max-Age=31536000; Secure; SameSite=None
Tracecode: 08651649272786780426030123
Vary: Accept-Encoding
Content-Length: 0
VondeSong commented 1 year ago

I understand what you said. It's true. But there are two problems. First, the MP4 in asset cannot be played on Android. Second, the wma in asset cannot be played. Is the wma format not supported image image image

image image image

jhc86 commented 1 year ago

Also experiencing the same with .webm files. Working okay on desktop, but not able to link to on Android

iron-mors commented 1 year ago

Is there any type of video file that works?

mindspawn commented 1 month ago

Same issue with mp4 files. I have tried ones generated by zoom, sharex and handbrake none of them play. All of them plan if opened directly from the assets folder in android.