-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shaka.text.SimpleTextDisplayer is not a constructor #1819
Comments
Thanks for filing the issue @marcbaechinger, thankfully we are a little ahead of you. This issues has been resolved as of commit df3926916e791a95863b86fb423de35724e439ae. We will be converting all factories to not use |
Thanks. When will this be available in the internal tip of tree? |
@marcbaechinger You should already see it in master (Submitted Feb 20th). Whether there will be another 2.5 beta release, that is up to @joeyparrish but we are closing in on the src= work, so a full 2.5 release should be with-in sight soon. |
Thanks Aaron! I can't see it on master or google3. Not an big issue for me though. I have the workaround in place for now and am happy to see a full 2.5 release soon. Many thanks! |
df39269 doesn't fix anything, it just adds a comment and reformats the code. I think two of us fixed the bug separately, and then the two fixes were merged. The commit that landed first and actually fixed the bug was d420b46. However, that had to do with |
Using the exact tag v2.5.0-beta3, I can't reproduce your results with the sample application in our "basic usage" tutorial. I see no exception, and I can display subtitles by running: player.selectTextTrack(player.getTextTracks()[0]);
player.setTextTrackVisibility(true); So the text displayer is working properly. Two things worth noting, though:
The missing |
Thanks all! I can confirm your findings. Both approaches work for me. I prefer relying on the dependency ordering only, so I was able to workaround it by requiring SimpleTextDisplayer in my code and do nothing with it just to have the dependency ordering differently as you mention in 2. above. Thanks for adding the goog.require, that's the best solution for me. |
Have you read the FAQ and checked for duplicate open issues?
Yes. Searched issues, read release notes of 2.5.0-beta3 and plugins page/doc around text displayer.
What version of Shaka Player are you using?
2.5.0-beta3
Can you reproduce the issue with our latest release version?
With 2.5.0-beta3.
Can you reproduce the issue with the latest code from
master
?With 2.5.0-beta3.
Are you using the demo app or your own custom app?
Custom app.
If custom app, can you reproduce the issue using our demo app?
No.
What browser and OS are you using?
Chrome/OSX.
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
NA.
What are the manifest and license server URIs?
Happens when calling the constructor of shaka.Player
What did you do?
What did you expect to happen?
No exception in console log.
What actually happened?
After upgrading from 2.5.0-beta2 to beta3 without any other changes, I see an exception prompted to the console. The playback works as expected though, when continuing and/or I found some workarounds but I wanted to report (not sure about subtitles yet).
It appears to me that the js compiler concatenates the javascript differently then with beta2. With beta3 the SimpleTextDisplayer is now appended at the very end of the concatenated javascript file. This seems to be outside the closure dependency system, so when I start our app and construct Shaka the SimpleTextDisplayer is not available in
shaka.Player.prototype.defaultConfig_:L2417
which causes this stack trace:I can avoid this stack trace constructing Shaka in an async function like with setTimeout or onload=() => {}. This makes me constructing Shaka in the next looper event, when shaka.text.SimpleTextDisplayer will available because the js has been interpreted to the very end.
I can actually imagine this is WAI and I need to adjust my build somehow. I'd prefer though, having this working inside the closure dependency system instead of the asyn onload thingy.
So if WAI, what is the recommended tweak? Should I just require
shaka.text.SimpleTextDisplayer
somewhere in my code just to make the compiler concatenated it before I construct Shaka? Or can Shaka require it to use it safely in shaka.Player.prototype.defaultConfig_:L2417?A temporary workaround which works is requiring the SimpleTextDisplayer:
This makes the compiler concatenated the SimpleTextDisplayer earlier.
The text was updated successfully, but these errors were encountered: