How to use native android media player code in flutter?

94 views
Skip to first unread message

Suriya SCT

unread,
Sep 20, 2019, 6:04:19 AM9/20/19
to Flutter Development (flutter-dev)
I'm a beginner to flutter, someone please provide the best guide to use the native android player in the flutter.
Advance Thanks

Andy Greenshaw

unread,
Sep 20, 2019, 6:07:32 AM9/20/19
to Suriya SCT, Flutter Development (flutter-dev)
Read up on platform channels / writing plugins.

On Fri, 20 Sep 2019 at 11:04, Suriya SCT <sur...@solutionchamps.com> wrote:
I'm a beginner to flutter, someone please provide the best guide to use the native android player in the flutter.
Advance Thanks

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/95ea834f-1c21-49f7-bb0c-8fb8ea8fffcb%40googlegroups.com.

Suriya SCT

unread,
Sep 20, 2019, 6:10:52 AM9/20/19
to Flutter Development (flutter-dev)
Hi Thanks for the info
I already read this https://flutter.dev/docs/development/platform-integration/platform-channels but I can't get a clear idea.This blog used to get the required from the android. But how to use the media player?

Suriya SCT

unread,
Sep 20, 2019, 7:19:56 AM9/20/19
to Flutter Development (flutter-dev)
Hi,
How to convert the below code to flutter native android code, I need this media player to implement on flutter
 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        VideoView videoView = (VideoView) findViewById(R.id.video);
        MediaController mediaController = new MediaController(this);
        mediaController.setAnchorView(videoView);
        mediaController.setMediaPlayer(videoView);

        Uri video = Uri.parse("rtsp://ss1c6.idc.mundu.tv:554/prf0/cid_29.sdp");
        videoView.setMediaController(mediaController);
        videoView.setVideoURI(video);
        videoView.start();
    }

On Friday, September 20, 2019 at 3:37:32 PM UTC+5:30, Andy Greenshaw wrote:
Read up on platform channels / writing plugins.
On Fri, 20 Sep 2019 at 11:04, Suriya SCT <sur...@solutionchamps.com> wrote:
I'm a beginner to flutter, someone please provide the best guide to use the native android player in the flutter.
Advance Thanks

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

Andy Greenshaw

unread,
Sep 20, 2019, 8:30:33 AM9/20/19
to Flutter Development (flutter-dev), Suriya SCT
Reply all
Reply to author
Forward
0 new messages