ivs_player2 0.0.5 copy "ivs_player2: ^0.0.5" to clipboard
ivs_player2: ^0.0.5 copied to clipboard

Wrapper for Amazon IVS Android and iOS SDKs

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:ivs_player2/ivs_player2.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final player = IvsPlayer2();
    return MaterialApp(
      home: SafeArea(
        child: Scaffold(
          appBar: AppBar(
            title: const Text('IVS Player Example'),
          ),
          body: 
          Stack(
            children: [
              Container(
            
                color: Colors.amber,
                child: player.player(
                    "https://fcc3ddae59ed.us-west-2.playback.live-video.net/api/video/v1/us-west-2.893648527354.channel.YtnrVcQbttF0.m3u8"),
              ),
    
              Positioned(
                top: 20,
                child: ElevatedButton(
                    onPressed: () => player.caption(), child: const Text("字幕")),
              ),
              Positioned(
                top: 70,
                child: ElevatedButton(
                    onPressed: () => player.muted(), child: const Text("音声")),
              ),
            ],
          ),
        ),
      )
    );
  }
}
1
likes
140
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Wrapper for Amazon IVS Android and iOS SDKs

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on ivs_player2