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

Accept null playback controls when Alexa sings #20

Open
wants to merge 1 commit into
base: 3.3
Choose a base branch
from

Conversation

rtchagas
Copy link

The MediaSession is not being updated when Alexa sings.

This is because Moshi crashes when trying to parse
the RenderPlayerInfo.

error: com.squareup.moshi.JsonDataException:
Non-null value 'controls' was null at $.payload.control

AACS expects the 'controls' field of the RenderPlayerInfo
object to be non nullable but this is not the case
when Alexa sings.

{
"audioItemId": "",
"content": {
"art": {
"contentDescription": "Take Me Out to the Ball Game",
"sources": [{
"heightPixels": 0,
"size": null,
"url": "https://d3l071etx9fo2i.cloudfront.net...",
"widthPixels": 0
}]
},
"background": null,
"header": null,
"headerSubtext1": null,
"mediaLengthInMilliseconds": 0,
"provider": {
"logo": {
"contentDescription": null,
"sources": [{
"heightPixels": null,
"size": null,
"url": "https://s3.amazonaws.com/CAPS-...",
"widthPixels": null
}]
},
"name": "Greetings"
},
"title": "Take Me Out to the Ball Game",
"titleSubtext1": "Alexa",
"titleSubtext2": "Greetings"
},
"controls": null
}

Signed-off-by: Rafael Chagas rafael.chagas@volvo.com

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The MediaSession is not being updated when Alexa sings.

This is because Moshi crashes when trying to parse
the RenderPlayerInfo.

error: com.squareup.moshi.JsonDataException:
Non-null value 'controls' was null at $.payload.control

AACS expects the 'controls' field of the RenderPlayerInfo
object to be non nullable but this is not the case
when Alexa sings.

{
    "audioItemId": "",
    "content": {
        "art": {
            "contentDescription": "Take Me Out to the Ball Game",
            "sources": [{
                "heightPixels": 0,
                "size": null,
                "url": "https:\/\/d3l071etx9fo2i.cloudfront.net...",
                "widthPixels": 0
            }]
        },
        "background": null,
        "header": null,
        "headerSubtext1": null,
        "mediaLengthInMilliseconds": 0,
        "provider": {
            "logo": {
                "contentDescription": null,
                "sources": [{
                    "heightPixels": null,
                    "size": null,
                    "url": "https:\/\/s3.amazonaws.com\/CAPS-...",
                    "widthPixels": null
                }]
            },
            "name": "Greetings"
        },
        "title": "Take Me Out to the Ball Game",
        "titleSubtext1": "Alexa",
        "titleSubtext2": "Greetings"
    },
    "controls": null
}

Signed-off-by: Rafael Chagas <rafael.chagas@volvo.com>
@ruixin-amzn
Copy link

Thanks for the feedback, we have fixed this issue and it will be released in Auto SDK 4.0 release, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants