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:
parent
69bea13a20
commit
cfa01786bd
@ -1000,7 +1000,7 @@
|
|||||||
$config['embedding'] = array(
|
$config['embedding'] = array(
|
||||||
array(
|
array(
|
||||||
'/^https?:\/\/(?:\w+\.)?youtube\.com\/watch\?(?:&?v=([a-zA-Z0-9\-_]{10,11})|(&?start=\d*)|(&?end=\d*)|(?:&?[^&]+))*$/i',
|
'/^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(
|
array(
|
||||||
'/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i',
|
'/^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}';
|
$config['board_regex'] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}';
|
||||||
|
|
||||||
// Youtube.js embed HTML code
|
// 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">'.
|
'<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>';
|
'</a></div>';
|
||||||
|
@ -26,11 +26,9 @@
|
|||||||
onready(function(){
|
onready(function(){
|
||||||
var do_embed_yt = function(tag) {
|
var do_embed_yt = function(tag) {
|
||||||
$('div.video-container a', tag).click(function() {
|
$('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" '+
|
$(this.parentNode).html('<iframe style="float:left;margin: 10px 20px" type="text/html" '+
|
||||||
'width="360" height="270" src="//www.youtube.com/embed/' + videoID +
|
'width="360" height="270" src="//www.youtube.com/embed/' + $(this.parentNode).data('video') +
|
||||||
'?autoplay=1&html5=1" allowfullscreen frameborder="0"/>');
|
'?autoplay=1&html5=1'+ $(this.parentNode).data('params') +'" allowfullscreen frameborder="0"/>');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user