htmlBody property

  1. @override
String get htmlBody
override

The HTML of the embed

Implementation

@override
String get htmlBody =>
    """    <div id="player" style="position: fixed; top: 0px;"></div>
  <script>
    let player;
    function onYouTubeIframeAPIReady() {
      player = new YT.Player('player', {
        height: '100%',
        width: '100%',
        videoId: '$videoId',
        playerVars: {
        }
      });
    }

    function stopVideo() {
      player.stopVideo();
    }

    function pauseVideo() {
      player.pauseVideo();
    }
  </script>
$htmlScript""";