betterplayer
betterplayer copied to clipboard
[BUG] 403 error when playing URL with token parameter
History check Checked
Describe the bug Used Video Player package and this URL plays fine. Sounds like I could be missing something in configuration. I have verified the URL and it does pull m3u8 file so it is definitely not URL issue. I could be wrong, but seems like better player is trying to parse URL and may be pulling out token because when I hit URL without token from my browser, I get 403.
To Reproduce Use some video URL like http://hostname/file.m3u8?token=123234234&expires=1643425160
*Example code
BetterPlayerConfiguration betterPlayerConfiguration =
BetterPlayerConfiguration(
controlsConfiguration: BetterPlayerControlsConfiguration(
showControls: false,
),
aspectRatio: 16 / 9,
fit: BoxFit.contain,
autoPlay: true,
subtitlesConfiguration: BetterPlayerSubtitlesConfiguration(
backgroundColor: Colors.transparent,
fontColor: Colors.white,
outlineColor: Colors.black,
fontSize: 11.toDouble(),
),
);
betterPlayerController = BetterPlayerController(betterPlayerConfiguration);
BetterPlayerDataSource dataSource = BetterPlayerDataSource(
BetterPlayerDataSourceType.network, "http://hostname/file.m3u8?token=123234234&expires=1643425160",
liveStream: (widget.channel == null) ? false : true);
betterPlayerController.setupDataSource(dataSource);
hideControllers();
If it helps, the url I'm using is a Livestream url.
@han9over Is this issue still relevant? Can you share your video url?
@han9over Is this issue still relevant? Can you share your video url?
yes. it's still happening and unfortunately I cannot share the video URL. As a workaround, I'm directly using VideoPlayer and it works with that URL. But better player cannot play. if you are unable to replicate, feel free to close the issue.