Hi @Ujjyan_Sanyal and welcome to the community 
Are you running this code locally? Loading subtitles from file:/// is restricted. See this post: Assessment wanted: Video and audio content
You could also activate GitHub Pages to see it live there:
https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
Have a nice weekend,
Michael