From 502e45c5f2cc515b310ee4c494c5dfb07282c064 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Thu, 19 May 2011 02:32:00 +0200 Subject: [PATCH] started with video --- oliver_screen/static/yt.html | 48 +++++++++++++++++++ oliver_screen/static/yt.js | 45 +++++++++++++++++ .../templates/public/now_playing.html | 8 +++- oliver_screen/tracks/views.py | 9 +++- 4 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 oliver_screen/static/yt.html create mode 100644 oliver_screen/static/yt.js diff --git a/oliver_screen/static/yt.html b/oliver_screen/static/yt.html new file mode 100644 index 0000000..d01a901 --- /dev/null +++ b/oliver_screen/static/yt.html @@ -0,0 +1,48 @@ + + + +
+ + + + diff --git a/oliver_screen/static/yt.js b/oliver_screen/static/yt.js new file mode 100644 index 0000000..f9db167 --- /dev/null +++ b/oliver_screen/static/yt.js @@ -0,0 +1,45 @@ +/* pasted from youtube API docs: http://code.google.com/apis/youtube/iframe_api_reference.html#Loading_a_Video_Player */ + +function insertYouTubeIFrame() { + // 2. This code loads the IFrame Player API code asynchronously. + var tag = document.createElement('script'); + tag.src = "http://www.youtube.com/player_api"; + var firstScriptTag = document.getElementsByTagName('script')[0]; + firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); + +} +// 3. This function creates an