Here is the text i added to parsar:
case "twitch":
if(count($path) >= 3 && $path[1] == 'videos')
{
// Direct video embed with URL like:
https://www.twitch.tv/videos/179723472
$id = 'video=v'.$path[2];
}
elseif(count($path) >= 4 && $path[2] == 'v')
{
// Direct video embed with URL like:
https://www.twitch.tv/waypoint/v/179723472
$id = 'video=v'.$path[3];
}
elseif(count($path) >= 2)
{
// Channel (livestream) embed with URL like:
https://twitch.tv/waypoint
$id = 'channel='.$path[1];
}
break;
case "rumble":
if($fragments[0])
{
$id = str_replace('!v=', '', $fragments[0]); //
http://www.rumble.com/embed/
}
elseif($input['v'])
{
$id = $input['v']; //
http://www.rumble.com/embed/
}
else
{
$id = $path[1]; //
http://www.rumble.com/
}
break;
case "bitchute":
if($fragments[0])
{
$id = str_replace('!v=', '', $fragments[0]); //
http://www.bitchute.com/embed/
}
elseif($input['v'])
{
$id = $input['v']; //
http://www.bitchute.com/embed/
}
else
{
$id = $path[1]; //
http://www.bitchute.com/
}
default:
return "[video={$video}]{$url}[/video]";
}
Here is what I added to bbcodes_screeneditor;
},
'Twitch': {
'match': /twitch\.tv\/(?:[\w+_-]+)\/v\/(\d+)/,
'url': '//player.twitch.tv/?video=v',
'html': '<iframe src="{url}" frameborder="0" scrolling="no" height="378" width="620" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'
},
'Rumble': {
'match': /(?:v=|v\/|embed\/|rumb\.le\/)(.{11})/,
'url': '//www.rumble.com/embed/',
'html': '<iframe width="560" height="315" src="{url}" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'
},
'Bitchute': {
'match': /(?:v=|v\/|embed\/|youtu\.be\/)(.{11})/,
'url': '//www.bitchute.com/embed/',
'html': '<iframe width="560" height="315" src="{url}" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'
}
}
};
Couple of errors i caught.. here is the new file for JS
},
'Twitch': {
'match': /twitch\.tv\/(?:[\w+_-]+)\/v\/(\d+)/,
'url': '//player.twitch.tv/?video=v',
'html': '<iframe src="{url}" frameborder="0" scrolling="no" height="378" width="620" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'
},
'Rumble': {
'match': /(?:v=|v\/|embed\/|rumb\.le\/)(.{11})/,
'url': '//www.rumble.com/embed/',
'html': '<iframe width="560" height="315" src="{url}" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'
},
'Bitchute': {
'match': /(?:v=|v\/|embed\/|bitchu\.te\/)(.{11})/,
'url': '//www.bitchute.com/embed/',
'html': '<iframe width="560" height="315" src="{url}" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'
}
}
(2023-02-22, 06:33 PM)SvePu Wrote: [ -> ]I've added 4 more items into video selector and it works
Ok... did I code it incorrectly?
Here are the files
[
attachment=45809][
attachment=45810]
Most sites now provide the embed code string. Thinking about adding one more option where you drop the embed code string rather than just the url alone. Hmmm... options to make this a global fix.
<iframe class="rumble" width="640" height="360" src="https://rumble.com/embed/v27w06c/?pub=o339l" frameborder="0" allowfullscreen></iframe>
by simply creating a drop point, for the post to insert the video embed code into the html any code string could be used to embed.
I did it in my developer software using my website.
[
attachment=45811]
Fixed population problem. Progress.
I am not well versed in the code, so I am making syntax errors. Learning by failure..
Now trying to figure out why I am getting subframe errors and failure to connect.
When I attach a url the player appears in the draft and functions. when I post the comment, it goes to connection errors... Seems like i have duplicated something and that is what is crashing the embed.