Skip to content

Commit 3f2790d

Browse files
committed
add special open site button for android
1 parent ad0347a commit 3f2790d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/views/streaming/radio/controller.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ import type {TopLevelViewPropsType} from '../../types'
1919
import {StreamPlayer} from './player'
2020
import type {PlayState, HtmlAudioError, Viewport} from './types'
2121
import {ActionButton, ShowCalendarButton, CallButton} from './buttons'
22+
import {openUrl} from '../../components/open-url'
2223

2324
const image = require('../../../../images/streaming/ksto/ksto-logo.png')
2425
const stationNumber = '+15077863602'
26+
const kstoLiveUrl = 'https://www.stolaf.edu/multimedia/play/embed/ksto.html'
2527

2628
type Props = TopLevelViewPropsType
2729

@@ -89,7 +91,21 @@ export class KSTOView extends React.PureComponent<Props, State> {
8991
callPhone(stationNumber)
9092
}
9193

94+
openStreamWebsite = () => {
95+
openUrl(kstoLiveUrl)
96+
}
97+
9298
renderPlayButton = (state: PlayState) => {
99+
if (Platform.OS === 'android') {
100+
return (
101+
<ActionButton
102+
icon="ios-planet"
103+
onPress={this.openStreamWebsite}
104+
text="Open"
105+
/>
106+
)
107+
}
108+
93109
switch (state) {
94110
case 'paused':
95111
return (

0 commit comments

Comments
 (0)