Skip to content

Dynamic media URL and intercepting AudioPlayer fetch requests for HLS long streaming #740

@moniecodes

Description

@moniecodes

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

We are working on an http live streaming solution that allows us to send events to our service via query parameters to the m3u8 request.

Right now there is no way to update the m3u8 url when the player starts polling for a live hls playlist.

I tried a few work arounds. For example if the user skips we send a skip event parameter with the media url. But the very next request we want it to resume without skip command.

Our hls streaming sever uses httpOnly cookie that are required for consecutive playback and it seems when queued up via Audio player the cookies are sent, however when I make a similar request withCredentials, the previous host cookies are not sent/available.

Is there a way for us to intercept AudioPlayer fetch requests or chain audio directives? Ideally we can control how the player is polling live playlists

Current Behavior

Possible Solution

Some options can be one of these, all would help us solve our problem:

  • Allow the ability to intercept fetch request and send own request. This would be similar to hls.js and video.js setup options (happy to provide an example)
  • Allow dynamic stream url
  • Allow ability to chain AudioPlayer directives

Steps to Reproduce (for bugs)

Here is an example directive:

  handlerInput.responseBuilder
            .speak(speakOutput)
            .addAudioPlayerPlayDirective(
                'REPLACE_ALL',
                getUrl("load", 0, true, "live"),
                playbackInfo.token,
                0
            )

We want to update this request for the next fetch to change the url parameters we are passing, but currently there is no way to do this. Nor can we pass extra headers or add additional context to the fetch request (adding headers is not a blocker, but updating url is)

Context

We cannot publish this skill for our new streaming service without some level of support with media requests. 😞

Thanks so much for the help!

Your Environment

  • ASK SDK for Node.js used: x.x.x
  • Operating System and version:

Node.js and NPM Info

  • Node.js version used for development: using amazon alexa developer console
  • NPM version used for development:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions