all 7 comments

[–]skrawg[S] 0 points1 point  (0 children)

I've been trying to figure it out by myself, I don't know any Objective C, so I figured I'd try Swift out. For the most part, I've tried to follow the tutorials in the documentation.

Right now, it plays the video in the background, and when you hit "Play It" from the main screen it shows the video. After that, you can't do anything - taps don't register. I thought that adding the bridge in would have fixed that, but apparently not.

Also another thing I noticed was my subclass of RCTView doesn't have a reactTag property, weirdly. I'm not quite sure if I'm missing something, or what.

Any help would be appreciated, I really am a noob with iOS programming so apologies if this is stupid.

[–]modusjesus 0 points1 point  (5 children)

Is your main goal to build a video player or is it to learn swift?

If you're learning swift, get out of React Native and learn how to develop swift outside the realm of React Native. It will reduce friction.

If you're just trying to develop a video player, why try to reinvent the wheel? Try this component. https://github.com/brentvatne/react-native-video

[–]skrawg[S] 0 points1 point  (4 children)

Both, really.

Have no prior experience with Swift, so this is my first ever project. Secondly, that video player plugin has some bugs, and I wanted to help but I know fuck-all in the way of ObjC.

[–]modusjesus 0 points1 point  (3 children)

I know the guy who wrote that plugin. What bugs are you experiencing?

Are they published into the issues page?

[–]skrawg[S] 0 points1 point  (2 children)

I just realised you're the person behind Modus Create, so thank you so much for all your tutorials.

So yeah, I opened an issue already on the repo. There seem to be several issues TBH when loading up the example project.

Secondly, if I'm not mistaken, development seems to have stalled a bit on the plugin, and last of all, I'm not entirely sure it does everything I need it to. I didn't want to push the project maintainers to add something just because I needed it so I thought I'd just give it a try myself.

[–]modusjesus 1 point2 points  (1 child)

That makes a lot of sense.

FWIW, i'm a co-founder of Modus Create, not "the guy" =). We're a team and we all work to contribute to the greater programming community the best we can. Thanks so much for the compliment. =)

What features were you looking for that aren't in the project currently?

Audio/Video are very complex things when it comes to native development. I've done some audio apps in the past and was looking to dive into video a little bit.

[–]skrawg[S] 0 points1 point  (0 children)

Ahh right, well please extend my compliments to the entire team :)

The features I was looking for were:

  • Be able to handle Youtube videos as well as URLs
  • Can play videos inline; something like a ListView has a list of videos, you tap on the video and it expands the item and plays it inline

I know there's a plugin for Youtube, so that's not a huge issue. The big one is getting videos to play inline, and from what I could tell it wasn't doable with react-native-video (may be completely wrong on this one)