video_player_rtmp_ext 0.0.5 copy "video_player_rtmp_ext: ^0.0.5" to clipboard
video_player_rtmp_ext: ^0.0.5 copied to clipboard

outdated

A player supporting rtmp&rtmps live video

video_player_rtmp_ext #

pub

A player supporting rtmp,rtmps,m3u8 live video

Your flutter version must be greater than or equal to 3.3.2 to use this plug-in

  • Test Link
  1. http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8
  2. rtmp://ns8.indexforce.com/home/mystream
  3. rtmp://mobliestream.c3tv.com:554/live/goodtv.sdp

Getting Started #

video_player_rtmp_ext: ^last_version
Android
  • in project build.gradle add this line
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
        maven { url "https://maven.aliyun.com/repository/public" }
    }
}
  • add minSdkVersion set to 19

  • add android:usesCleartextTraffic="true" to you AndroidManifest.xml file

iOS

Update youProject/ios/Podfile

target 'Runner' do
  # update this line 
  use_frameworks! :linkage => :static 
  use_modular_headers!
end
pod install

1.Simple example #

  • Initialize controller
IJKPlayerController controller = IJKPlayerController.network("http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8");
  • Using widgets
VideoPlayerRtmpExtWidget(
   controller: controller,
   viewCreated: (IJKPlayerController _){
       controller.play();
   },
)

2. Controller API #

  • Start
controller.play();
  • Pause
controller.pause();
  • Stop
controller.stop();
  • Judge whether it is playing
final isPlaying = await controller.isPlaying;
  • If you want to play the m3u8 video, please add this line (only android)
if(controller.isAndroid){
   await controller.setPlayManager(PlayerFactory.exo2PlayerManager);
}