question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to make rounded RTCView?

See original GitHub issue

It’s not issue, sry, but is it possible to make video in circle?

<RTCView streamURL={this.state.videoURL} style={{ width: wind.width, height: wind.width, backgroundColor: 'red', borderRadius: wind.width / 2 }} />

issue

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
8BallBomBomcommented, Oct 1, 2017

Try adding objectFit={‘cover’} to your RTCView. Haven’t tried it myself but worth a shot.

0reactions
amberv0commented, Apr 26, 2018

@ShaubertIlya , I needed a custom shape so I did create a png and put it on top. It works for sure 😃 and another solution, if only circle is needed, is to put the component inside of the view, for which to set borderRadius and overflow:‘hidden’. Without hidden overflow somehow doesn’t always apply, I didn’t check why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modifying shape of <RTCView> component, Android #450
First, apply styles to your RTCView to make it round. Next, add objectFit to RTCView. RTCView objectFit='cover' style={[{ backgroundColor: ' ...
Read more >
React Native + Android: borderRadius alternative?
Here's the code (P.S. I'm using react native webrtc, that's where I'm getting RTCView, but I think this works with a plain old...
Read more >
Create Rounded Corners Border Radius View in React Native
Contents in this project Create Rounded Corners Border Radius View in React Native :- 1. Open your project's main App.js file and import...
Read more >
Help me please so slow connect - React Native WebRTC
const screenWidth = Math.round(Dimensions.get('window').width); ... return ( <View style={styles.root}> <RTCView streamURL={this.state.
Read more >
RTCView overflows the parent view while laying out on other ...
I've got a weird behavior in RTCView. I have multiple RTCView on top of each other. The problem is when the RTCView is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found