orvexa_player 0.1.0
orvexa_player: ^0.1.0 copied to clipboard
A Flutter MP4/HLS video player with customizable controls, fullscreen, video and Widget ads, VAST/VMAP, and opt-in native picture in picture.
example/example.md
Orvexa Player example #
The example app offers default controls, custom Hugeicons controls, fullscreen, direct video and interactive Widget advertisements, and linear VAST/VMAP fixtures. Native PiP is experimental and opt-in; see the platform requirements.
For a minimal player, create a controller once, open the source paused and let the user press Play:
import 'package:flutter/material.dart';
import 'package:orvexa_player/orvexa_player.dart';
class VideoExample extends StatefulWidget {
const VideoExample({super.key});
@override
State<VideoExample> createState() => _VideoExampleState();
}
class _VideoExampleState extends State<VideoExample> {
late final PlayerController controller;
@override
void initState() {
super.initState();
controller = PlayerController();
controller.open(
PlayerSource(
id: 'lesson',
uri: Uri.parse('https://example.org/lesson.mp4'),
title: 'Lesson',
),
play: false,
);
}
@override
Widget build(BuildContext context) => AspectRatio(
aspectRatio: 16 / 9,
child: OrvexaPlayer(controller: controller),
);
@override
void dispose() {
controller.dispose();
super.dispose();
}
}
Use a source URL owned by your application. Browser media servers must allow the appropriate cross-origin requests. The controller survives rebuilds and fullscreen transitions; its owner releases it when the presentation is removed.
See the full example for the control selector, advertisements and native PiP setup, or the package API overview for partial control builders and customization.