bluefireteam/audioplayers

[WEB] Add Support for set crossOrigin

talski opened this issue · 0 comments

Checklist

  • I made sure that the issue I am raising doesn't already exist

Use case / Problem

When building to web, I have to hardcode p.crossOrigin = 'use-credentials'; in the file wrapped_player.dart in the audioplayers_web lib to my cookie credentials to work, it's something like withCredentials in http request libs

Proposal / Solution

It would be nice to have an option in UrlSource or AudioPlayer class to change this value on the go

Example Code

Example Code
final source = UrlSource('https://api.crossdomain.com/restricted/audio_file.mp3'); // defaults to 'anonymous'
// or
final source = UrlSource('https://api.crossdomain.com/restricted/audio_file.mp3', crossOrigin: 'use-credentials');

Affected platforms

web

Platform details

No response

Audio Files/URLs/Sources

No response

Mockups

No response

Related issues / more information

#129, #1479

Working on PR

no way