123456789101112131415161718192021 |
- import 'channel.dart';
- class VidChannelTest {
- void run() async {
- final channel = VidDataChannel.create(
- "http://cdn-bj.fis.plus/0B344F48BA574ECD82B7FEDB8848421A.vid");
- channel.downloadProgressChanged.addListener((sender, e) {
- if (e.progress == 1) {
- print('downloadProgressChanged: ${e.progress}');
- }
- if (e.error != null) {
- print('occur error');
- }
- });
- final loaded = await channel.load();
- if (loaded) {
- final frame = await channel.getImage(0);
- print('Frame-${frame.index}');
- }
- }
- }
|