import 'package:fis_lib_media_rt/implementations/nt_rtmp/channel/channel.dart';
import 'package:flutter/material.dart';

import '../iframe.dart';

class InnerView extends StatefulWidget {
  final NTPlayChannel channel;
  const InnerView({super.key, required this.channel});

  @override
  State<StatefulWidget> createState() => _InnerViewState();
}

class _InnerViewState extends State<InnerView> {
  @override
  Widget build(BuildContext context) {
    // 裁图都靠主画面，根据合图尺寸匹配裁剪规则，完全不依赖接口宽高
    return WebIframeWidget(
      src: "./wwwroot/merge_flv_sub.html",
      onCreated: (id) {
        widget.channel.viewId = id;
      },
    );
  }
}
