Releases: YohannesTz/HLSWebViewPlayer
Releases · YohannesTz/HLSWebViewPlayer
Release list
Initial Release
A lightweight and reliable HLS video player for Android, powered by WebView + hls.js.
This release introduces the first stable version of the library, supporting both Jetpack Compose and XML apps.
- Uses
hls.jsfor stable multi-device HLS streaming - Low-latency playback mode
- Worker-enabled decoding for better performance
Two UI Options
- Jetpack Compose
HlsWebViewPlayerComposable - XML
HlsPlayerViewView
Player Controller API
A unified controller with:
play(streamUrl)pause()stop()setVolume(float)setMuted(boolean)
Reactive Player State
Track playback and loading using StateFlow:
playStatusPLAY, PAUSE, STOPloadStatusLOADING, SUCCESS, ERROR
Android JavaScript Bridge
- Clean JS event forwarding
- Status callbacks (
READY,PLAYING,BUFFERING, etc.) - Full logging support
No default WebView video icon
-
Default play/poster icon is hidden using:
- Custom HTML video tag setup
- DOM-level poster suppression
- JavaScript-managed playback
Installation (via JitPack)
Add repository:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}Add dependency:
implementation "com.github.yohannestz:HLSWebViewPlayer:1.0.0"Sample Usage (Compose)
val controller = remember { DefaultHlsPlayerController() }
HlsWebViewPlayer(controller = controller)
controller.play("https://example.com/stream.m3u8")Sample Usage (XML)
<com.github.yohannestz.hlswebviewplayer.HlsPlayerView
android:id="@+id/hlsPlayerView"
android:layout_width="match_parent"
android:layout_height="250dp" />Feedback & Contributions
Issues and PRs are welcome!
If you encounter playback issues on specific devices, please open an issue with logs and device details.