Skip to content

Commit

Permalink
tiny fixes/improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sadache committed Jul 31, 2012
1 parent 59e833b commit 48f81e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions playapp/app/controllers/Application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object Application extends Controller {
val (sharedChunkedAudioStream, _) = Concurrent.broadcast(chunkedAudioStream)

def stream = Action {
Ok.stream(audioHeader >>> sharedChunkedAudioStream &> Concurrent.dropInputIfNotReady(10)).
Ok.stream(audioHeader >>> sharedChunkedAudioStream &> Concurrent.dropInputIfNotReady(50)).
withHeaders( (CONTENT_TYPE, audio.contentType),
(CACHE_CONTROL, "no-cache") )
}
Expand All @@ -46,17 +46,17 @@ object Application extends Controller {

val (controlsStream, controlsChannel) = Concurrent.broadcast[JsValue]

def controls = WebSocket.async[JsValue] { request =>
def controls = WebSocket.using[JsValue] { request =>

// in: handle messages from the user
val in = Iteratee.foreach[JsValue](_ match {
case o: JsObject => {
val in =
Enumeratee.collect[JsValue]{ case o:JsObject => o } &>>
Iteratee.foreach { o =>
zound.action(o)
controlsChannel push o
}
})

Promise.pure((in, controlsStream))
(in, controlsStream)
}

}

0 comments on commit 48f81e7

Please sign in to comment.