Skip to content
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

TextTrackCue constructor throws on Toshiba dTV #635

Closed
vitalist82 opened this issue Dec 23, 2016 · 8 comments
Closed

TextTrackCue constructor throws on Toshiba dTV #635

vitalist82 opened this issue Dec 23, 2016 · 8 comments
Assignees
Labels
platform: TV/STB Issues affecting smart TV or set-top box platforms status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: enhancement New feature or request
Milestone

Comments

@vitalist82
Copy link

- What version of Shaka Player are you using?

2.0.2

  • 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?

Own custom app

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

No. The demo app isn't working on Toshiba TV, where the issue is occuring.

  • What did you do?

I used uncompiled mode, modified logging to be able to see debugging output when running on the TV, set logging level to DEBUG, played standard demo asset "Tears of Steel (Widevine)".
The video was loaded and started playing with the lowest resolution. Even after few minutes of playback, the resolution has not changed. For the asset "Tears of Steel" (without Widevine), the resolution changed as expected.

During the playback of the Widevine video, following error has been logged:
"(text:4) failed fetch and append: code=undefined"

From debugging it seems, that segment for content type 'text' is not downloaded, which is leading to startupComplete_ property of StreamingEngine staying false, thus never calling onCanSwitch_ method.

When I deleted the 'text' content type from mediaStates_ property of StreamingEngine in the beggining of handleStartup_ method -

shaka.media.StreamingEngine.prototype.handleStartup_ = function(
    mediaState, stream) {
  var Functional = shaka.util.Functional;
  var MapUtils = shaka.util.MapUtils;

  delete this.mediaStates_['text'];
  if (this.startupComplete_)
    return;

startupComplete_ property was then set to true and changing to higher resolutions started to work.

This is the debugging output:

MediaKeys.install
Using nonprefixed EME v0.1b
PatchedMediaKeysWebkit.install
MediaSource.install
Using native MSE as-is.
Using Promises polyfill.
SimpleAbrManager.disable()
The last segment should not end before the end of the Period.
The last segment should not end before the end of the Period.
PatchedMediaKeysWebkit.requestMediaKeySystemAccess
PatchedMediaKeysWebkit.MediaKeySystemAccess
PatchedMediaKeysWebkit.MediaKeySystemAccess.getConfiguration
PatchedMediaKeysWebkit.MediaKeySystemAccess.createMediaKeys
PatchedMediaKeysWebkit.MediaKeys
PatchedMediaKeysWebkit.setMediaKeys
Player.createStreamingEngine()
onChooseStreams_
SimpleAbrManager.disable()
Choosing new streams after period changed
Choosing new streams for
init: completed initial Stream setup
(video:8)looking up segment:presentationTime=0currentPeriod.startTime=0
(video:8)looking up segment:presentationTime=0currentPeriod.startTime=0
(audio:1)looking up segment:presentationTime=0currentPeriod.startTime=0
(audio:1)looking up segment:presentationTime=0currentPeriod.startTime=0
(text:4)looking up segment:presentationTime=0currentPeriod.startTime=0
(text:4)looking up segment:presentationTime=0currentPeriod.startTime=0
PatchedMediaKeysWebkit.onWebkitNeedKey_[object MediaKeyEvent]
PatchedMediaKeysWebkit.MediaKeys.createSession
PatchedMediaKeysWebkit.MediaKeySession
PatchedMediaKeysWebkit.MediaKeySession.generateRequest
(text:4)failed fetch and append: code=undefined
PatchedMediaKeysWebkit.onWebkitKeyMessage_
PatchedMediaKeysWebkit.MediaKeys.findSession_
PatchedMediaKeysWebkit.MediaKeySession.generated
PatchedMediaKeysWebkit.MediaKeySession.update
PatchedMediaKeysWebkit.onWebkitKeyAdded_
PatchedMediaKeysWebkit.MediaKeys.findSession_
PatchedMediaKeysWebkit.MediaKeySession.ready
Choosing new streams after key status changed
No new streams need to be chosen.

Only some messages are logged, because of the way I modified the logging. If more logging would be helpful, I can improve that.

This issue doesn't occur in Chrome on desktop. The difference when running on Toshiba dTV is, that PatchedMediaKeysWebkit methods are called during the playback.

Is there something I could do to provide more specific information to help to find the cause of this issue?

Thanks

Tomas

@joeyparrish joeyparrish self-assigned this Dec 27, 2016
@joeyparrish joeyparrish added the type: question A question from the community label Dec 27, 2016
@joeyparrish
Copy link
Member

The content you're testing with is from Unified Streaming. (We don't control it.)

The "Tears of Steel (Widevine)" asset has text streams, but the "Tears of Steel" asset (without Widevine) from the same group has no text at all. So naturally, the non-Widevine asset will not run into this same issue. MediaKeys should not have anything to do with it.

To eliminate MediaKeys from the equation, you could try the asset "Tears of Steel (subtitles)" from that same group. It has text streams, but no encryption.

@vitalist82
Copy link
Author

Thank you for the suggestion.

Tears of Steel with subtitles is working the same way (without quality switching) as the Widevine encoded asset, but still only in TV browser, not on desktop in Chrome.

@jozefchutka
Copy link
Contributor

fix in #643

@joeyparrish joeyparrish changed the title Switching to higher resolution on Toshiba dTV TextTrackCue constructor throws on Toshiba dTV Jan 4, 2017
@joeyparrish
Copy link
Member

Ah, so the real problem is that the TextTrackCue constructor is throwing and causing StreamingEngine to break down.

@jozefchutka
Copy link
Contributor

Yes, thats correct.

@joeyparrish
Copy link
Member

Okay, cool. Thank you for working on the pull request to correct this on the Toshiba.

@joeyparrish joeyparrish added type: bug Something isn't working correctly type: enhancement New feature or request and removed type: question A question from the community labels Jan 4, 2017
@joeyparrish
Copy link
Member

I'm labeling this as an enhancement because we need a polyfill for the Toshiba, and as a bug because StreamingEngine shouldn't break down when the cue constructor fails. I will start work on the StreamingEngine part.

@joeyparrish joeyparrish added this to the v2.1.0 milestone Jan 4, 2017
shaka-bot pushed a commit that referenced this issue Jan 4, 2017
Now, the ignoreTextStreamFailures config applies to parsing errors as
well as network errors.

We also no longer count text streams against the startup phase.  Early
text failures will not prevent StreamingEngine from switching, without
regard for the presence of the ignoreTextStreamFailures config.

Issue #635

Change-Id: I6818ef021beabfbc8742a7b013fa0424b77cff47
joeyparrish added a commit that referenced this issue Jan 7, 2017
Now, the ignoreTextStreamFailures config applies to parsing errors as
well as network errors.

We also no longer count text streams against the startup phase.  Early
text failures will not prevent StreamingEngine from switching, without
regard for the presence of the ignoreTextStreamFailures config.

Issue #635

Change-Id: I6818ef021beabfbc8742a7b013fa0424b77cff47
@joeyparrish
Copy link
Member

The fix for the StreamingEngine breakdown has just been released in v2.0.3. The Toshiba polyfill is still a work in progress (#643).

joeyparrish pushed a commit that referenced this issue Jan 19, 2017
This adds a VTTCue polyfill for IE/Edge (3-arg TextTrackCue) and
Toshiba dTV (6-arg TextTrackCue).

Closes #635
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@joeyparrish joeyparrish added the platform: TV/STB Issues affecting smart TV or set-top box platforms label Jul 17, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: TV/STB Issues affecting smart TV or set-top box platforms status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants