diff options
Diffstat (limited to 'apps/samples/miles/miles.scxml')
-rw-r--r-- | apps/samples/miles/miles.scxml | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/apps/samples/miles/miles.scxml b/apps/samples/miles/miles.scxml index 650add8..c1c6c69 100644 --- a/apps/samples/miles/miles.scxml +++ b/apps/samples/miles/miles.scxml @@ -3,7 +3,7 @@ <state id="main"> <invoke type="miles" id="miles"> <finalize> - <log label="out" expr="_event.name" /> + <!-- <log label="out" expr="_event.name" /> --> <script>//dump(_event);</script> <if cond="_event.data.origin"> <!-- <log label="Reply-length" expr="_event.data.base64.length" /> --> @@ -12,6 +12,7 @@ <header name="Cache-Control" value="no-cache" /> <!-- force IE to actually reload --> <header name="Access-Control-Allow-Origin" value="*" /> <header name="Content-Type" value="text/plain" /> + <header name="Access-Control-Allow-Origin" value="*" /> <content expr="_event.data.image.base64()" /> </respond> <else /> @@ -19,6 +20,7 @@ <header name="Cache-Control" value="no-cache" /> <!-- force IE to actually reload --> <header name="Access-Control-Allow-Origin" value="*" /> <!-- respond element will add content-type header --> + <header name="Access-Control-Allow-Origin" value="*" /> <content expr="_event.data" /> </respond> </if> @@ -40,7 +42,7 @@ </transition> <transition event="http.get" target="idle"> - <log label="in" expr="_event.data.path" /> + <!-- <log label="in" expr="_event.data.path" /> --> <script>//dump(_event);</script> <if cond="false"> @@ -49,7 +51,16 @@ <send target="#_miles" event="start"> <param name="origin" expr="_event.origin" /> <param name="reflector" expr="_event.data.query.reflector" /> - <param name="userId" expr="_event.data.query.userid" /> + <param name="userid" expr="_event.data.query.userid" /> + <param name="session" expr="_event.data.query.session" /> + </send> + + <!-- STOP ############### --> + <elseif cond="_event.data.pathComponent[1] === 'stop'" /> + <send target="#_miles" event="stop"> + <param name="origin" expr="_event.origin" /> + <param name="reflector" expr="_event.data.query.reflector" /> + <param name="userid" expr="_event.data.query.userid" /> <param name="session" expr="_event.data.query.session" /> </send> @@ -63,7 +74,7 @@ <elseif cond="_event.data.pathComponent[1] === 'thumbnail'" /> <send target="#_miles" event="thumbnail"> <param name="origin" expr="_event.origin" /> - <param name="userId" expr="_event.data.query.userid" /> + <param name="userid" expr="_event.data.query.userid" /> </send> <!-- VIDEO ON ############### --> @@ -135,8 +146,8 @@ </transition> <transition event="http.post" target="idle"> - <log label="in" expr="_event.data.path" /> - <script>dump(_event);</script> + <!-- <log label="in" expr="_event.data.path" /> --> + <script>//dump(_event);</script> <if cond="false"> <!-- POST TEXT ############### --> @@ -155,4 +166,4 @@ </state> </state> -</scxml>
\ No newline at end of file +</scxml> |