100mslive / 100ms-android

Android Video Conferencing App using 100ms SDK
https://100ms.live
MIT License
87 stars 39 forks source link

Any usage of HmsHlsPlayer #367

Open ghost opened 1 year ago

ghost commented 1 year ago

I want to show live stream with HmsHlsPlayer, but I have some error like below. Do you have any example of how to show live streams?

Caused by: androidx.media3.common.ParserException: Input does not start with the #EXTM3U header. at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:262) at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:69) at androidx.media3.exoplayer.upstream.ParsingLoadable.load(ParsingLoadable.java:182) at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:414)

PratimMallick commented 1 year ago

@abalta-mobven The error suggests there is some error with the stream's manifest file. Is it possible to give the manifest file to us? Is the live stream generated by 100ms or from somewhere else? For the reference code please check this in our sample app - https://github.com/100mslive/100ms-android/blob/release-v2/app/src/main/java/live/hms/app2/ui/meeting/activespeaker/HlsFragment.kt#L119

For docs check here - https://www.100ms.live/docs/android/v2/how--to-guides/record-and-live-stream/hls-player

ghost commented 1 year ago

Hi @PratimMallick, live stream is generated from 100ms. Here is the link: https://defactofit-livestream-2134.app.100ms.live/streaming/preview/wkg-qsns-kzm

Also, I have already check this document.

AniketSK commented 1 year ago

@abalta-mobven does this happen everytime? Could you us through what you did to get this error?

PratimMallick commented 1 year ago

@abalta-mobven The player 's play() method has to be called by passing the HLS link. Are you calling the that method and passing https://defactofit-livestream-2134.app.100ms.live/streaming/preview/wkg-qsns-kzm as the url?

ghost commented 1 year ago

Yes, I use play method with this url. I think this URL does not support HLS.