diff options
| author | Teddy Wing | 2013-04-28 12:51:24 -0400 |
|---|---|---|
| committer | Teddy Wing | 2013-04-28 12:51:38 -0400 |
| commit | c96f4f998089589c698acabbf7ecfec93efb0a51 (patch) | |
| tree | 922f5b4d521841f72e7f7ec928a990b6b3b91583 | |
| parent | f486c32b0b2cb6194eb4ef96c7809723cc5620b5 (diff) | |
| download | Who-am-I-c96f4f998089589c698acabbf7ecfec93efb0a51.tar.bz2 | |
Create the <video> element in JavaScript
Wasn't working on the phone when I had a <video> el with an empty src
in the raw HTMl. So create a <video> el with the right src in JS and
then insert it.
| -rw-r--r-- | public/javascripts/app.js | 5 | ||||
| -rw-r--r-- | views/index.ejs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/public/javascripts/app.js b/public/javascripts/app.js index c602668..c700880 100644 --- a/public/javascripts/app.js +++ b/public/javascripts/app.js @@ -28,7 +28,10 @@ var App = App || null; }; this.initialize_video = function(url) { - //$('section.video video').attr('src', url); + var $video = $('<video src="' + url + '" controls>\ + Your browser does not support the <code>video</code> element.\ + </video>'); + $('section.video').append($video); }; this.get_characters = function(series_id, params) { diff --git a/views/index.ejs b/views/index.ejs index d4ea3ea..fd5b454 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -22,9 +22,7 @@ <body> <div role="main"> <section class="video"> - <video src="https://s3.amazonaws.com/hviggle/encoded/videotest_5DD837C5-8124-456F-B43C-C96284C63210-16934-000006D876102F04.mp4" controls> - Your browser does not support the <code>video</code> element. - </video> + </section> <section id="character-select"> |
