Skip to content

Commit

Permalink
fix: radio station connection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
2shrestha22 committed Dec 5, 2024
1 parent 25295b7 commit 3b0fdd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ Radio NP is a free and open source online radio app that provides access to all
cd radio
fluter run
```

## Radio Stations

Some radio stations are available with https connection and some don't. For mobile app both http and https connections can play well. But for web only https connection is allowed. So http radio station will not work in web.

Note: When updating `radio_list.json` pick either http or https url which works on mobile device since browser always going to use https anyway.
2 changes: 1 addition & 1 deletion assets/radio_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
"id": "63DAluhRgl-PcYeixk5eY",
"name": "Radio Nepal",
"streamUrl": "https://stream1.radionepal.gov.np/live",
"streamUrl": "http://stream1.radionepal.gov.np/live",
"frequency": 100.0,
"address": "Kathmandu, Nepal",
"province": 3
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/radio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Radio extends _$Radio {
if (kIsWeb) {
streamUri = Uri.parse(station.streamUrl).replace(scheme: 'https');
} else {
streamUri = Uri.parse(station.streamUrl).replace(scheme: 'http');
streamUri = Uri.parse(station.streamUrl);
}

try {
Expand Down

0 comments on commit 3b0fdd7

Please sign in to comment.