Giter Site home page Giter Site logo

Comments (10)

tobiasrohloff avatar tobiasrohloff commented on May 24, 2024

Please provide an example url for testing.

from xikolo-android.

shls avatar shls commented on May 24, 2024

http://stream1.openune.org/stream/2015/2014全球城市化信息论坛开幕-01.mp4

from xikolo-android.

tobiasrohloff avatar tobiasrohloff commented on May 24, 2024

Hmm, the problem is a bit more complicated. These symbols are not allowed in an URL and have to be encoded. But I cannot encode the whole URL and also not the whole path after the host. Therefore I have to know where these symbols can appear for all Chinese platforms.

from xikolo-android.

shls avatar shls commented on May 24, 2024

Until now the chinese string only appears in the name of video file.

from xikolo-android.

tobiasrohloff avatar tobiasrohloff commented on May 24, 2024

The best solution would be to not use these characters at all in an URL. They cause problems across the whole app, because they are not allowed in URLs.

I would have to define provider specific encoding rules. E.g. your openUNE example needs an encoding after the last slash, but this rule breaks Vimeo URLs for openHPI and openSAP. openHPIcn still works, but are there any Chinese characters somewhere used? And what about cnMOOChouse? I need an exact schema on which platform these characters can appear at which place of the URL. Without I cannot guarantee that we perhaps end up with invalid URLs.

I think this not only applies to the video player, but files in general. I could image that the video download/offline playback also breaks.

from xikolo-android.

cwillems avatar cwillems commented on May 24, 2024

I would suggest for a convention (or maybe even a file upload validation) in the admin backend, that restricts chinese letters... @shls do you think, this is acceptable for chinese customers?

from xikolo-android.

tobiasrohloff avatar tobiasrohloff commented on May 24, 2024

I also would prefer to fix this on the backend side. The URLs are provided by the API, and I think we should ensure that our API delivers valid URLs only. If not, we have to fix this at every client for every URL usage.

from xikolo-android.

shls avatar shls commented on May 24, 2024

Video URL which only can be edited by admin:

  • openHPI.cn is our platform, so we(admin) can avoid using chinese characters in video URL.
  • Regarding openUNE/cnmooc, I can forward your solution which is "not use these characters in video URL" to our partner.

General file:

  • Fact: It is quite common that users upload a file with chinese letter in filename. If you check the files on openhpi.cn, there are quite a lot files with chinese filename.
  • For desktop, now we use the md5 value as the filepath which makes it downloadable.
  • For Android, I have no idea if it is downloadable.

From my perspective, It is painful for chinese user/customers if they can not use chinese when adding video URL or uploading file.

from xikolo-android.

cwillems avatar cwillems commented on May 24, 2024

How about the backend automatically renaming files - at least those which are uploaded in the backend? For video files, there must be a convention, as long as we don't upload those via the platform...

from xikolo-android.

shls avatar shls commented on May 24, 2024

Now on openhpi.cn, as far as I know, when I upload one general file, it will be renamed with file ID which is generated by our platform. The method make it possible to download file via desktop browser. Am I right? For android user, if our platform already renamed the general file, it should be downloadable.

Regarding the video URL, I can help to forward your solution, if they only use English in the filename and URL. The video can be downloadable and used as offline video.

Of course, If you are willing to integrate qiniu service in our platform, I am happy to provide the API manual.

from xikolo-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.