Skip to content

Moving from 0.3.x APIs to 0.4.x

shogo4405 edited this page Dec 24, 2022 · 1 revision

VideoIOView to LFView and GLLFView

  • LFView supports preview for AVCaptureSession
  • GLLFView supports RTMP playback and CIFilter image.

0.3.x

var rtmpConnection:RTMPConnection = RTMPConnection()
var rtmpStream:RTMPStream = RTMPStream(rtmpConnection: rtmpConnection)

view.addSubview(rtmpStream.view)

0.4.x

var lfView:LFView = LFView(frame: view.bounds)
// if you want to use VisualEffect plugin.
// var lfView:GLLFView = GLLFView(frame: view.bounds)
var rtmpConnection:RTMPConnection = RTMPConnection()
var rtmpStream:RTMPStream = RTMPStream(rtmpConnection: rtmpConnection)

lfView.attachStream(rtmpStream)
view.addSubview(lfView)

AVMixer.class static methods are moved to DeviceUtil.class

0.3.x

httpStream.attachCamera(AVMixer.deviceWithPosition(.Back))

0.4.x

httpStream.attachCamera(DeviceUtil.deviceWithPosition(.Back))