This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Layout { | |
enum Kind { | |
case layout1 | |
case layout2 | |
case layout3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
} | |
override fun onResume() { | |
super.onResume() | |
val customView = CustomView(applicationContext) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create builder | |
LocalCamera localCamera = new LocalCamera(surfaceView) | |
//Start recording | |
if (localCamera.prepareAudio() && localCamera.prepareVideo()) { | |
localCamera.startRecord() | |
} else { | |
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/ | |
} | |
//Stop recording | |
rtmpCamera1.stopStream() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Layout { | |
enum Type { | |
case layout1 | |
case layout2 | |
case layout3 | |
} | |
var type: Type = .layout1 | |
var images: [UIImage?] = [nil, nil, nil, nil] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension UIImage { | |
func compress() -> UIImage? { | |
var actualHeight = self.size.height | |
var actualWidth = self.size.width | |
let maxHeight: CGFloat = 800.0 | |
let maxWidth: CGFloat = 800.0 | |
var imgRatio = actualWidth/actualHeight | |
let maxRatio = maxWidth/maxHeight | |
var compressionQuality: CGFloat = 0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pods for iOS_Firebase_Demo | |
pod 'Firebase/Core' | |
pod 'Firebase/Database' |