Добрый день, коллеги! Возникла надобность вставить видео из одноклассников в новость на школьном сайте. вставлял через плагин AllVideo + доработал код в файле sources.php, чтобы он подхватывал видео из ок. доработка не моя, а взята из просторов. предполагаю, что дело в коде:
<?php
/**
* @version 6.0.0
* @package AllVideos (plugin)
* @author JoomlaWorks - https://www.joomlaworks.net
* [member=126442]copyright[/member] Copyright (c) 2006 - 2020 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
/* -------------------------------- Media Output Templates -------------------------------- */
$nativeVideo = "<video class=\"avPlayer\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" src=\"{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}\" preload=\"metadata\"{PLAYER_POSTER_FRAME}{PLAYER_AUTOPLAY}{PLAYER_LOOP}{PLAYER_CONTROLS}{PLAYER_MUTED}></video>";
$nativeVideoRemote = "<video class=\"avPlayer\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" src=\"{SOURCE}\" preload=\"metadata\"{PLAYER_POSTER_FRAME}{PLAYER_AUTOPLAY}{PLAYER_LOOP}{PLAYER_CONTROLS}{PLAYER_MUTED}></video>";
$nativeAudio = "<audio class=\"avPlayer\" style=\"width:{WIDTH}px;height:{HEIGHT}px;{PLAYER_POSTER_FRAME}\" src=\"{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}\" preload=\"metadata\"{PLAYER_AUTOPLAY}{PLAYER_LOOP}{PLAYER_CONTROLS}></audio>";
$nativeAudioRemote = "<audio class=\"avPlayer\" style=\"width:{WIDTH}px;height:{HEIGHT}px;{PLAYER_POSTER_FRAME}\" src=\"{SOURCE}\" preload=\"metadata\"{PLAYER_AUTOPLAY}{PLAYER_LOOP}{PLAYER_CONTROLS}></audio>";
$deprecated = "<a id=\"avID_{SOURCEID}\" class=\"avDeprecated\" href=\"{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}\" download><span>".JText::_('JW_PLG_AV_DEPRECATED_DOWNLOAD')."</span></a>";
$deprecatedRemote = "<a id=\"avID_{SOURCEID}\" class=\"avDeprecated\" href=\"{SOURCE}\" download><span>".JText::_('JW_PLG_AV_DEPRECATED_DOWNLOAD')."</span></a>";
/* -------------------------------- Tags & formats -------------------------------- */
$tagReplace = array(
/* --- Audio/Video formats --- */
"avi" => $nativeVideo,
"aviremote" => $nativeVideoRemote,
"m4v" => $nativeVideo,
"m4vremote" => $nativeVideoRemote,
"mkv" => $nativeVideo,
"mkvremote" => $nativeVideoRemote,
"mp4" => $nativeVideo,
"mp4remote" => $nativeVideoRemote,
"ogv" => $nativeVideo,
"ogvremote" => $nativeVideoRemote,
"webm" => $nativeVideo,
"webmremote" => $nativeVideoRemote,
"flac" => $nativeAudio,
"flacremote" => $nativeAudioRemote,
"m4a" => $nativeAudio,
"m4aremote" => $nativeAudioRemote,
"mp3" => $nativeAudio,
"mp3remote" => $nativeAudioRemote,
"oga" => $nativeAudio,
"ogaremote" => $nativeAudioRemote,
"ogg" => $nativeAudio,
"oggremote" => $nativeAudioRemote,
"wav" => $nativeAudio,
"wavremote" => $nativeAudioRemote,
"3g2" => $deprecated,
"3g2remote" => $deprecatedRemote,
"3gp" => $deprecated,
"3gpremote" => $deprecatedRemote,
"aac" => $deprecated,
"aacremote" => $deprecatedRemote,
"divx" => $deprecated,
"divxremote" => $deprecatedRemote,
"f4v" => $deprecated,
"f4vremote" => $deprecatedRemote,
"flv" => $deprecated,
"flvremote" => $deprecatedRemote,
"mov" => $deprecated,
"movremote" => $deprecatedRemote,
"mpeg" => $deprecated,
"mpegremote" => $deprecatedRemote,
"mpg" => $deprecated,
"mpgremote" => $deprecatedRemote,
"swf" => $deprecated,
"swfremote" => $deprecatedRemote,
"wma" => $deprecated,
"wmaremote" => $deprecatedRemote,
"wmv" => $deprecated,
"wmvremote" => $deprecatedRemote,
/* --- 3rd party media providers --- */
// youtube.com - https://www.youtube.com/watch?v=g5lGNkS5TE0 or https://www.youtube.com/playlist?list=PL0875C16C899A8DE6
"YouTube" => "<iframe src=\"https://www.youtube.com/embed/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allow=\"autoplay; fullscreen; encrypted-media\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
// dailymotion.com - https://www.dailymotion.com/featured/video/x35714_cap-nord-projet-1_creation
"Dailymotion" => "<iframe src=\"https://www.dailymotion.com/embed/video/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
// facebook.com - https://www.facebook.com/Channel4News/videos/10155042102006939/
"Facebook" => "<iframe src=\"https://www.facebook.com/plugins/video.php?href={SOURCE}&show_text=0&width={WIDTH}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
// flickr.com - https://www.flickr.com/photos/bswise/5930051523/in/pool-726923@N23/
"Flickr" => "
<script type=\"text/javascript\">
allvideos.ready(function(){
allvideos.embed({
'url': 'https://json2jsonp.com/?callback=flickr{SOURCEID}&url=https%3A%2F%2Fwww.flickr.com%2Fservices%2Foembed%2F%3Fformat%3Djson%26maxwidth%3D{WIDTH}%26maxheight%3D{HEIGHT}%26url%3D{SOURCE}',
'callback': 'flickr{SOURCEID}',
'playerID': 'avID_{SOURCEID}'
});
});
</script>
<div id=\"avID_{SOURCEID}\" title=\"JoomlaWorks AllVideos Player\"> </div>
",
// soundcloud.com - https://soundcloud.com/sebastien-tellier/look
"SoundCloud" => "
<script type=\"text/javascript\">
allvideos.ready(function(){
allvideos.embed({
'url': 'https://soundcloud.com/oembed?format=js&iframe=true&callback=soundcloud{SOURCEID}&auto_play={PROVIDER_AUTOPLAY}&maxwidth={WIDTH}&url={SOURCE}',
'callback': 'soundcloud{SOURCEID}',
'playerID': 'avID_{SOURCEID}'
});
});
</script>
<div id=\"avID_{SOURCEID}\" title=\"JoomlaWorks AllVideos Player\"> </div>
",
// twitch.com - https://www.twitch.tv/videos/470125293
"Twitch" => "<iframe src=\"https://player.twitch.tv/?video=v{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
// vimeo.com - https://www.vimeo.com/1319796
"Vimeo" => "<iframe src=\"https://player.vimeo.com/video/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
// vk.com - //vk.com/video_ext.php?oid=167947957&id=167693310&hash=a714ffe6371d3552
"VK" => "<iframe src=\"{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\"border-width:0px;\" allowfullscreen title=\"Video Player\"></iframe>",
// vkontakte - 167947957&id=167693310&hash=a714ffe6371d3552
"vkontakte" => "
<iframe src=\"//vk.com/video_ext.php?oid={SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\"border-width:0px;\" allowfullscreen title=\"Video Player\"></iframe>",
// myvi.ru - //myvi.ru/player/embed/html/onFjTHvp0ghihf7BJg2fz9YcQ1YfEkqUvMBi0O8UXBIWNlcCsQmI6R6rlbff4Zaik0
"Myvi" => "<iframe src=\"//myvi.ru/player/embed/html/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\"border-width:0px;\" allowfullscreen title=\"Video Player\"></iframe>",
// sibnet.ru - //video.sibnet.ru/shell.php?videoid=12345
"Sibnet" => "<iframe src=\"//video.sibnet.ru/shell.php?videoid={SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\"border-width:0px;overflow:hidden;\" allowfullscreen title=\"Video Player\"></iframe>",
// kivvi.kz - http://v.kiwi.kz/v2/iuin3cgi0ap2/
"Kiwi" => "<iframe src=\"http://v.kiwi.kz/v2/{SOURCE}/\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\";display:inline-block;border-width:0px\" allowfullscreen title=\"Video Player\"></iframe>",
// mail.ru - https://videoapi.my.mail.ru/videos/embed/community/mir/_groupvideo/2515.html
"Mailru" => "<iframe src=\"{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\"display:inline-block;border-width: 0px;\" allowfullscreen title=\"Video Player\"></iframe>",
// Mail - https://my.mail.ru/community/mir/video/embed/_groupvideo/2515
"mail" => "<object width=\"{WIDTH}\" height=\"{HEIGHT}\">
<param name=\"allowScriptAccess\" value=\"always\" />
<param name=\"movie\" value=\"http://img.mail.ru/r/video2/player_v2.swf?movieSrc=mail/{SOURCE}\" />
<embed src=\"http://img.mail.ru/r/video2/player_v2.swf?movieSrc=mail/{SOURCE}\" type=\"application/x-shockwave-flash\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowScriptAccess=\"always\"></embed></object>",
// Yandex - aleksandnujki/87tgggkwc7.908
"yandex" => "<object width=\"{WIDTH}\" height=\"{HEIGHT}\"><param name=\"video\" value=\"http://static.video.yandex.ru/lite/{SOURCE}\"/>
<param name=\"allowFullScreen\" value=\"true\"/>
<param name=\"scale\" value=\"noscale\"/>
<embed src=\"http://static.video.yandex.ru/lite/{SOURCE}\" type=\"application/x-shockwave-flash\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowFullScreen=\"true\" scale=\"noscale\"></embed>
</object>",
// Rutube - http://rutube.ru/video/995b21c0ad5a4db6c88adf0331d8826f
"rutube" => "
<iframe src=\"//rutube.ru/play/embed/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" style=\"display:inline-block;border-width:0px;\" allowfullscreen title=\"Video Player\"></iframe>",
// ok.com - Одноклассники - //ok.ru/videoembed/22993177171235627
"ok" => "
<iframe width=\"{WIDTH}\" height=\"{HEIGHT}\" src=\"//ok.ru/videoembed/{SOURCE}\" style=\"border-width:0px;\" allowfullscreen title=\"Video Player\">",
);
код от контакта и ниже и был вставлен.
новость: Другая реальность, сразу под газетой.