[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [161] Added initial audio support.
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [161] Added initial audio support. |
Date: |
Tue, 26 Jul 2011 14:07:38 +0000 |
Revision: 161
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=161
Author: valkov
Date: 2011-07-26 14:07:37 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
Added initial audio support. Finishes tasks #11211. Adds support for yourlisten
dot com.
Ticket Links:
------------
http://savannah.gnu.org/task/?11211
Modified Paths:
--------------
trunk/WEBSITES
trunk/src/lm_extract_video_link.js
trunk/src/lm_video_and_flash_objects_helper_functions.js
Added Paths:
-----------
trunk/src/lm_site_yourlistencom.js
Modified: trunk/WEBSITES
===================================================================
--- trunk/WEBSITES 2011-07-26 11:11:06 UTC (rev 160)
+++ trunk/WEBSITES 2011-07-26 14:07:37 UTC (rev 161)
@@ -48,6 +48,7 @@
- No HD support yet
http://video.xfree.hu/
http://www.clipjunkie.com
+http://yourlisten.com
Bulgarian:
http://vbox7.com
Modified: trunk/src/lm_extract_video_link.js
===================================================================
--- trunk/src/lm_extract_video_link.js 2011-07-26 11:11:06 UTC (rev 160)
+++ trunk/src/lm_extract_video_link.js 2011-07-26 14:07:37 UTC (rev 161)
@@ -55,11 +55,11 @@
{
link_re = new RegExp (
"\\\{{0}.*(video|flv_ur|streamer|file|moviepath|videourl|"+
- "mediaurl|sdurl|videopath|flv|url|ms|"+
+ "mediaurl|audio|soundfile|sdurl|videopath|flv|url|ms|"+
"nextmovie|flvaddress)"+
"(\\\"|\\\')*\\\s*(\\\=|\\\:|\\\,)\\\s*(\\\"|\\\')*"+
"(.*\\\."+
- "(flv|mp4)"+ // Add other extensions here
+ "(flv|mp4|mp3)"+ // Add other extensions here
"((\\\?|\\\&)?\\\w+\\\=[A-Za-z0-9_\\\-]+"+
"\\\&?)*)(?!\\\.)",
"i");
@@ -183,7 +183,8 @@
{
video_id_re = new RegExp (
"(\\\"|\\\'|\\\&|\\\?|\\\;|\\\/|\\\.|\\\=)(itemid|"+
- "clip_id|clip|video_id|vid|player_config\\\.php\\\?v|"+
+ "clip_id|audio|soundfile|clip|video_id|vid|"+
+ "player_config\\\.php\\\?v|"+
"videoid|media_id|vkey|video3|_videoid|"+
"vimeo_clip_|php&ID|\\\/video_embed\\\/\\\?id)"+
"(\\\"|\\\')*(\\\=|\\\:|,|\\\/)\\\s*(\\\"|\\\')*"+
Added: trunk/src/lm_site_yourlistencom.js
===================================================================
--- trunk/src/lm_site_yourlistencom.js (rev 0)
+++ trunk/src/lm_site_yourlistencom.js 2011-07-26 14:07:37 UTC (rev 161)
@@ -0,0 +1,68 @@
+// @licstart The following is the entire license notice for the
+// JavaScript code in this page (or file).
+//
+// This file is part of Linterna Mágica
+//
+// Copyright (C) 2011 Ivaylo Valkov <address@hidden>
+//
+// The JavaScript code in this page (or file) is free software: you
+// can redistribute it and/or modify it under the terms of the GNU
+// General Public License (GNU GPL) as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option)
+// any later version. The code is distributed WITHOUT ANY WARRANTY
+// without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
+//
+// As additional permission under GNU GPL version 3 section 7, you
+// may distribute non-source (e.g., minimized or compacted) forms of
+// that code without the copy of the GNU GPL normally required by
+// section 4, provided you include this license notice and a URL
+// through which recipients can access the Corresponding Source.
+//
+// @licend The above is the entire license notice for the JavaScript
+// code in this page (or file).
+//
+// @source http://linterna-magica.nongnu.org
+
+// END OF LICENSE HEADER
+
+LinternaMagica.prototype.sites["yourlisten.com"] = new Object();
+
+// Reference
+LinternaMagica.prototype.sites["www.yourlisten.com"] = "yourlisten.com";
+
+LinternaMagica.prototype.sites["yourlisten.com"].set_video_link_regex =
+function()
+{
+ var result = new Object();
+
+ result.link_re = new RegExp(
+ "soundfile=(.*)",
+ "i");
+
+ result.link_position = 1;
+
+ return result;
+}
+
+// Reference. Just returns false
+LinternaMagica.prototype.sites["yourlisten.com"].
+ do_not_clean_amps_in_extracted_link = "video.google.com";
+
+LinternaMagica.prototype.sites["yourlisten.com"].css_fixes =
+function(object_data)
+{
+ var computed_height =
+ document.defaultView.
+ getComputedStyle(object_data.parent).getPropertyValue("height");
+
+ object_data.parent.style.
+ setProperty("height",
+ (parseInt(computed_height)+50)+"px",
+ "important");
+
+ object_data.parent.style.setProperty("margin-bottom",
+ "50px", "important");
+
+ return false;
+}
Modified: trunk/src/lm_video_and_flash_objects_helper_functions.js
===================================================================
--- trunk/src/lm_video_and_flash_objects_helper_functions.js 2011-07-26
11:11:06 UTC (rev 160)
+++ trunk/src/lm_video_and_flash_objects_helper_functions.js 2011-07-26
14:07:37 UTC (rev 161)
@@ -192,12 +192,14 @@
LinternaMagica.prototype.find_started_clip = function()
{
var started = null;
+ var self = this;
for (var i=0,l=this.found_flash_video_objects; i<l; i++)
{
+ var state = self.player.state.apply(self,[i]);
// Another clip is started
if (this.get_video_object(i) &&
- this.player.state(i).string)
+ state && state.string)
{
started = i;
break;
@@ -206,4 +208,3 @@
return started;
}
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [161] Added initial audio support.,
Ivaylo Valkov <=