From b203540e25473ce38bd9bc3744fe799803c3de58 Mon Sep 17 00:00:00 2001 From: "vikasmarwaha@webrtc.org" Date: Mon, 4 Mar 2013 18:57:09 +0000 Subject: [PATCH] Redirect webrtc-demos.appspot.com to svn site and added dtmf & pc1-audio demos. Also updated index page to include information about new demos. Review URL: https://webrtc-codereview.appspot.com/1148004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3602 4adac7df-926f-26a2-2b94-8c16560cd09d --- samples/js/demos/app.yaml | 30 --- samples/js/demos/html/dtmf1.html | 187 ++++++++++++++++++ samples/js/demos/html/pc1-audio.html | 110 +++++++++++ samples/js/demos/index.html | 24 +++ samples/js/demos/js/demosite/app.yaml | 14 ++ .../js/demos/{ => js/demosite}/favicon.ico | Bin samples/js/demos/{ => js/demosite}/main.py | 22 ++- 7 files changed, 351 insertions(+), 36 deletions(-) delete mode 100644 samples/js/demos/app.yaml create mode 100644 samples/js/demos/html/dtmf1.html create mode 100644 samples/js/demos/html/pc1-audio.html create mode 100644 samples/js/demos/js/demosite/app.yaml rename samples/js/demos/{ => js/demosite}/favicon.ico (100%) rename samples/js/demos/{ => js/demosite}/main.py (56%) 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 @@ + + +PeerConnection DTMF Demo 1 + + + + + +
+ +

Send Dtmf Tones

+
+

+duration: + +

+tone-gap: + +

+tones: + + +

+ + +

+
+ + + + diff --git a/samples/js/demos/html/pc1-audio.html b/samples/js/demos/html/pc1-audio.html new file mode 100644 index 0000000000..ad56329ad8 --- /dev/null +++ b/samples/js/demos/html/pc1-audio.html @@ -0,0 +1,110 @@ + + + +PeerConnection Audio Only Demo 1 + + + + + +

Local-Audio

+ +

Remote-Audio

+ +

+ + +

+ + + diff --git a/samples/js/demos/index.html b/samples/js/demos/index.html index 78cba2460e..809148ebe4 100644 --- a/samples/js/demos/index.html +++ b/samples/js/demos/index.html @@ -50,6 +50,12 @@ Shows how to set up a simple 1:1 audio/video call. + + + pc1.html + + Shows how to set up a simple 1:1 audio only call. + pc1-deprecated.html @@ -68,6 +74,24 @@ Shows how to pass constraints into the PeerConnection API, and query it for statistics. + + + dtmf1.html + + Shows how to send DTMF tones using PeerConnection API. + + + + dc1.html + + Shows how to send Data using PeerConnection API. + + + + local-audio-rendering.html + + Shows usage of a local media stream connected to an HTML5 audio tag. +

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)