Javascript with local image files

I find a javascript which can animate a sequence of individual images(Documentation for the HTML5 Image AnimationS WebApp - HAniS). I create a “test.html” which can animate local images "fig1.jpg, fig2.jpg, fig3.jpg ".

<!DOCTYPE html>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>My Animation</title>
  <script type="text/javascript" src=""></script>

<body style="width:500px;" onload="HAniS.setup('filenames = fig1.jpg, fig2.jpg, fig3.jpg \n controls = startstop, speed, step, looprock, zoom \n controls_style = display:flex;flex-flow:row; \n buttons_style = flex:auto;margin:2px;' , 'handiv')">

  <div id="handiv" style="width:800px;background-color:#808080;">

  <font size=-1>This webapp is Copyright? 2014-2021 by Tom Whittaker

and I want to embed this HTML into streamlit:

import base64
import streamlit as st
import streamlit.components.v1 as components

st.title('HTML test')
HtmlFile = open('test.html', 'r')
raw_html ="utf-8")
raw_html = base64.b64encode(raw_html).decode()
components.iframe(f"data:text/html;base64,{raw_html}", height=400)

but no images displayed. How can I solve this? Thanks very much.