shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.09k stars 1.33k forks source link

TTML percentage of extent and origin scaled down unnecessarily #3029

Closed dhmmNagra closed 3 years ago

dhmmNagra commented 3 years ago

Have you read the FAQ and checked for duplicate open issues? yes

What version of Shaka Player are you using? v3.0.6

Can you reproduce the issue with our latest release version? Yes

Can you reproduce the issue with the latest code from master? Yes

Are you using the demo app or your own custom app? Both

If custom app, can you reproduce the issue using our demo app? Yes

What browser and OS are you using? Win & Mac Chrome v87, Firefox v83, Edge v87

For embedded devices (smart TVs, etc.), what model and firmware version are you using? N/A

What are the manifest and license server URIs? https://dash.akamaized.net/dash264/CTA/imsc1/IT1-20171027_dash.mpd

What did you do?

  1. Play this stream
  2. Enable the English subtitle stream
  3. Observe the subtitles throughout

What did you expect to happen? The specific percentage origin and extent attributes are expected to be honoured for correct placement.

What actually happened? Subtitles appear at top left and off screen.

image

If a percentage is specified then the region width and height apply the scaling unnecessarily. Same issue exists for the origin just after.

https://github.com/google/shaka-player/blob/56bb045ff68325d6b9de7cb3d56265ce3162f164/lib/text/ttml_text_parser.js#L365

michellezhuogg commented 3 years ago

Hello @dhmmNagra , thank you for your report! Would you like to submit a PR for this?

dhmmNagra commented 3 years ago

Hi @michellezhuogg thanks for the opportunity, I am drafting a PR - I'm a first time contributor so there will be a delay whilst my employer sorts out the CLA signing.

david-hm-morgan commented 3 years ago

pull request drafted at https://github.com/google/shaka-player/pull/3044

avelad commented 3 years ago

I think that it was resolved with https://github.com/google/shaka-player/pull/3044 and https://github.com/google/shaka-player/commit/d3640d1da15b6470deebd663f3f771c03864ab66 so it could be closed, what do you think?

david-hm-morgan commented 3 years ago

Yes its all been wrapped up already