1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

Missed a couple things for the youtube timeslice support.

This commit is contained in:
Forkless 2014-11-02 23:46:13 -06:00
parent 69bea13a20
commit cfa01786bd
2 changed files with 5 additions and 7 deletions

View File

@ -1000,7 +1000,7 @@
$config['embedding'] = array(
array(
'/^https?:\/\/(?:\w+\.)?youtube\.com\/watch\?(?:&?v=([a-zA-Z0-9\-_]{10,11})|(&?start=\d*)|(&?end=\d*)|(?:&?[^&]+))*$/i',
'<iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" src="http://youtube.com/embed/$1?$2$3&rel=0&autoplay=1&html5=1"></iframe>'
'<iframe style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%" frameborder="0" id="ytplayer" src="http://youtube.com/embed/$1?$2$3"></iframe>'
),
array(
'/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i',
@ -1657,7 +1657,7 @@
$config['board_regex'] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}';
// Youtube.js embed HTML code
$config['youtube_js_html'] = '<div class="video-container" data-video="$2">'.
$config['youtube_js_html'] = '<div class="video-container" data-video="$1" data-params="$2$3">'.
'<a href="$0" target="_blank" class="file">'.
'<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/>'.
'<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$1/0.jpg" class="post-image"/>'.
'</a></div>';

View File

@ -26,11 +26,9 @@
onready(function(){
var do_embed_yt = function(tag) {
$('div.video-container a', tag).click(function() {
var videoID = $(this.parentNode).data('video');
$(this.parentNode).html('<iframe style="float:left;margin: 10px 20px" type="text/html" '+
'width="360" height="270" src="//www.youtube.com/embed/' + videoID +
'?autoplay=1&html5=1" allowfullscreen frameborder="0"/>');
'width="360" height="270" src="//www.youtube.com/embed/' + $(this.parentNode).data('video') +
'?autoplay=1&html5=1'+ $(this.parentNode).data('params') +'" allowfullscreen frameborder="0"/>');
return false;
});