Coder Social home page Coder Social logo

Comments (5)

Vunovati avatar Vunovati commented on August 21, 2024 1

Updated docs: shoutem/shoutem.github.io#43

from ui.

tdurand avatar tdurand commented on August 21, 2024

Just to let you know that i filled an issue on React native tracker : facebook/react-native#10171

from ui.

Vunovati avatar Vunovati commented on August 21, 2024

Thanks, as this is more a non ui-toolkit-specific question.

I tried to reproduce what you did with this video and I get:

{
    "domain": "WebKitErrorDomain",
    "canGoBack": false,
    "target": 143,
    "code": 204,
    "loading": false,
    "title": "",
    "canGoForward": false,
    "description": "Plug-in handled load",
    "url": "file:///Users/ovca/Library/Developer/CoreSimulator/Devices/55C21DB9-9F17-4D…ainers/Data/Application/9F325E1A-7E61-4D8E-A591-26CB4DF593BE/tmp/small.mp4"
}

but it plays the video in the iOS video player all the way to the end. On the other hand, I cannot control it, it plays right away after it has been rendered.

This is the first time I’ve tried this since we didn’t need the playback of local files. You could maybe show some kind of poster image and then render the WebView when the image is clicked.

If you want to play local videos you can also try using react-native-video as it officially supports it. Initially, we used it for our video components, but we figured out we can get away with using WebView for most of our needs.

React Native WebView also has its limitations, especially on Android where we cannot get it to play full screen yet, but I think that can be fixed in RN in the future.

from ui.

tdurand avatar tdurand commented on August 21, 2024

Hello,

Thanks for testing. So on your device it actually plays ? On mine it replace the container with the error and that's it. (like the gif on the issue shows)

If i can get this working i may consider do the hack you suggest.

Also you may consider add a note in your Documentation telling people that it won't work for local files.

Thanks,

PS: Yeah, i know my other alternatives, but as everyone i want to write the fewer code i can to reach my goals and avoid further maintenance ;-) . And react-native-video doesn't yet provide a nice UI with play pause, seek bar ... as native, you need to code it yourself, but i will likely need to tackle that... I'll get inspiration from the code you write, there is also : https://github.com/ldn0x7dc/react-native-media-kit , https://github.com/charliesbox/react-native-media-controls , i must admit i'm a bit disapointed that RN doesn't provide Audio and Video component out of the box...

from ui.

Vunovati avatar Vunovati commented on August 21, 2024

Thanks for the tip. Media controls lib could be of use, but react-native-videos has native controls prop which seems to me like a better deal.

Will update docs 👍

from ui.

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.