Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webrtc stream can NOT be played in flutter_live if pushing mp4 video file like this #15

Open
ryantan1 opened this issue Nov 11, 2021 · 2 comments

Comments

@ryantan1
Copy link

clone git and build it successfully.
run it on android 9 os. push mp4 video file with following command:
./ffmpeg -re -i video.mp4 -c copy -f flv -y rtmp://ip:1935/live/mp4test

then webrtc://ip/live/mp4test can be played via SRS rtcplayer in browser while can NOT be played by flutter_live apk.

how to fix it? could you please give some hint? thanks a lot!

@ryantan1
Copy link
Author

stream server is SRS4.0 which support RTC

@efinal
Copy link

efinal commented Jul 9, 2022

try these two steps:

  1. the h5 rtcplayer will by default use the same protocol with demo html page, which usually the http. while flutter_live apk will by default use https. if your srs server doesn't provide valid https connection, the apk will failed to play
  2. if https can't be provided, you can append ?schema=http to the webrtc url, like webrtc://ip/live/mp4test?schema=http in this case, you also need add android:usesCleartextTraffic="true" to your example/android/app/src/main/AndroidManifest.xml in the application node to allow android connect to unsecure http site.

hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants