video_player_rtmp_ext

Creator: coderz1093

Last updated:

0 purchases

video_player_rtmp_ext Image
video_player_rtmp_ext Images
Add to Cart

Description:

video player rtmp ext

video_player_rtmp_ext #



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


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

Getting Started #
video_player_rtmp_ext: ^last_version
copied to clipboard
Android

in project build.gradle add this line

allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
maven { url "https://maven.aliyun.com/repository/public" }
}
}
copied to clipboard


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
copied to clipboard
pod install
copied to clipboard
1.Simple example #

Initialize controller

IJKPlayerController controller = IJKPlayerController.network("http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8");
copied to clipboard

Using widgets

VideoPlayerRtmpExtWidget(
controller: controller,
viewCreated: (IJKPlayerController _){
controller.play();
},
)
copied to clipboard
2. Controller API #

Start

controller.play();
copied to clipboard

Pause

controller.pause();
copied to clipboard

Stop

controller.stop();
copied to clipboard

Resume

controller.resume();
copied to clipboard

Judge whether it is playing

final isPlaying = await controller.isPlaying;
copied to clipboard

If you want to play the m3u8 video, please add this line
(only android)

if(controller.isAndroid){
await controller.setPlayManager(PlayerFactory.exo2PlayerManager);
}
copied to clipboard

player state change callback

controller.addListener(onStateChange);
...
void onStateChange(VideoListenerModel model){
debugPrint("$model");
model.when(progress: (progress, secProgress, currentPosition, duration) {
// todo : Playback progress
}, playbackState: (playbackState) {
// todo: Playback state
}, onPlayError: (error) {
// todo : error callback detail info
},);
}

copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.