rtmp_stream 1.0.0

๐Ÿ“– Overview

rtmp_stream is a Flutter plugin designed to provide unified RTMP streaming and video recording capabilities for Android and iOS.
It addresses the lack of suitable Flutter RTMP plugins on pub.dev: existing plugins are either no longer maintained or rely on outdated dependencies, making them unsuitable for modern mobile applications.


โš™๏ธ Technical Foundation

By leveraging these mature libraries, rtmp_stream provides a consistent cross-platform API interface, reducing development complexity.


โ“ Why This Plugin

  • No suitable Flutter RTMP plugin exists on pub.dev.
  • Existing plugins suffer from:
    • Long-term lack of maintenance.
    • Outdated dependencies, incompatible with the latest Flutter and platform SDKs.

Therefore, the goal of rtmp_stream is to deliver a modern, stable, and maintainable RTMP streaming solution.


๐Ÿ› ๏ธ Supported Methods

๐ŸŒ Common Methods (Android & iOS)

  • ๐Ÿ“ท Get available cameras: availableCameras
  • โš™๏ธ Initialize plugin: initialize
  • ๐ŸŽฅ Start local video recording: startVideoRecording
  • โน๏ธ Stop local video recording: stopRecording
  • ๐Ÿ“ก Start recording and streaming: startVideoRecordingAndStreaming
  • โน๏ธ Stop recording or streaming: stopRecordingOrStreaming
  • ๐Ÿ“ก Start video streaming: startVideoStreaming
  • โน๏ธ Stop video streaming: stopStreaming
  • ๐Ÿ”„ Switch camera: switchCamera
  • ๐Ÿ”Š Toggle audio on/off: switchAudio
  • ๐Ÿ’ก Toggle flashlight on/off: switchFlashLight
  • ๐Ÿ“Š Get stream statistics: getStreamStatistics
  • ๐Ÿ—‘๏ธ Dispose plugin: dispose

๐ŸŽ iOS Exclusive Methods

Since HaishinKit supports not only streaming but also RTMP playback, iOS provides additional features:

  • โธ๏ธ Pause stream playback: pauseStream

    Note: This pauses playback, not streaming.

  • โ–ถ๏ธ Resume stream playback: resumeStream

    Note: This resumes playback, not streaming.

  • ๐ŸŽš๏ธ Set audio bitrate: setAudioSettings
  • ๐ŸŽž๏ธ Set video settings: setVideoSettings
  • ๐Ÿ”Š Get temporary mute status: getHasAudio
  • ๐Ÿ”Š Set temporary mute: setHasAudio
  • ๐ŸŽฅ Get temporary video stop status: getHasVideo
  • ๐ŸŽฅ Set temporary video stop: setHasVideo
  • ๐ŸŽฌ Set streaming frame rate: setFrameRate
  • โš™๏ธ Set session preset: setSessionPreset
  • ๐Ÿ–ผ๏ธ Set screen dimensions: setScreenSettings

๐Ÿค– Android Exclusive Methods

Android provides additional features during live streaming:

  • ๐Ÿ“ธ Take snapshot during streaming: takePicture
  • โธ๏ธ Pause recording: pauseVideoRecording
  • โ–ถ๏ธ Resume recording: resumeVideoRecording
  • ๐ŸŽจ Apply filter: setFilter

    Filter type values correspond to filters defined in source code:
    CameraNativeView.kt

  • โŒ Remove filter: removeFilter

๐Ÿš€ Conclusion

rtmp_stream 1.0.0 provides Flutter developers with a cross-platform, modern RTMP streaming and video recording plugin, addressing the shortcomings of the current ecosystem.
It is built on Androidโ€™s RootEncoder and iOSโ€™s HaishinKit, offering a unified API while extending playback and audio/video controls on iOS, and snapshot and filter features on Androidโ€”helping developers quickly build live streaming and recording applications.

Libraries

camera