diff --git a/samples/js/demos/app.yaml b/samples/js/demos/app.yaml deleted file mode 100644 index 918e4b7f50..0000000000 --- a/samples/js/demos/app.yaml +++ /dev/null @@ -1,30 +0,0 @@ -application: webrtc-demos -version: 1 -runtime: python27 -api_version: 1 -threadsafe: yes - -handlers: -- url: /favicon\.ico - static_files: favicon.ico - upload: favicon\.ico - -- url: /html - static_dir: html - secure: always - -- url: /images - static_dir: images - secure: always - -- url: /js - static_dir: js - secure: always - -- url: .* - script: main.app - secure: always - -libraries: -- name: webapp2 - version: "2.5.1" diff --git a/samples/js/demos/html/dtmf1.html b/samples/js/demos/html/dtmf1.html new file mode 100644 index 0000000000..c9e37f97af --- /dev/null +++ b/samples/js/demos/html/dtmf1.html @@ -0,0 +1,187 @@ + +
+diff --git a/samples/js/demos/js/demosite/app.yaml b/samples/js/demos/js/demosite/app.yaml new file mode 100644 index 0000000000..e1f043bcd0 --- /dev/null +++ b/samples/js/demos/js/demosite/app.yaml @@ -0,0 +1,14 @@ +application: webrtc-demos +version: 1 +runtime: python27 +api_version: 1 +threadsafe: yes + +handlers: +- url: .* + script: main.app + secure: always + +libraries: +- name: webapp2 + version: "2.5.1" diff --git a/samples/js/demos/favicon.ico b/samples/js/demos/js/demosite/favicon.ico similarity index 100% rename from samples/js/demos/favicon.ico rename to samples/js/demos/js/demosite/favicon.ico diff --git a/samples/js/demos/main.py b/samples/js/demos/js/demosite/main.py similarity index 56% rename from samples/js/demos/main.py rename to samples/js/demos/js/demosite/main.py index 7be9df6a62..a91fda932c 100644 --- a/samples/js/demos/main.py +++ b/samples/js/demos/js/demosite/main.py @@ -18,10 +18,20 @@ import webapp2 import os from google.appengine.ext.webapp import template -class MainHandler(webapp2.RequestHandler): - def get(self): - path = os.path.join(os.path.dirname(__file__), 'index.html') - self.response.out.write(template.render(path, {})) +class PageHandler(webapp2.RequestHandler): + def get(self): + base_url = self.request.path + if self.request.path == '/': + self.redirect("http://webrtc.googlecode.com/svn/trunk/" + + "samples/js/demos/index.html" + , permanent=True) + else: + self.redirect("http://webrtc.googlecode.com/svn/trunk/" + + "samples/js/demos" + + base_url, + permanent=True) + +app = webapp2.WSGIApplication([ + (r'/*.*', PageHandler), + ], debug=True) -app = webapp2.WSGIApplication([('/', MainHandler)], - debug=True)