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

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

Open
moniecodes opened this issue Sep 28, 2023 · 0 comments

Comments

@moniecodes
Copy link

moniecodes commented Sep 28, 2023

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:
@moniecodes moniecodes changed the title Intercepting AudioPlayer url requests for HLS Dynamic media URL and intercepting AudioPlayer fetch requests for HLS Sep 28, 2023
@moniecodes moniecodes changed the title Dynamic media URL and intercepting AudioPlayer fetch requests for HLS Dynamic media URL and intercepting AudioPlayer fetch requests for HLS long streaming Sep 28, 2023
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

No branches or pull requests

1 participant