Skip to main content
Version: 1.1.x

HLS Events - Flutter

VideoSDK provides hlsStateChanged event which will notify you of the current state of HLS for the meeting.

Events.hlsStateChanged

  • This event will be triggered when the meeting's HLS status changed.
  • This event can be subscribed from Room Object.
note

downstreamUrl is now depecated. Use playbackHlsUrl or livestreamUrl in place of downstreamUrl

Example

Here is the usage of the event mentioned in this page.

import 'package:flutter/material.dart';
import 'package:videosdk/videosdk.dart';

class MeetingScreen extends StatefulWidget {
...
}

class _MeetingScreenState extends State<MeetingScreen> {
late Room room;

@override
void initState() {
...

setupRoomEventListener();
}

@override
Widget build(BuildContext context) {
return YourMeetingWidget();
}

void setupRoomEventListener() {
room.on(Events.hlsStateChanged, (Map<String, dynamic> data) {
//Status can be :: HLS_STARTING
//Status can be :: HLS_STARTED
//Status can be :: HLS_PLAYABLE
//Status can be :: HLS_STOPPING
//Status can be :: HLS_STOPPED
log("Meeting HLS status : ${data['status']}");
if (data['status'] == "HLS_PLAYABLE")
log("PLAYBACKHLS URL -- " + data['playbackHlsUrl']);
});
}
}

API Reference

The API references for all the methods and events utilized in this guide are provided below.

Got a Question? Ask us on discord