Skip to content

Selecting SRT transcript on demo page crashes browser tab #489

Description

@patrick-lienau

Describe the bug
Looks the the SRT transcript for the demo page is being parsed incorrectly resulting in a hung page. This appears to be a regression beginning in 9f24f0e which fixed #476.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://iiif-react-media-player.netlify.app/
  2. Click on the Transcript tab and from the dropdown choose "SRT Transcript"
    image
  3. Browser window becomes unresponsive.

Expected behavior
For the browser to not be bricked, even if there was an error.

Screenshots
image

This is not some browser bug. I've tested Chrome, Firefox, and Safari on my MBP. I'm confident you'd get similar behavior on any platform. The issue is present on your live demo site as well as locally after running yarn demo on the most recent commit (56c0bc4) to the main branch.

Additional context
Before using the transcript dropdown the following error can be observed in DevTools:

Text Track parsing errors for https://iiif-react-media-player.netlify.app/lunchroom_manners/lunchroom_manners.srt
video.es.js:222

VIDEOJS: ERROR: a
  code: 0
  message: "Malformed WebVTT signature."
  name: "ParsingError"
    [[Prototype]]: Error
      constructor: ƒ a(e,t)
      [[Prototype]]: Object
      
(anonymous) @ video.es.js:222

Setting a breakpoint on video.es.js:222 allowed me to inspect a more meaningful error a few stack frames up:
image

QA Notes from Charu about SRT crashing: (see #467 (comment))

  1. When I try to access an item that only has an SRT transcript (for example, this page), the webpage crashes.

  2. If a media item has multiple transcripts available and one of them is an SRT file, the page also crashes when I select the SRT transcript from the list (as seen in this example).
    (refer the screenshots attached)

Screenshot 2024-05-16 at 7 45 08 PM Screenshot 2024-05-16 at 7 47 59 PM

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions