myCustomPreJoinPage function
- PreJoinPageOptions? options,
- required Credentials credentials,
A custom pre-join page widget that can be used instead of the default MediaSFU pre-join page.
This widget displays a personalized welcome message and includes a button to proceed to the broadcast session.
Note: Ensure this widget is passed to MediasfuBroadcastOptions only when you intend to use a custom pre-join page.
Implementation
Widget myCustomPreJoinPage({
PreJoinPageOptions? options,
required Credentials credentials,
}) {
return Scaffold(
appBar: AppBar(
title: const Text('Welcome to MediaSFU Broadcast'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
'Welcome to Your Custom Broadcast Experience!',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
const Text(
'You are about to join a broadcast session with enhanced features.',
style: TextStyle(fontSize: 16),
textAlign: TextAlign.center,
),
const SizedBox(height: 40),
ElevatedButton(
onPressed: () {
// Custom logic here
},
child: const Text('Join Broadcast'),
),
],
),
),
);
}