100ms-android icon indicating copy to clipboard operation
100ms-android copied to clipboard

Any usage of HmsHlsPlayer

Open ghost opened this issue 2 years ago • 5 comments

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)

ghost avatar Apr 19 '23 02:04 ghost

@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

PratimMallick avatar Apr 19 '23 06:04 PratimMallick

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.

ghost avatar Apr 19 '23 07:04 ghost

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

AniketSK avatar Apr 19 '23 10:04 AniketSK

@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?

PratimMallick avatar Apr 19 '23 11:04 PratimMallick

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

ghost avatar Apr 21 '23 17:04 ghost