Skip to content

Commit

Permalink
Added call to stop channel on wallop server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCarthy committed Feb 8, 2014
1 parent f98cec0 commit 63fa933
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/videoScreen.brs
Expand Up @@ -28,6 +28,7 @@ Function displayVideo(channel As string, args As Dynamic)
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event
print "Closing video screen"
stopChannel(channel)
exit while
else if msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
Expand Down
7 changes: 7 additions & 0 deletions source/wallopClient.brs
Expand Up @@ -61,6 +61,13 @@ function tuneChannel(channelNum As string)

End Function

' Tells Wallop to stop the specified channel number.
function stopChannel(channelNum As string)
request = CreateObject("roUrlTransfer")
url = getBaseWallopUrl() + "/channels/" + channelNum + "/stop"
request.SetUrl(url)
request.PostFromString("")
End Function

' Simple helper method for building the Wallop server
' path defined in the user settings
Expand Down

0 comments on commit 63fa933

Please sign in to comment.