Skip to main content

orvexa_player 0.1.2 copy "orvexa_player: ^0.1.2" to clipboard
orvexa_player: ^0.1.2 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.

0
likes
150
points
53
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter MP4/HLS video player with customizable controls, fullscreen, video and Widget ads, VAST/VMAP, and opt-in native picture in picture.

Repository (GitHub)
View/report issues

Topics

#video #video-player #hls #vast #picture-in-picture

License

MIT (license)

Dependencies

flutter, http, hugeicons, media_kit, media_kit_libs_video, media_kit_video, pointer_interceptor, web, window_manager, xml

More

Packages that depend on orvexa_player

Packages that implement orvexa_player