tencent_player_fluttify 0.0.6 copy "tencent_player_fluttify: ^0.0.6" to clipboard
tencent_player_fluttify: ^0.0.6 copied to clipboard

outdated

An `Tencent Player` Core Component, Powered By `Fluttify`, A Compiler Generating Dart Bindings For Native SDK.

example/lib/main.dart

import 'dart:async';

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  VodPlayer? _player;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: CloudVideo(onCloudVideoCreated: _handleCloudVideoCreated),
      ),
    );
  }

  Future<void> _handleCloudVideoCreated(CloudVideoController controller) async {
    _player = await VodPlayer.create();
    await _player!.setPlayerView(controller);
    await _player!.startPlay(
        "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-uni4934e7b/c4d93960-5643-11eb-a16f-5b3e54966275.m3u8");
    await _player!.setOnEventListener(
      onEventPlayProgress: (progress) {
        print("onEventPlayProgress: $progress");
      }
    );
  }
}
0
likes
0
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

An `Tencent Player` Core Component, Powered By `Fluttify`, A Compiler Generating Dart Bindings For Native SDK.

Homepage

License

unknown (license)

Dependencies

flutter, foundation_fluttify

More

Packages that depend on tencent_player_fluttify

Packages that implement tencent_player_fluttify