GithubHelp home page GithubHelp logo

Comments (19)

brianchirls avatar brianchirls commented on April 28, 2024

I'm all for supporting audio, but consider that audio does not require any display. So this raises the question of what it should look like if there's no video track.

from react-native-video.

johanneslumpe avatar johanneslumpe commented on April 28, 2024

Well it wouldn't display anything I guess. Right now you won't see anything. So you could just create a style which sizes the player to a height of 0. And then you'd just add you own custom controls to interface with it. How does that sound?

from react-native-video.

johanneslumpe avatar johanneslumpe commented on April 28, 2024

Or we could allow the user to pass in a static image, which gets displayed while playing the file. But I think not displaying anything should work for now

from react-native-video.

brianchirls avatar brianchirls commented on April 28, 2024

Yes, I think not displaying anything for now is the way to go. And I think
let's also assume custom controls as well. Player controls that make
everybody happy are hard/impossible to get right, and people almost always
want to customize them.

On Thu, Apr 9, 2015 at 11:28 AM, Johannes Lumpe [email protected]
wrote:

Or we could allow the user to pass in a static image, which gets displayed
while playing the file. But I think not displaying anything should work for
now

β€”
Reply to this email directly or view it on GitHub
#13 (comment)
.

from react-native-video.

mwilc0x avatar mwilc0x commented on April 28, 2024

So does it make sense to have the audio be combined with video?

I think for someone looking to use this module, a simple default controls setup would go a long way. Then, could give the ability to customize their own layout.

I'm thinking of a use case where I have ~20 of mp3 URL strings I would want to pass to this component. Then, I could play/pause the current track and go back and forth throughout the array of URL's to listen.

What do you guys think?

from react-native-video.

brentvatne avatar brentvatne commented on April 28, 2024

@mjw56 - agreed that this would be very useful, what would the ideal API for that look like to you? eg: <Audio tracks={this.state.tracksArray} />?

from react-native-video.

mwilc0x avatar mwilc0x commented on April 28, 2024

@brentvatne hey, yeah I was thinking of passing in an array. I guess it could accept a single string too and just convert that to an array?

What do you think?

from react-native-video.

johanneslumpe avatar johanneslumpe commented on April 28, 2024

We could maybe call it playlist?

from react-native-video.

johanneslumpe avatar johanneslumpe commented on April 28, 2024

Also @mjw56 I don't see any issue why we shouldn't merge audio and video into a single component
because the underlying AVPlayer can take care of both and the default controls should also be applyable to both media types.

from react-native-video.

mwilc0x avatar mwilc0x commented on April 28, 2024

Ok, would it potentially look something like this?

var Media = require('react-native-media');
var { Audio, Video } = Media;

from react-native-video.

brentvatne avatar brentvatne commented on April 28, 2024

@mjw56 - I like that

from react-native-video.

brentvatne avatar brentvatne commented on April 28, 2024

@mjw56 - definitely something to consider going forward, we are going to focus on getting the Video component working great and then look at this again. Something like <Media> element or <Audio> <Video> could work, we'll just have to see.

from react-native-video.

brentvatne avatar brentvatne commented on April 28, 2024

Closing this, discussions will continue in #14 πŸ˜„ πŸ‘ πŸ’―

from react-native-video.

mwilc0x avatar mwilc0x commented on April 28, 2024

Ok, btw right now I am doing it where I handle the successive playbacks from the component level. I have the playlist track data in a flux store which I can then query from when a song ends, skip track, etc. This approach is working really nicely. It would be nice though to have playlist support in the future. Overall this component works great for handling .mp3 url's. :) I need to test it out some more using some other audio file types.

from react-native-video.

csakon avatar csakon commented on April 28, 2024

@mjw56 I attempted to upload a .mp3 into my project with no luck, I can only use mp4s. How did you manage to get mp3s to work?

from react-native-video.

mwilc0x avatar mwilc0x commented on April 28, 2024

@csakon I'm currently only using mp3's loaded from URL's. I haven't tried with mp3 files from disk yet. I don't see why that shouldn't work though?

from react-native-video.

csakon avatar csakon commented on April 28, 2024

@mjw56 mp3 files from disk don't work, a red react native error pops up saying something about expecing an mp4 at the src. However, I found an iOS app that will let you export audio into mp4 and that works like a charm. I also learned that the names for the uri are case sensitive.

from react-native-video.

jonaswindey avatar jonaswindey commented on April 28, 2024

@mjw56 can you share a gist with an example to load mp3(s) from an external url?

from react-native-video.

jasecoop avatar jasecoop commented on April 28, 2024

@mjw56 @csakon I've had the same problem with loading mp3's from disk. Doesn't work. Bit of a shame, as mp4 increases the file size.

Curious why this would work with a url but not locally... Any ideas?

from react-native-video.

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.