1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Fixes #935: YouTube browser upgraded to use YouTube API v3. An API key is now required for keyword, playlist or channel search. Direct input of specific videos still possible without using an API key. Now detects more YouTube URL formats. eg. https://youtu.be/xxxxxxx etc.

This commit is contained in:
Cameron
2015-06-08 15:55:05 -07:00
parent 0d3a6f6f4c
commit 6be9ee6504
3 changed files with 216 additions and 139 deletions

View File

@@ -344,10 +344,12 @@ $(document).ready(function()
var id = $(this).attr("data-target");
var src = $(this).attr("data-src");
var search = $(this).val();
if(search !== null)
{
src = src + '&search=' + encodeURIComponent(search);
search = search.replace('https://','url:');
search = search.replace('http://','url:');
src = src + '&search=' + encodeURIComponent(search);
}
// alert(src);