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

Player crashes when no text plugins but content has closed captions #5161

Closed
tykus160 opened this issue Apr 19, 2023 · 2 comments
Closed

Player crashes when no text plugins but content has closed captions #5161

tykus160 opened this issue Apr 19, 2023 · 2 comments
Assignees
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@tykus160
Copy link
Member

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

What version of Shaka Player are you using?
3.3.10

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

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

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

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

What browser and OS are you using?
MacOS Chrome

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

What are the manifest and license server URIs?

https://livesim.dashif.org/dash/vod/testpic_2s/cea608.mpd

What configuration are you using? What is the output of player.getConfiguration()?

{
    "drm": {
        "retryParameters": {
            "maxAttempts": 2,
            "baseDelay": 1000,
            "backoffFactor": 2,
            "fuzzFactor": 0.5,
            "timeout": 30000,
            "stallTimeout": 5000,
            "connectionTimeout": 10000,
            "suppressNetworkTimeoutWarnings": false
        },
        "servers": {},
        "clearKeys": {},
        "advanced": {},
        "preserveMediaKeySessions": false,
        "delayLicenseRequestUntilPlayed": false,
        "logLicenseExchange": false,
        "updateExpirationTime": 1,
        "preferredKeySystems": []
    },
    "manifest": {
        "retryParameters": {
            "maxAttempts": 2,
            "baseDelay": 1000,
            "backoffFactor": 2,
            "fuzzFactor": 0.5,
            "timeout": 30000,
            "stallTimeout": 5000,
            "connectionTimeout": 10000,
            "suppressNetworkTimeoutWarnings": false
        },
        "availabilityWindowOverride": null,
        "disableAudio": false,
        "disableVideo": false,
        "disableText": false,
        "disableThumbnails": false,
        "defaultPresentationDelay": 0,
        "overrideDolbyVisionCodecs": false,
        "dash": {
            "clockSyncUri": "",
            "ignoreDrmInfo": false,
            "disableXlinkProcessing": false,
            "xlinkFailGracefully": false,
            "ignoreMinBufferTime": false,
            "autoCorrectDrift": true,
            "initialSegmentLimit": 1000,
            "ignoreSuggestedPresentationDelay": false,
            "ignoreEmptyAdaptationSet": false,
            "ignoreMaxSegmentDuration": false,
            "keySystemsByURI": {
                "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey",
                "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha",
                "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
                "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready",
                "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb": "com.adobe.primetime"
            },
            "minimumUpdatePeriodOverride": null,
            "suggestedPresentationDelayOverride": null
        },
        "hls": {
            "ignoreTextStreamFailures": false,
            "ignoreImageStreamFailures": false,
            "useFullSegmentsForStartTime": false,
            "defaultAudioCodec": "mp4a.40.2",
            "defaultVideoCodec": "avc1.42E01E"
        }
    },
    "streaming": {
        "retryParameters": {
            "maxAttempts": 2,
            "baseDelay": 1000,
            "backoffFactor": 2,
            "fuzzFactor": 0.5,
            "timeout": 30000,
            "stallTimeout": 5000,
            "connectionTimeout": 10000,
            "suppressNetworkTimeoutWarnings": false
        },
        "rebufferingGoal": 2,
        "bufferingGoal": 10,
        "bufferBehind": 30,
        "ignoreTextStreamFailures": false,
        "alwaysStreamText": false,
        "startAtSegmentBoundary": false,
        "gapDetectionThreshold": 0.1,
        "smallGapLimit": 0.5,
        "jumpLargeGaps": false,
        "durationBackoff": 1,
        "forceTransmuxTS": false,
        "safeSeekOffset": 5,
        "stallEnabled": true,
        "stallThreshold": 1,
        "stallSkip": 0.1,
        "useNativeHlsOnSafari": true,
        "parsePrftBox": false,
        "inaccurateManifestTolerance": 2,
        "lowLatencyMode": false,
        "autoLowLatencyMode": false,
        "forceHTTPS": false,
        "preferNativeHls": false,
        "updateIntervalSeconds": 1,
        "dispatchAllEmsgBoxes": false,
        "observeQualityChanges": false,
        "enableSegmentStartWorkaround": false
    },
    "offline": {
        "usePersistentLicense": true
    },
    "abr": {
        "enabled": true,
        "useNetworkInformation": true,
        "defaultBandwidthEstimate": 1000000,
        "switchInterval": 8,
        "bandwidthUpgradeTarget": 0.85,
        "bandwidthDowngradeTarget": 0.95,
        "forceLowestRateOnTimeout": false,
        "restrictions": {
            "minWidth": 0,
            "maxWidth": null,
            "minHeight": 0,
            "maxHeight": null,
            "minPixels": 0,
            "maxPixels": null,
            "minFrameRate": 0,
            "maxFrameRate": null,
            "minBandwidth": 0,
            "maxBandwidth": null
        },
        "advanced": {
            "minTotalBytes": 128000,
            "minBytes": 16000,
            "fastHalfLife": 2,
            "slowHalfLife": 5
        }
    },
    "preferredAudioLanguage": "",
    "preferredTextLanguage": "",
    "preferredVariantRole": "",
    "preferredTextRole": "",
    "forceInitialTextLanguage": false,
    "preferredAudioChannelCount": 2,
    "preferredVideoCodecs": [],
    "preferredAudioCodecs": [],
    "preferForcedSubs": false,
    "preferredDecodingAttributes": [],
    "restrictions": {
        "minWidth": 0,
        "maxWidth": null,
        "minHeight": 0,
        "maxHeight": null,
        "minPixels": 0,
        "maxPixels": null,
        "minFrameRate": 0,
        "maxFrameRate": null,
        "minBandwidth": 0,
        "maxBandwidth": null
    },
    "playRangeStart": 0,
    "playRangeEnd": null,
    "cmcd": {
        "enabled": false,
        "sessionId": "",
        "contentId": "",
        "useHeaders": false
    }
}

What did you do?

Prepared custom build without text plugins (python3 build/build.py --name wt-test +@complete -@text)
Tried to play content with closed captions.

What did you expect to happen?
Player starts to play, closed caption tracks are selectable.

What actually happened?

Player crashed due to following error on 3.3.10:

TypeError: Cannot read properties of undefined (reading 'prototype')

On current main, error is following:

TypeError: a is not a function
    at shaka.text.TextEngine.initParser

The problem is related to the fact, that if text engine needs to be initiated due to closed captions, MediaSourceEngine inits it with text/vtt MIME type. TextEngine fails with assertion that no factory has been found for given MIME type.

It should be easily fixed with changing used MIME type in MediaSourceEngine to CEA608 or 708.

Bonus question - as there is a possibility to create custom build without certain plugins, do assertions in TextEngine around finding factory are valid? Shouldn't shaka instead throw an error but continue to play without subtitles? Or maybe prepare some dummy text parser that's always included in core?

@tykus160 tykus160 added the type: bug Something isn't working correctly label Apr 19, 2023
@avelad
Copy link
Member

avelad commented Apr 19, 2023

PR that will resolve it #5160 :)

@avelad avelad added component: captions/subtitles The issue involves captions or subtitles priority: P2 Smaller impact or easy workaround labels Apr 19, 2023
@avelad avelad added this to the v4.4 milestone Apr 19, 2023
@avelad avelad self-assigned this Apr 19, 2023
@avelad
Copy link
Member

avelad commented Apr 19, 2023

Fixed with 6937325

@avelad avelad closed this as completed Apr 19, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jun 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants