feat(deployed): add JoomlaWorks AllVideos 4.8.0 (no-source, vetted live)
JoomlaWorks AllVideos content plugin; unmapped -> deployed files. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
This commit is contained in:
parent
a6cf67c9d6
commit
8f3f7aa28d
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<extension version="2.5" type="plugin" group="content" method="upgrade">
|
||||||
|
<name>AllVideos (by JoomlaWorks)</name>
|
||||||
|
<author>JoomlaWorks</author>
|
||||||
|
<authorEmail>please-use-the-contact-form@joomlaworks.net</authorEmail>
|
||||||
|
<authorUrl>www.joomlaworks.net</authorUrl>
|
||||||
|
<copyright>Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.</copyright>
|
||||||
|
<creationDate>October 9th, 2017</creationDate>
|
||||||
|
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||||
|
<version>4.8.0</version>
|
||||||
|
<description>JW_PLG_AV_XML_DESC</description>
|
||||||
|
<!-- Parameters -->
|
||||||
|
<config>
|
||||||
|
<fields name="params">
|
||||||
|
<fieldset name="basic" addfieldpath="/plugins/content/jw_allvideos/jw_allvideos/includes/elements">
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_VIDEO_PARAMETERS" label="" description="" />
|
||||||
|
<field name="playerTemplate" type="template" directory="/plugins/content/jw_allvideos/jw_allvideos/tmpl" default="Responsive" hide_default="1" hide_none="1" label="JW_PLG_AV_TEMPLATE" description="JW_PLG_AV_TEMPLATE_DESC" />
|
||||||
|
<field name="vfolder" type="text" default="images/videos" size="40" label="JW_PLG_AV_LOCAL_VIDEO_FOLDER" description="JW_PLG_AV_THIS_IS_THE_FOLDER_WHERE_YOU_STORE_ALL_THE_VIDEO_FILES_THAT_YOU_WANT_TO_STREAMPLAY_FROM_YOUR_WEBSITE_IT_IS_BETTER_IF_THIS_FOLDER_IS_INSIDE_THE_IMAGESSTORIES_FOLDER_SO_THAT_YOU_WONT_STUMBLE_INTO_ANY_PERMISSION_ISSUES_IN_THIS_LOCAL_VIDEO_FOLDER_YOU_CAN_THEN_UPLOAD_VIDEO_FILES_OF_THE_FOLLOWING_TYPE_FLV_SWF_MOV_MP4_WMV_DIVX" />
|
||||||
|
<field name="vwidth" type="text" default="400" size="4" label="JW_PLG_AV_DEFAULT_WIDTH_IN_PX_FOR_VIDEOS" description="JW_PLG_AV_THE_PRESELECTED_WIDTH_OF_THE_VIDEO_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT_IT_SHOULD_BE_SMALLER_THAN_THE_WIDTH_OF_THE_SURROUNDING_BOX_IF_ANY_IN_ORDER_NOT_TO_BREAK_YOUR_LAYOUT" />
|
||||||
|
<field name="vheight" type="text" default="300" size="4" label="JW_PLG_AV_DEFAULT_HEIGHT_IN_PX_FOR_VIDEOS" description="JW_PLG_AV_THE_PRESELECTED_HEIGHT_OF_THE_VIDEO_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT" />
|
||||||
|
<field name="transparency" type="radio" class="btn-group btn-group-yesno" default="transparent" label="JW_PLG_AV_VIDEO_PLAYER_TRANSPARENCY" description="JW_PLG_AV_VIDEO_PLAYER_TRANSPARENCY_DESC">
|
||||||
|
<option value="opaque">JW_PLG_AV_NO</option>
|
||||||
|
<option value="transparent">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="background" type="text" default="#010101" size="6" label="JW_PLG_AV_VIDEO_PLAYER_BACKGROUND_COLOR" description="JW_PLG_AV_VIDEO_PLAYER_BACKGROUND_COLOR_DESC" />
|
||||||
|
<field name="backgroundQT" type="list" default="black" label="JW_PLG_AV_PLAYER_BACKGROUND_COLOR_FOR_QUICKTIME" description="JW_PLG_AV_PLAYER_BACKGROUND_COLOR_FOR_QUICKTIME_DESC">
|
||||||
|
<option value="black">JW_PLG_AV_BLACK_000000</option>
|
||||||
|
<option value="green">JW_PLG_AV_GREEN_008000</option>
|
||||||
|
<option value="silver">JW_PLG_AV_SILVER_C0C0C0</option>
|
||||||
|
<option value="lime">JW_PLG_AV_LIME_00FF00</option>
|
||||||
|
<option value="gray">JW_PLG_AV_GRAY_808080</option>
|
||||||
|
<option value="olive">JW_PLG_AV_OLIVE_808000</option>
|
||||||
|
<option value="white">JW_PLG_AV_WHITE_FFFFFF</option>
|
||||||
|
<option value="yellow">JW_PLG_AV_YELLOW_FFFF00</option>
|
||||||
|
<option value="maroon">JW_PLG_AV_MAROON_800000</option>
|
||||||
|
<option value="navy">JW_PLG_AV_NAVY_000080</option>
|
||||||
|
<option value="red">JW_PLG_AV_RED_FF0000</option>
|
||||||
|
<option value="blue">JW_PLG_AV_BLUE_0000FF</option>
|
||||||
|
<option value="purple">JW_PLG_AV_PURPLE_800080</option>
|
||||||
|
<option value="teal">JW_PLG_AV_TEAL_008080</option>
|
||||||
|
<option value="fuchsia">JW_PLG_AV_FUCHSIA_FF00FF</option>
|
||||||
|
<option value="aqua">JW_PLG_AV_AQUA_00FFFF</option>
|
||||||
|
</field>
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_AUDIO_PARAMETERS" label="" description="" />
|
||||||
|
<field name="afolder" type="text" default="images/audio" size="40" label="JW_PLG_AV_LOCAL_AUDIO_FOLDER" description="JW_PLG_AV_THIS_IS_THE_FOLDER_WHERE_YOU_STORE_ALL_THE_AUDIO_SOUND_FILES_THAT_YOU_WANT_TO_STREAMPLAY_FROM_YOUR_WEBSITE_IT_IS_BETTER_IF_THIS_FOLDER_IS_INSIDE_THE_IMAGESSTORIES_FOLDER_SO_THAT_YOU_WONT_STUMBLE_INTO_ANY_PERMISSION_ISSUES_IN_THIS_LOCAL_AUDIO_FOLDER_YOU_CAN_THEN_UPLOAD_MP3_AND_WMA_AUDIO_FILE_TYPES" />
|
||||||
|
<field name="awidth" type="text" default="480" size="4" label="JW_PLG_AV_DEFAULT_WIDTH_IN_PX_FOR_AUDIO_PLAYER" description="JW_PLG_AV_THE_PRESELECTED_WIDTH_OF_THE_AUDIO_PLAYER_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT_IT_SHOULD_BE_SMALLER_THAN_THE_WIDTH_OF_THE_SURROUNDING_BOX_IF_ANY_IN_ORDER_NOT_TO_BREAK_YOUR_LAYOUT" />
|
||||||
|
<field name="aheight" type="text" default="24" size="4" label="JW_PLG_AV_DEFAULT_HEIGHT_IN_PX_FOR_AUDIO_PLAYER" description="JW_PLG_AV_THE_PRESELECTED_HEIGHT_OF_THE_AUDIO_PLAYER_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT" />
|
||||||
|
<field name="allowAudioDownloading" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_ALLOW_AUDIO_DOWNLOADING" description="JW_PLG_AV_ALLOW_AUDIO_DOWNLOADING_DESC">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_GLOBAL_PARAMETERS" label="" description="" />
|
||||||
|
<field name="autoplay" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_AUTOPLAY" description="JW_PLG_AV_CONTROL_AUDIOVIDEO_AUTOPLAY_WHEN_THE_PAGE_LOADS">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="loop" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_LOOP" description="JW_PLG_AV_LOOP_DESC">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="ytnocookie" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_YT_NOCOOKIE" description="JW_PLG_AV_YT_NOCOOKIE_DESC">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_JWPLAYER_PARAMETERS" label="" description="" />
|
||||||
|
<field name="controls" type="radio" class="btn-group btn-group-yesno" default="1" label="JW_PLG_AV_JW_PLAYER_CONTROLS" description="">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="jwPlayerLoading" type="radio" class="btn-group btn-group-yesno" default="cdn" label="JW_PLG_AV_JWPLAYER_LOADING" description="JW_PLG_AV_JWPLAYER_LOADING_DESC">
|
||||||
|
<option value="local">JW_PLG_AV_LOCAL</option>
|
||||||
|
<option value="cdn">JW_PLG_AV_CDN</option>
|
||||||
|
</field>
|
||||||
|
<field name="jwPlayerAPIKey" type="text" default="" size="40" label="JW_PLG_AV_JWPLAYER_APIKEY" description="JW_PLG_AV_JWPLAYER_APIKEY_DESC" />
|
||||||
|
<field name="jwPlayerCDNUrl" type="text" default="" size="40" label="JW_PLG_AV_JWPLAYER_CDNURL" description="JW_PLG_AV_JWPLAYER_CDNURL_DESC" />
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_PERFORMANCE_PARAMETERS" label="" description="" />
|
||||||
|
<field name="gzipScripts" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_COMPRESS_PLAYER_JS_SCRIPTS_USING_PHP" description="JW_PLG_AV_IMPROVE_YOUR_SITES_PERFORMANCE_WHEN_USING_ALLVIDEOS_BY_ENABLING_THIS_OPTION_IT_WILL_COMPRESS_AND_COMBINE_THE_JAVASCRIPT_CODE_REQUIRED_BY_THE_VARIOUS_MEDIA_PLAYERS_TO_WORK_PROPERLY_THIS_OPTION_MAY_NOT_BE_SUPPORTED_BY_YOUR_SERVER_SO_IN_CASE_YOU_STUMBLE_ONTO_ANY_ISSUES_YOU_CAN_SAFELY_TURN_IT_BACK_TO_NO">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</config>
|
||||||
|
<!-- Files -->
|
||||||
|
<files folder="plugin" destination="jw_allvideos">
|
||||||
|
<filename plugin="jw_allvideos">jw_allvideos.php</filename>
|
||||||
|
<filename plugin="jw_allvideos">jw_allvideos.xml</filename>
|
||||||
|
<folder>jw_allvideos</folder>
|
||||||
|
</files>
|
||||||
|
<media folder="plugin/media" destination="jw_allvideos">
|
||||||
|
<filename>AllVideos_300x119_24.png</filename>
|
||||||
|
</media>
|
||||||
|
<languages folder="plugin">
|
||||||
|
<language tag="en-GB">language/en-GB/en-GB.plg_content_jw_allvideos.ini</language>
|
||||||
|
<language tag="en-GB">language/en-GB/en-GB.plg_content_jw_allvideos.sys.ini</language>
|
||||||
|
</languages>
|
||||||
|
<updateservers>
|
||||||
|
<server type="extension" priority="1" name="AllVideos">http://cdn.joomlaworks.org/updates/allvideos.xml</server>
|
||||||
|
</updateservers>
|
||||||
|
</extension>
|
||||||
@ -0,0 +1,588 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
jimport('joomla.plugin.plugin');
|
||||||
|
|
||||||
|
class plgContentJw_allvideos extends JPlugin
|
||||||
|
{
|
||||||
|
// JoomlaWorks reference parameters
|
||||||
|
public $plg_name = "jw_allvideos";
|
||||||
|
public $plg_copyrights_start = "\n\n<!-- JoomlaWorks \"AllVideos\" Plugin (v4.8.0) starts here -->\n";
|
||||||
|
public $plg_copyrights_end = "\n<!-- JoomlaWorks \"AllVideos\" Plugin (v4.8.0) ends here -->\n\n";
|
||||||
|
|
||||||
|
public function __construct(&$subject, $params)
|
||||||
|
{
|
||||||
|
parent::__construct($subject, $params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Joomla 1.5
|
||||||
|
public function onPrepareContent(&$row, &$params, $page = 0)
|
||||||
|
{
|
||||||
|
$this->renderAllVideos($row, $params, $page = 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Joomla 2.5+
|
||||||
|
public function onContentPrepare($context, &$row, &$params, $page = 0)
|
||||||
|
{
|
||||||
|
$this->renderAllVideos($row, $params, $page = 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The main function
|
||||||
|
public function renderAllVideos(&$row, &$params, $page = 0)
|
||||||
|
{
|
||||||
|
// API
|
||||||
|
if (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
jimport('joomla.html.parameter');
|
||||||
|
}
|
||||||
|
jimport('joomla.filesystem.file');
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$document = JFactory::getDocument();
|
||||||
|
|
||||||
|
// Assign paths
|
||||||
|
$sitePath = JPATH_SITE;
|
||||||
|
$siteUrl = JURI::root(true);
|
||||||
|
if (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
$pluginLivePath = $siteUrl.'/plugins/content/'.$this->plg_name.'/'.$this->plg_name;
|
||||||
|
} else {
|
||||||
|
$pluginLivePath = $siteUrl.'/plugins/content/'.$this->plg_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if plugin is enabled
|
||||||
|
if (JPluginHelper::isEnabled('content', $this->plg_name)==false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load the plugin language file the proper way
|
||||||
|
JPlugin::loadLanguage('plg_content_'.$this->plg_name, JPATH_ADMINISTRATOR);
|
||||||
|
|
||||||
|
// Includes
|
||||||
|
$tagReplace = array();
|
||||||
|
require_once dirname(__FILE__).'/'.$this->plg_name.'/includes/helper.php';
|
||||||
|
require dirname(__FILE__).'/'.$this->plg_name.'/includes/sources.php';
|
||||||
|
|
||||||
|
// Simple performance check to determine whether plugin should process further
|
||||||
|
$grabTags = strtolower(implode(array_keys($tagReplace), "|"));
|
||||||
|
if (preg_match("~{(".$grabTags.")}~is", $row->text)==false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------- Get plugin parameters -----------------------------------
|
||||||
|
|
||||||
|
// Get plugin info
|
||||||
|
$plugin = JPluginHelper::getPlugin('content', $this->plg_name);
|
||||||
|
|
||||||
|
// Control external parameters and set variable for controlling plugin layout within modules
|
||||||
|
if (!$params) {
|
||||||
|
$params = class_exists('JParameter') ? new JParameter(null) : new JRegistry(null);
|
||||||
|
}
|
||||||
|
if (is_string($params)) {
|
||||||
|
$params = class_exists('JParameter') ? new JParameter($params) : new JRegistry($params);
|
||||||
|
}
|
||||||
|
$parsedInModule = $params->get('parsedInModule');
|
||||||
|
|
||||||
|
$pluginParams = class_exists('JParameter') ? new JParameter($plugin->params) : new JRegistry($plugin->params);
|
||||||
|
|
||||||
|
/* Video Parameters */
|
||||||
|
$playerTemplate = ($params->get('playerTemplate')) ? $params->get('playerTemplate') : $pluginParams->get('playerTemplate', 'Responsive');
|
||||||
|
$vfolder = ($params->get('vfolder')) ? $params->get('vfolder') : $pluginParams->get('vfolder', 'images/stories/videos');
|
||||||
|
$vwidth = ($params->get('vwidth')) ? $params->get('vwidth') : $pluginParams->get('vwidth', 400);
|
||||||
|
$vheight = ($params->get('vheight')) ? $params->get('vheight') : $pluginParams->get('vheight', 300);
|
||||||
|
$transparency = $pluginParams->get('transparency', 'transparent');
|
||||||
|
$background = $pluginParams->get('background', '#010101');
|
||||||
|
$backgroundQT = $pluginParams->get('backgroundQT', 'black');
|
||||||
|
$jwPlayerControls = $pluginParams->get('controls', 1);
|
||||||
|
/* Audio Parameters */
|
||||||
|
$afolder = $pluginParams->get('afolder', 'images/stories/audio');
|
||||||
|
$awidth = ($params->get('awidth')) ? $params->get('awidth') : $pluginParams->get('awidth', 480);
|
||||||
|
$aheight = ($params->get('aheight')) ? $params->get('aheight') : $pluginParams->get('aheight', 24);
|
||||||
|
$allowAudioDownloading = $pluginParams->get('allowAudioDownloading', 0);
|
||||||
|
/* Global Parameters */
|
||||||
|
$autoplay = ($params->get('autoplay')) ? $params->get('autoplay') : $pluginParams->get('autoplay', 0);
|
||||||
|
$loop = ($params->get('loop')) ? $params->get('loop') : $pluginParams->get('loop', 0);
|
||||||
|
$ytnocookie = ($params->get('ytnocookie')) ? $params->get('ytnocookie') : $pluginParams->get('ytnocookie', 0);
|
||||||
|
/* Performance Parameters */
|
||||||
|
$gzipScripts = $pluginParams->get('gzipScripts', 0);
|
||||||
|
/* Advanced */
|
||||||
|
$jwPlayerLoading = $pluginParams->get('jwPlayerLoading', 'cdn'); // local | cdn
|
||||||
|
$jwPlayerAPIKey = $pluginParams->get('jwPlayerAPIKey', 'ABCdeFG123456SeVenABCdeFG123456SeVen==');
|
||||||
|
$jwPlayerCDNUrl = $pluginParams->get('jwPlayerCDNUrl', 'https://content.jwplatform.com/libraries/VudZEfME.js');
|
||||||
|
|
||||||
|
// Variable cleanups for K2
|
||||||
|
if (JRequest::getCmd('format')=='raw') {
|
||||||
|
$this->plg_copyrights_start = '';
|
||||||
|
$this->plg_copyrights_end = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assign the AllVideos helper class
|
||||||
|
$AllVideosHelper = new AllVideosHelper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------- Render the output -----------------------------------
|
||||||
|
|
||||||
|
// Append head includes only when the document is in HTML mode
|
||||||
|
if (JRequest::getCmd('format')=='html' || JRequest::getCmd('format')=='') {
|
||||||
|
// CSS
|
||||||
|
$avCSS = $AllVideosHelper->getTemplatePath($this->plg_name, 'css/template.css', $playerTemplate);
|
||||||
|
$avCSS = $avCSS->http;
|
||||||
|
$document->addStyleSheet($avCSS);
|
||||||
|
|
||||||
|
// JS
|
||||||
|
if (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
JHtml::_('behavior.framework');
|
||||||
|
} else {
|
||||||
|
JHTML::_('behavior.mootools');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($gzipScripts) {
|
||||||
|
$document->addScript($pluginLivePath.'/includes/js/jwp.js.php?v=4.8.0');
|
||||||
|
} else {
|
||||||
|
$document->addScript($pluginLivePath.'/includes/js/behaviour.js?v=4.8.0');
|
||||||
|
$document->addScript($pluginLivePath.'/includes/js/wmvplayer/silverlight.js?v=4.8.0');
|
||||||
|
$document->addScript($pluginLivePath.'/includes/js/wmvplayer/wmvplayer.js?v=4.8.0');
|
||||||
|
$document->addScript($pluginLivePath.'/includes/js/quicktimeplayer/ac_quicktime.js?v=4.8.0');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clappr
|
||||||
|
$document->addScript('https://cdn.jsdelivr.net/gh/clappr/clappr@latest/dist/clappr.min.js');
|
||||||
|
|
||||||
|
// JW Player v7
|
||||||
|
if ($jwPlayerLoading=='local') {
|
||||||
|
$document->addScript($pluginLivePath.'/includes/js/jwplayer/jwplayer.js?v=4.8.0');
|
||||||
|
if (!defined('ALLVIDEOS_JW_PLAYER_KEY')) {
|
||||||
|
define('ALLVIDEOS_JW_PLAYER_KEY', true);
|
||||||
|
$document->addScriptDeclaration('jwplayer.key="'.$jwPlayerAPIKey.'"; /* JW Player API Key */');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$document->addScript($jwPlayerCDNUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loop throught the found tags
|
||||||
|
$tagReplace = array_change_key_case($tagReplace, CASE_LOWER);
|
||||||
|
foreach ($tagReplace as $plg_tag => $value) {
|
||||||
|
$cloned_plg_tag = $plg_tag;
|
||||||
|
$plg_tag = strtolower($plg_tag);
|
||||||
|
|
||||||
|
// expression to search for
|
||||||
|
$regex = "~{".$plg_tag."}.*?{/".$plg_tag."}~is";
|
||||||
|
|
||||||
|
// replacements for content to avoid issues with RegEx
|
||||||
|
$row->text = str_replace('~', '~', $row->text);
|
||||||
|
|
||||||
|
// process tags
|
||||||
|
if (preg_match_all($regex, $row->text, $matches, PREG_PATTERN_ORDER)) {
|
||||||
|
|
||||||
|
// start the replace loop
|
||||||
|
foreach ($matches[0] as $key => $match) {
|
||||||
|
$tagcontent = preg_replace("/{.+?}/", "", $match);
|
||||||
|
$tagcontent = str_replace(array('"','\'','`'), array('"',''','`'), $tagcontent); // Address potential XSS attacks
|
||||||
|
$tagparams = explode('|', $tagcontent);
|
||||||
|
$tagsource = trim(strip_tags($tagparams[0]));
|
||||||
|
|
||||||
|
// Prepare the HTML
|
||||||
|
$output = new JObject;
|
||||||
|
|
||||||
|
// Width/height/source folder split per media type
|
||||||
|
if (in_array($plg_tag, array(
|
||||||
|
'mp3',
|
||||||
|
'mp3remote',
|
||||||
|
'aac',
|
||||||
|
'aacremote',
|
||||||
|
'm4a',
|
||||||
|
'm4aremote',
|
||||||
|
'oga',
|
||||||
|
'ogaremote',
|
||||||
|
'ogg',
|
||||||
|
'oggremote',
|
||||||
|
'wma',
|
||||||
|
'wmaremote',
|
||||||
|
'soundcloud'
|
||||||
|
))) {
|
||||||
|
// Poster frame
|
||||||
|
$posterFramePath = $sitePath.'/'.$afolder;
|
||||||
|
if (JFile::exists($posterFramePath.'/'.$tagsource.'.jpg')) {
|
||||||
|
$output->posterFrame = $siteUrl.'/'.$afolder.'/'.$tagsource.'.jpg';
|
||||||
|
} elseif (JFile::exists($posterFramePath.'/'.$tagsource.'.png')) {
|
||||||
|
$output->posterFrame = $siteUrl.'/'.$afolder.'/'.$tagsource.'.png';
|
||||||
|
} elseif (JFile::exists($posterFramePath.'/'.$tagsource.'.gif')) {
|
||||||
|
$output->posterFrame = $siteUrl.'/'.$afolder.'/'.$tagsource.'.gif';
|
||||||
|
} else {
|
||||||
|
$output->posterFrame = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($output->posterFrame) {
|
||||||
|
$aheight = ($awidth * 9 / 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
$final_awidth = (@$tagparams[1]) ? $tagparams[1] : $awidth;
|
||||||
|
$final_aheight = (@$tagparams[2]) ? $tagparams[2] : $aheight;
|
||||||
|
|
||||||
|
$output->playerWidth = $final_awidth;
|
||||||
|
$output->playerHeight = $final_aheight;
|
||||||
|
$output->folder = $afolder;
|
||||||
|
|
||||||
|
if ($plg_tag=='soundcloud') {
|
||||||
|
if (strpos($tagsource, '/sets/') !== false) {
|
||||||
|
$output->mediaTypeClass = ' avSoundCloudSet';
|
||||||
|
} else {
|
||||||
|
$output->mediaTypeClass = ' avSoundCloudSong';
|
||||||
|
}
|
||||||
|
$output->mediaType = '';
|
||||||
|
} else {
|
||||||
|
$output->mediaTypeClass = ' avAudio';
|
||||||
|
$output->mediaType = 'audio';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($plg_tag, array('mp3','aac','m4a','oga','ogg','wma'))) {
|
||||||
|
$output->source = "$siteUrl/$afolder/$tagsource.$plg_tag";
|
||||||
|
} elseif (in_array($plg_tag, array('mp3remote','aacremote','m4aremote','ogaremote','oggremote','wmaremote'))) {
|
||||||
|
$output->source = $tagsource;
|
||||||
|
} else {
|
||||||
|
$output->source = '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Poster frame
|
||||||
|
$posterFramePath = $sitePath.'/'.$vfolder;
|
||||||
|
if (JFile::exists($posterFramePath.'/'.$tagsource.'.jpg')) {
|
||||||
|
$output->posterFrame = $siteUrl.'/'.$vfolder.'/'.$tagsource.'.jpg';
|
||||||
|
} elseif (JFile::exists($posterFramePath.'/'.$tagsource.'.png')) {
|
||||||
|
$output->posterFrame = $siteUrl.'/'.$vfolder.'/'.$tagsource.'.png';
|
||||||
|
} elseif (JFile::exists($posterFramePath.'/'.$tagsource.'.gif')) {
|
||||||
|
$output->posterFrame = $siteUrl.'/'.$vfolder.'/'.$tagsource.'.gif';
|
||||||
|
} else {
|
||||||
|
$output->posterFrame = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$final_vwidth = (@$tagparams[1]) ? $tagparams[1] : $vwidth;
|
||||||
|
$final_vheight = (@$tagparams[2]) ? $tagparams[2] : $vheight;
|
||||||
|
|
||||||
|
$output->playerWidth = $final_vwidth;
|
||||||
|
$output->playerHeight = $final_vheight;
|
||||||
|
$output->folder = $vfolder;
|
||||||
|
$output->mediaType = 'video';
|
||||||
|
$output->mediaTypeClass = ' avVideo';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Autoplay
|
||||||
|
$final_autoplay = (@$tagparams[3]) ? $tagparams[3] : $autoplay;
|
||||||
|
$final_autoplay = ($final_autoplay) ? 'true' : 'false';
|
||||||
|
|
||||||
|
// Loop
|
||||||
|
$final_loop = (@$tagparams[4]) ? $tagparams[4] : $loop;
|
||||||
|
$final_loop = ($final_loop) ? 'true' : 'false';
|
||||||
|
|
||||||
|
// Special treatment for specific video providers
|
||||||
|
if ($plg_tag=="collegehumor") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = urlencode($tagsource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="dailymotion") {
|
||||||
|
$tagsource = preg_replace("~(http|https):(.+?)dailymotion.com\/video\/~s", "", $tagsource);
|
||||||
|
$tagsourceDailymotion = explode('_', $tagsource);
|
||||||
|
$tagsource = $tagsourceDailymotion[0];
|
||||||
|
if ($final_autoplay=='true') {
|
||||||
|
if (strpos($tagsource, '?')!==false) {
|
||||||
|
$tagsource = $tagsource.'&autoplay=1';
|
||||||
|
} else {
|
||||||
|
$tagsource = $tagsource.'?autoplay=1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="dotsub") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('/view/', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="facebook") {
|
||||||
|
$tagsource = urlencode($tagsource);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="flickr") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = urlencode($tagsource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="funnyordie") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('/videos/', $tagsource);
|
||||||
|
$tagsource = explode('/', $tagsource[1]);
|
||||||
|
$tagsource = $tagsource[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="gloria") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('/video/', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="godtube") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('?v=', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="ku6") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('?vid=', $tagsource);
|
||||||
|
$tagsource = 'https://rbv01.ku6.com/'.$tagsource[1].'.mp4';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="liveleak") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('?i=', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="metacafe") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = str_replace('/watch/', '/embed/', $tagsource);
|
||||||
|
} elseif (is_int($tagsource)) {
|
||||||
|
$tagsource = 'http://www.metacafe.com/embed/'.$tagsource.'/';
|
||||||
|
} else {
|
||||||
|
$tagsource = explode('?i=', $tagsource);
|
||||||
|
$tagsource = 'http://www.metacafe.com/embed/'.$tagsource[1].'/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="myspace") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('/', $tagsource);
|
||||||
|
$tagsource = array_reverse($tagsource);
|
||||||
|
$tagsource = $tagsource[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="rutube") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = urlencode($tagsource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="sapo") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('.pt/', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="twitch") {
|
||||||
|
if (strpos($tagsource, '/videos/')!==false) {
|
||||||
|
// Video
|
||||||
|
$tagsource = explode('/videos/', $tagsource);
|
||||||
|
$tagsource = 'video='.$tagsource[1];
|
||||||
|
} else {
|
||||||
|
// Channel
|
||||||
|
$tagsource = explode('twitch.tv/', $tagsource);
|
||||||
|
$tagsource = 'channel='.$tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="ustream") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('/recorded/', $tagsource);
|
||||||
|
$tagsource = (int) $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="vbox7") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('play:', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="videa") {
|
||||||
|
$tagsource = explode('-', $tagsource);
|
||||||
|
$tagsource = array_reverse($tagsource);
|
||||||
|
$tagsource = $tagsource[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="vimeo") {
|
||||||
|
$tagsource = preg_replace("~(http|https):(.+?)vimeo.com\/~s", "", $tagsource);
|
||||||
|
if (strpos($tagsource, '?')!==false) {
|
||||||
|
$tagsource = $tagsource.'&portrait=0';
|
||||||
|
} else {
|
||||||
|
$tagsource = $tagsource.'?portrait=0';
|
||||||
|
}
|
||||||
|
if ($final_autoplay=='true') {
|
||||||
|
$tagsource = $tagsource.'&autoplay=1';
|
||||||
|
}
|
||||||
|
if ($final_loop=='true') {
|
||||||
|
$tagsource = $tagsource.'&loop=1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="vine") {
|
||||||
|
if (strpos($tagsource, 'http')===false) {
|
||||||
|
$tagsource = 'https://vine.co/v/'.$tagsource;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="youku") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('v_show/id_', $tagsource);
|
||||||
|
$tagsource = explode('.html', $tagsource[1]);
|
||||||
|
$tagsource = $tagsource[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="youmaker") {
|
||||||
|
if (strpos($tagsource, 'http')!==false) {
|
||||||
|
$tagsource = explode('/video/', $tagsource);
|
||||||
|
$tagsource = $tagsource[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($plg_tag=="youtube") {
|
||||||
|
|
||||||
|
// Check the presence of fully pasted URLs
|
||||||
|
if (strpos($tagsource, 'youtube.com')!==false) {
|
||||||
|
$ytQuery = parse_url($tagsource, PHP_URL_QUERY);
|
||||||
|
$ytQuery = str_replace('&', '&', $ytQuery);
|
||||||
|
} elseif (strpos($tagsource, 'youtu.be')!==false) {
|
||||||
|
$ytQuery = explode('youtu.be/', $tagsource);
|
||||||
|
$tagsource = $ytQuery[1];
|
||||||
|
} else {
|
||||||
|
$ytQuery = $tagsource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process string
|
||||||
|
if (strpos($ytQuery, '&')!==false) {
|
||||||
|
$ytQuery = explode('&', $ytQuery);
|
||||||
|
$ytParams = array();
|
||||||
|
foreach ($ytQuery as $ytParam) {
|
||||||
|
$ytParam = explode('=', $ytParam);
|
||||||
|
$ytParams[$ytParam[0]] = $ytParam[1];
|
||||||
|
}
|
||||||
|
if (array_key_exists('v', $ytParams)) {
|
||||||
|
$tagsource = $ytParams['v'];
|
||||||
|
} elseif (array_key_exists('list', $ytParams)) {
|
||||||
|
$tagsource = 'videoseries?list='.$ytParams['list'];
|
||||||
|
}
|
||||||
|
} elseif (strpos($ytQuery, '=')!==false) {
|
||||||
|
$ytQuery = explode('=', $ytQuery);
|
||||||
|
$ytParams = array();
|
||||||
|
$ytParams[$ytQuery[0]] = $ytQuery[1];
|
||||||
|
if (array_key_exists('v', $ytParams)) {
|
||||||
|
$tagsource = $ytParams['v'];
|
||||||
|
} elseif (array_key_exists('list', $ytParams)) {
|
||||||
|
$tagsource = 'videoseries?list='.$ytParams['list'];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (substr($tagsource, 0, 2)=="PL") {
|
||||||
|
$tagsource = 'videoseries?list='.$tagsource;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($tagsource, '?')!==false) {
|
||||||
|
$tagsource = $tagsource.'&rel=0&fs=1&wmode=transparent';
|
||||||
|
} else {
|
||||||
|
$tagsource = $tagsource.'?rel=0&fs=1&wmode=transparent';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Additional playback parameters
|
||||||
|
if ($final_autoplay=='true') {
|
||||||
|
$tagsource = $tagsource.'&autoplay=1';
|
||||||
|
}
|
||||||
|
if ($final_loop=='true') {
|
||||||
|
$tagsource = $tagsource.'&loop=1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Poster frame (remote)
|
||||||
|
$output->posterFrameRemote = substr($tagsource, 0, -3).'jpg';
|
||||||
|
|
||||||
|
// Set a unique ID
|
||||||
|
$output->playerID = 'AVPlayerID_'.$key.'_'.md5($tagsource);
|
||||||
|
|
||||||
|
// Placeholder elements
|
||||||
|
$findAVparams = array(
|
||||||
|
"{SOURCE}",
|
||||||
|
"{SOURCEID}",
|
||||||
|
"{FOLDER}",
|
||||||
|
"{WIDTH}",
|
||||||
|
"{HEIGHT}",
|
||||||
|
"{PLAYER_AUTOPLAY}",
|
||||||
|
"{PLAYER_LOOP}",
|
||||||
|
"{PLAYER_TRANSPARENCY}",
|
||||||
|
"{PLAYER_BACKGROUND}",
|
||||||
|
"{PLAYER_BACKGROUNDQT}",
|
||||||
|
"{JWPLAYER_CONTROLS}",
|
||||||
|
"{SITEURL}",
|
||||||
|
"{SITEURL_ABS}",
|
||||||
|
"{FILE_EXT}",
|
||||||
|
"{FILE_TYPE}",
|
||||||
|
"{PLUGIN_PATH}",
|
||||||
|
"{PLAYER_POSTER_FRAME}",
|
||||||
|
"{PLAYER_POSTER_FRAME_REMOTE}"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Replacement elements
|
||||||
|
$replaceAVparams = array(
|
||||||
|
$tagsource,
|
||||||
|
$output->playerID,
|
||||||
|
$output->folder,
|
||||||
|
$output->playerWidth,
|
||||||
|
$output->playerHeight,
|
||||||
|
$final_autoplay,
|
||||||
|
$final_loop,
|
||||||
|
$transparency,
|
||||||
|
$background,
|
||||||
|
$backgroundQT,
|
||||||
|
$jwPlayerControls,
|
||||||
|
$siteUrl,
|
||||||
|
substr(JURI::root(false), 0, -1),
|
||||||
|
$plg_tag,
|
||||||
|
str_replace("remote", "", $plg_tag),
|
||||||
|
$pluginLivePath,
|
||||||
|
$output->posterFrame,
|
||||||
|
$output->posterFrameRemote
|
||||||
|
);
|
||||||
|
|
||||||
|
// Do the element replace
|
||||||
|
$output->player = str_replace($findAVparams, $replaceAVparams, $tagReplace[$cloned_plg_tag]);
|
||||||
|
|
||||||
|
// Post processing
|
||||||
|
// For YouTube
|
||||||
|
if ($ytnocookie) {
|
||||||
|
$output->player = str_replace('www.youtube.com/embed', 'www.youtube-nocookie.com/embed', $output->player);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fetch the template
|
||||||
|
ob_start();
|
||||||
|
$getTemplatePath = $AllVideosHelper->getTemplatePath($this->plg_name, 'default.php', $playerTemplate);
|
||||||
|
$getTemplatePath = $getTemplatePath->file;
|
||||||
|
include($getTemplatePath);
|
||||||
|
$getTemplate = $this->plg_copyrights_start.ob_get_contents().$this->plg_copyrights_end;
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
// Output
|
||||||
|
$row->text = preg_replace("~{".$plg_tag."}".preg_quote($tagcontent)."{/".$plg_tag."}~is", $getTemplate, $row->text);
|
||||||
|
} // End second foreach
|
||||||
|
} // End if
|
||||||
|
} // End first foreach
|
||||||
|
} // End function
|
||||||
|
} // End class
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<extension version="2.5" type="plugin" group="content" method="upgrade">
|
||||||
|
<name>AllVideos (by JoomlaWorks)</name>
|
||||||
|
<author>JoomlaWorks</author>
|
||||||
|
<authorEmail>please-use-the-contact-form@joomlaworks.net</authorEmail>
|
||||||
|
<authorUrl>www.joomlaworks.net</authorUrl>
|
||||||
|
<copyright>Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.</copyright>
|
||||||
|
<creationDate>October 9th, 2017</creationDate>
|
||||||
|
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||||
|
<version>4.8.0</version>
|
||||||
|
<description>JW_PLG_AV_XML_DESC</description>
|
||||||
|
<!-- Parameters -->
|
||||||
|
<config>
|
||||||
|
<fields name="params">
|
||||||
|
<fieldset name="basic" addfieldpath="/plugins/content/jw_allvideos/jw_allvideos/includes/elements">
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_VIDEO_PARAMETERS" label="" description="" />
|
||||||
|
<field name="playerTemplate" type="template" directory="/plugins/content/jw_allvideos/jw_allvideos/tmpl" default="Responsive" hide_default="1" hide_none="1" label="JW_PLG_AV_TEMPLATE" description="JW_PLG_AV_TEMPLATE_DESC" />
|
||||||
|
<field name="vfolder" type="text" default="images/videos" size="40" label="JW_PLG_AV_LOCAL_VIDEO_FOLDER" description="JW_PLG_AV_THIS_IS_THE_FOLDER_WHERE_YOU_STORE_ALL_THE_VIDEO_FILES_THAT_YOU_WANT_TO_STREAMPLAY_FROM_YOUR_WEBSITE_IT_IS_BETTER_IF_THIS_FOLDER_IS_INSIDE_THE_IMAGESSTORIES_FOLDER_SO_THAT_YOU_WONT_STUMBLE_INTO_ANY_PERMISSION_ISSUES_IN_THIS_LOCAL_VIDEO_FOLDER_YOU_CAN_THEN_UPLOAD_VIDEO_FILES_OF_THE_FOLLOWING_TYPE_FLV_SWF_MOV_MP4_WMV_DIVX" />
|
||||||
|
<field name="vwidth" type="text" default="400" size="4" label="JW_PLG_AV_DEFAULT_WIDTH_IN_PX_FOR_VIDEOS" description="JW_PLG_AV_THE_PRESELECTED_WIDTH_OF_THE_VIDEO_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT_IT_SHOULD_BE_SMALLER_THAN_THE_WIDTH_OF_THE_SURROUNDING_BOX_IF_ANY_IN_ORDER_NOT_TO_BREAK_YOUR_LAYOUT" />
|
||||||
|
<field name="vheight" type="text" default="300" size="4" label="JW_PLG_AV_DEFAULT_HEIGHT_IN_PX_FOR_VIDEOS" description="JW_PLG_AV_THE_PRESELECTED_HEIGHT_OF_THE_VIDEO_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT" />
|
||||||
|
<field name="transparency" type="radio" class="btn-group btn-group-yesno" default="transparent" label="JW_PLG_AV_VIDEO_PLAYER_TRANSPARENCY" description="JW_PLG_AV_VIDEO_PLAYER_TRANSPARENCY_DESC">
|
||||||
|
<option value="opaque">JW_PLG_AV_NO</option>
|
||||||
|
<option value="transparent">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="background" type="text" default="#010101" size="6" label="JW_PLG_AV_VIDEO_PLAYER_BACKGROUND_COLOR" description="JW_PLG_AV_VIDEO_PLAYER_BACKGROUND_COLOR_DESC" />
|
||||||
|
<field name="backgroundQT" type="list" default="black" label="JW_PLG_AV_PLAYER_BACKGROUND_COLOR_FOR_QUICKTIME" description="JW_PLG_AV_PLAYER_BACKGROUND_COLOR_FOR_QUICKTIME_DESC">
|
||||||
|
<option value="black">JW_PLG_AV_BLACK_000000</option>
|
||||||
|
<option value="green">JW_PLG_AV_GREEN_008000</option>
|
||||||
|
<option value="silver">JW_PLG_AV_SILVER_C0C0C0</option>
|
||||||
|
<option value="lime">JW_PLG_AV_LIME_00FF00</option>
|
||||||
|
<option value="gray">JW_PLG_AV_GRAY_808080</option>
|
||||||
|
<option value="olive">JW_PLG_AV_OLIVE_808000</option>
|
||||||
|
<option value="white">JW_PLG_AV_WHITE_FFFFFF</option>
|
||||||
|
<option value="yellow">JW_PLG_AV_YELLOW_FFFF00</option>
|
||||||
|
<option value="maroon">JW_PLG_AV_MAROON_800000</option>
|
||||||
|
<option value="navy">JW_PLG_AV_NAVY_000080</option>
|
||||||
|
<option value="red">JW_PLG_AV_RED_FF0000</option>
|
||||||
|
<option value="blue">JW_PLG_AV_BLUE_0000FF</option>
|
||||||
|
<option value="purple">JW_PLG_AV_PURPLE_800080</option>
|
||||||
|
<option value="teal">JW_PLG_AV_TEAL_008080</option>
|
||||||
|
<option value="fuchsia">JW_PLG_AV_FUCHSIA_FF00FF</option>
|
||||||
|
<option value="aqua">JW_PLG_AV_AQUA_00FFFF</option>
|
||||||
|
</field>
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_AUDIO_PARAMETERS" label="" description="" />
|
||||||
|
<field name="afolder" type="text" default="images/audio" size="40" label="JW_PLG_AV_LOCAL_AUDIO_FOLDER" description="JW_PLG_AV_THIS_IS_THE_FOLDER_WHERE_YOU_STORE_ALL_THE_AUDIO_SOUND_FILES_THAT_YOU_WANT_TO_STREAMPLAY_FROM_YOUR_WEBSITE_IT_IS_BETTER_IF_THIS_FOLDER_IS_INSIDE_THE_IMAGESSTORIES_FOLDER_SO_THAT_YOU_WONT_STUMBLE_INTO_ANY_PERMISSION_ISSUES_IN_THIS_LOCAL_AUDIO_FOLDER_YOU_CAN_THEN_UPLOAD_MP3_AND_WMA_AUDIO_FILE_TYPES" />
|
||||||
|
<field name="awidth" type="text" default="480" size="4" label="JW_PLG_AV_DEFAULT_WIDTH_IN_PX_FOR_AUDIO_PLAYER" description="JW_PLG_AV_THE_PRESELECTED_WIDTH_OF_THE_AUDIO_PLAYER_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT_IT_SHOULD_BE_SMALLER_THAN_THE_WIDTH_OF_THE_SURROUNDING_BOX_IF_ANY_IN_ORDER_NOT_TO_BREAK_YOUR_LAYOUT" />
|
||||||
|
<field name="aheight" type="text" default="24" size="4" label="JW_PLG_AV_DEFAULT_HEIGHT_IN_PX_FOR_AUDIO_PLAYER" description="JW_PLG_AV_THE_PRESELECTED_HEIGHT_OF_THE_AUDIO_PLAYER_IN_PIXELS_TO_SHOW_INSIDE_YOUR_CONTENT" />
|
||||||
|
<field name="allowAudioDownloading" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_ALLOW_AUDIO_DOWNLOADING" description="JW_PLG_AV_ALLOW_AUDIO_DOWNLOADING_DESC">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_GLOBAL_PARAMETERS" label="" description="" />
|
||||||
|
<field name="autoplay" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_AUTOPLAY" description="JW_PLG_AV_CONTROL_AUDIOVIDEO_AUTOPLAY_WHEN_THE_PAGE_LOADS">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="loop" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_LOOP" description="JW_PLG_AV_LOOP_DESC">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="ytnocookie" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_YT_NOCOOKIE" description="JW_PLG_AV_YT_NOCOOKIE_DESC">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_JWPLAYER_PARAMETERS" label="" description="" />
|
||||||
|
<field name="controls" type="radio" class="btn-group btn-group-yesno" default="1" label="JW_PLG_AV_JW_PLAYER_CONTROLS" description="">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
<field name="jwPlayerLoading" type="radio" class="btn-group btn-group-yesno" default="cdn" label="JW_PLG_AV_JWPLAYER_LOADING" description="JW_PLG_AV_JWPLAYER_LOADING_DESC">
|
||||||
|
<option value="local">JW_PLG_AV_LOCAL</option>
|
||||||
|
<option value="cdn">JW_PLG_AV_CDN</option>
|
||||||
|
</field>
|
||||||
|
<field name="jwPlayerAPIKey" type="text" default="" size="40" label="JW_PLG_AV_JWPLAYER_APIKEY" description="JW_PLG_AV_JWPLAYER_APIKEY_DESC" />
|
||||||
|
<field name="jwPlayerCDNUrl" type="text" default="" size="40" label="JW_PLG_AV_JWPLAYER_CDNURL" description="JW_PLG_AV_JWPLAYER_CDNURL_DESC" />
|
||||||
|
<field name="" type="header" default="JW_PLG_AV_PERFORMANCE_PARAMETERS" label="" description="" />
|
||||||
|
<field name="gzipScripts" type="radio" class="btn-group btn-group-yesno" default="0" label="JW_PLG_AV_COMPRESS_PLAYER_JS_SCRIPTS_USING_PHP" description="JW_PLG_AV_IMPROVE_YOUR_SITES_PERFORMANCE_WHEN_USING_ALLVIDEOS_BY_ENABLING_THIS_OPTION_IT_WILL_COMPRESS_AND_COMBINE_THE_JAVASCRIPT_CODE_REQUIRED_BY_THE_VARIOUS_MEDIA_PLAYERS_TO_WORK_PROPERLY_THIS_OPTION_MAY_NOT_BE_SUPPORTED_BY_YOUR_SERVER_SO_IN_CASE_YOU_STUMBLE_ONTO_ANY_ISSUES_YOU_CAN_SAFELY_TURN_IT_BACK_TO_NO">
|
||||||
|
<option value="0">JW_PLG_AV_NO</option>
|
||||||
|
<option value="1">JW_PLG_AV_YES</option>
|
||||||
|
</field>
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</config>
|
||||||
|
<!-- Files -->
|
||||||
|
<files folder="plugin" destination="jw_allvideos">
|
||||||
|
<filename plugin="jw_allvideos">jw_allvideos.php</filename>
|
||||||
|
<filename plugin="jw_allvideos">jw_allvideos.xml</filename>
|
||||||
|
<folder>jw_allvideos</folder>
|
||||||
|
</files>
|
||||||
|
<media folder="plugin/media" destination="jw_allvideos">
|
||||||
|
<filename>AllVideos_300x119_24.png</filename>
|
||||||
|
</media>
|
||||||
|
<languages folder="plugin">
|
||||||
|
<language tag="en-GB">language/en-GB/en-GB.plg_content_jw_allvideos.ini</language>
|
||||||
|
<language tag="en-GB">language/en-GB/en-GB.plg_content_jw_allvideos.sys.ini</language>
|
||||||
|
</languages>
|
||||||
|
<updateservers>
|
||||||
|
<server type="extension" priority="1" name="AllVideos">http://cdn.joomlaworks.org/updates/allvideos.xml</server>
|
||||||
|
</updateservers>
|
||||||
|
</extension>
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
if (version_compare(JVERSION, '3.5.0', 'ge')) {
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
class JWElement extends JFormField
|
||||||
|
{
|
||||||
|
public function getInput()
|
||||||
|
{
|
||||||
|
return $this->fetchElement($this->name, $this->value, $this->element, $this->options['control']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabel()
|
||||||
|
{
|
||||||
|
if (method_exists($this, 'fetchTooltip')) {
|
||||||
|
return $this->fetchTooltip($this->element['label'], $this->description, $this->element, $this->options['control'], $this->element['name'] = '');
|
||||||
|
} else {
|
||||||
|
return parent::getLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render($layoutId, $data = array())
|
||||||
|
{
|
||||||
|
return $this->getInput();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
class JWElement extends JFormField
|
||||||
|
{
|
||||||
|
public function getInput()
|
||||||
|
{
|
||||||
|
return $this->fetchElement($this->name, $this->value, $this->element, $this->options['control']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabel()
|
||||||
|
{
|
||||||
|
if (method_exists($this, 'fetchTooltip')) {
|
||||||
|
return $this->fetchTooltip($this->element['label'], $this->description, $this->element, $this->options['control'], $this->element['name'] = '');
|
||||||
|
} else {
|
||||||
|
return parent::getLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return $this->getInput();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
jimport('joomla.html.parameter.element');
|
||||||
|
class JWElement extends JElement
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
.jwHeaderClr { line-height: 0; float: none; clear: both; height: 0; margin: 0; padding: 0; border: none; background: none; }
|
||||||
|
.jwHeaderContainer { font-size: 12px; font-weight: bold; clear: both; width: auto; margin: 12px 0 4px; padding: 0; color: #369; border-bottom: 2px solid #96b0cb; background: #d5e7fa; }
|
||||||
|
.jwHeaderContainer15 { font-size: 12px; font-weight: bold; float: left; clear: both; width: 100%; margin: 0; padding: 0; color: #369; border-bottom: 2px solid #96b0cb; background: #d5e7fa; }
|
||||||
|
.jwHeaderContent { padding: 6px 8px; }
|
||||||
|
@media all and (min-width:771px) {
|
||||||
|
.form-horizontal .span9 .control-label { width: 30% !important; }
|
||||||
|
.form-horizontal .span9 .controls { margin-left: 32% !important; }
|
||||||
|
}
|
||||||
|
@media all and (min-width:481px) and (max-width:770px) {
|
||||||
|
.form-horizontal .span9 .control-label { width: 45% !important; }
|
||||||
|
.form-horizontal .span9 .controls { margin-left: 47% !important; }
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
require_once dirname(__FILE__).'/base.php';
|
||||||
|
|
||||||
|
class JWElementHeader extends JWElement
|
||||||
|
{
|
||||||
|
public function fetchElement($name, $value, &$node, $control_name)
|
||||||
|
{
|
||||||
|
$plg_name = "jw_allvideos";
|
||||||
|
if (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
$pluginLivePath = JURI::root(true).'/plugins/content/'.$plg_name.'/'.$plg_name;
|
||||||
|
} else {
|
||||||
|
$pluginLivePath = JURI::root(true).'/plugins/content/'.$plg_name;
|
||||||
|
}
|
||||||
|
$document = JFactory::getDocument();
|
||||||
|
$document->addStyleSheet($pluginLivePath.'/includes/elements/header.css');
|
||||||
|
|
||||||
|
$cssClass = '';
|
||||||
|
if (version_compare(JVERSION, '1.6.0', 'lt')) {
|
||||||
|
$cssClass = '15';
|
||||||
|
}
|
||||||
|
return '<div class="jwHeaderContainer'.$cssClass.'"><div class="jwHeaderContent">'.JText::_($value).'</div><div class="jwHeaderClr"></div></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fetchTooltip($label, $description, &$node, $control_name, $name)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class JFormFieldHeader extends JWElementHeader
|
||||||
|
{
|
||||||
|
public $type = 'header';
|
||||||
|
}
|
||||||
|
|
||||||
|
class JElementHeader extends JWElementHeader
|
||||||
|
{
|
||||||
|
public $_name = 'header';
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
require_once dirname(__FILE__).'/base.php';
|
||||||
|
|
||||||
|
class JWElementTemplate extends JWElement
|
||||||
|
{
|
||||||
|
public function fetchElement($name, $value, &$node, $control_name)
|
||||||
|
{
|
||||||
|
jimport('joomla.filesystem.folder');
|
||||||
|
$plgTemplatesPath = version_compare(JVERSION, '2.5.0', 'ge') ? JPATH_SITE.'/plugins/content/jw_allvideos/jw_allvideos/tmpl' : JPATH_SITE.'/plugins/content/jw_allvideos/tmpl';
|
||||||
|
$plgTemplatesFolders = JFolder::folders($plgTemplatesPath);
|
||||||
|
$db = JFactory::getDBO();
|
||||||
|
if (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
$query = "SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1";
|
||||||
|
} else {
|
||||||
|
$query = "SELECT template FROM #__templates_menu WHERE client_id = 0 AND menuid = 0";
|
||||||
|
}
|
||||||
|
$db->setQuery($query);
|
||||||
|
$template = $db->loadResult();
|
||||||
|
$templatePath = JPATH_SITE.'/templates/'.$template.'/html/jw_allvideos';
|
||||||
|
if (JFolder::exists($templatePath)) {
|
||||||
|
$templateFolders = JFolder::folders($templatePath);
|
||||||
|
$folders = @array_merge($templateFolders, $plgTemplatesFolders);
|
||||||
|
$folders = @array_unique($folders);
|
||||||
|
} else {
|
||||||
|
$folders = $plgTemplatesFolders;
|
||||||
|
}
|
||||||
|
sort($folders);
|
||||||
|
$options = array();
|
||||||
|
foreach ($folders as $folder) {
|
||||||
|
$options[] = JHTML::_('select.option', $folder, $folder);
|
||||||
|
}
|
||||||
|
$fieldName = version_compare(JVERSION, '2.5.0', 'ge') ? $name : $control_name.'['.$name.']';
|
||||||
|
return JHTML::_('select.genericlist', $options, $fieldName, '', 'value', 'text', $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class JFormFieldTemplate extends JWElementTemplate
|
||||||
|
{
|
||||||
|
public $type = 'template';
|
||||||
|
}
|
||||||
|
|
||||||
|
class JElementTemplate extends JWElementTemplate
|
||||||
|
{
|
||||||
|
public $_name = 'template';
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
class AllVideosHelper
|
||||||
|
{
|
||||||
|
// Path overrides
|
||||||
|
public static function getTemplatePath($pluginName, $file, $tmpl)
|
||||||
|
{
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$p = new JObject;
|
||||||
|
$pluginGroup = 'content';
|
||||||
|
|
||||||
|
if (file_exists(JPATH_SITE.'/'.'templates'.'/'.$app->getTemplate().'/html/'.$pluginName.'/'.$tmpl.'/'.$file)) {
|
||||||
|
$p->file = JPATH_SITE.'/templates/'.$app->getTemplate().'/html/'.$pluginName.'/'.$tmpl.'/'.$file;
|
||||||
|
$p->http = JURI::root(true)."/templates/".$app->getTemplate()."/html/{$pluginName}/{$tmpl}/{$file}";
|
||||||
|
} else {
|
||||||
|
if (version_compare(JVERSION, '2.5.0', 'ge')) {
|
||||||
|
// Joomla 2.5 or newer
|
||||||
|
$p->file = JPATH_SITE.'/plugins/'.$pluginGroup.'/'.$pluginName.'/'.$pluginName.'/tmpl/'.$tmpl.'/'.$file;
|
||||||
|
$p->http = JURI::root(true)."/plugins/{$pluginGroup}/{$pluginName}/{$pluginName}/tmpl/{$tmpl}/{$file}";
|
||||||
|
} else {
|
||||||
|
// Joomla 1.5
|
||||||
|
$p->file = JPATH_SITE.'/plugins/'.$pluginGroup.'/'.$pluginName.'/tmpl/'.$tmpl.'/'.$file;
|
||||||
|
$p->http = JURI::root(true)."/plugins/{$pluginGroup}/{$pluginName}/tmpl/{$tmpl}/{$file}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $p;
|
||||||
|
}
|
||||||
|
} // end class
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
var allvideos = {
|
||||||
|
ready: function(cb) {
|
||||||
|
/in/.test(document.readyState) ? setTimeout('allvideos.ready(' + cb + ')', 9) : cb();
|
||||||
|
},
|
||||||
|
|
||||||
|
getRemoteJson: function(url) {
|
||||||
|
var remoteJsonScript = document.createElement('script');
|
||||||
|
remoteJsonScript.setAttribute('charset', 'utf-8');
|
||||||
|
remoteJsonScript.setAttribute('type', 'text/javascript');
|
||||||
|
remoteJsonScript.setAttribute('async', 'true');
|
||||||
|
remoteJsonScript.setAttribute('src', url);
|
||||||
|
return remoteJsonScript;
|
||||||
|
},
|
||||||
|
|
||||||
|
embed: function(el) {
|
||||||
|
var jsonpCallback = el.callback;
|
||||||
|
var tempId = Math.floor(Math.random() * 1000) + 1;
|
||||||
|
var responseContainer = [];
|
||||||
|
window[jsonpCallback] = function(response) {
|
||||||
|
responseContainer.tempId = [response];
|
||||||
|
};
|
||||||
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
var jsonp = this.getRemoteJson(el.url);
|
||||||
|
jsonp.onloadDone = false;
|
||||||
|
jsonp.onload = function() {
|
||||||
|
if (!jsonp.onloadDone) {
|
||||||
|
jsonp.onloadDone = true;
|
||||||
|
document.getElementById(el.playerID).innerHTML = responseContainer.tempId[0].html;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
jsonp.onreadystatechange = function() {
|
||||||
|
if (("loaded" === jsonp.readyState || "complete" === jsonp.readyState) && !jsonp.onloadDone) {
|
||||||
|
jsonp.onloadDone = true;
|
||||||
|
document.getElementById(el.playerID).innerHTML = responseContainer.tempId[0].html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
head.appendChild(jsonp);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
$expires = 24; // Time in hours to cache this file
|
||||||
|
|
||||||
|
ob_start("ob_gzhandler");
|
||||||
|
|
||||||
|
// Includes
|
||||||
|
echo "/* behaviour.js */\n";
|
||||||
|
include(dirname(__FILE__)."/behaviour.js");
|
||||||
|
echo "/* silverlight.js */\n";
|
||||||
|
include(dirname(__FILE__)."/wmvplayer/silverlight.js");
|
||||||
|
echo "\n\n";
|
||||||
|
echo "/* wmvplayer.js */\n";
|
||||||
|
include(dirname(__FILE__)."/wmvplayer/wmvplayer.js");
|
||||||
|
echo "\n\n";
|
||||||
|
echo "/* ac_quicktime.js */\n";
|
||||||
|
include(dirname(__FILE__)."/quicktimeplayer/ac_quicktime.js");
|
||||||
|
echo "\n\n";
|
||||||
|
|
||||||
|
$bufferSize = ob_get_length(); // Required to close the connection
|
||||||
|
|
||||||
|
header("Content-type: text/javascript; charset=utf-8");
|
||||||
|
header("Cache-Control: max-age=".($expires*3600));
|
||||||
|
header("Expires: ".gmdate("D, d M Y H:i:s", time() + ($expires*3600))." GMT");
|
||||||
|
header("Content-Length: $bufferSize");
|
||||||
|
header("Connection: close");
|
||||||
|
|
||||||
|
ob_end_flush();
|
||||||
|
ob_flush();
|
||||||
|
flush();
|
||||||
@ -0,0 +1,131 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>README: JW Player</title>
|
||||||
|
<style>
|
||||||
|
body { padding: 50px 100px; width: 700px; font: 13px/20px Arial; background: #FFF; }
|
||||||
|
a, h1, h2 { color: #369; }
|
||||||
|
h2 { margin-top: 50px; }
|
||||||
|
pre { font-size: 12px; background:#E5F3C8; padding:5px 10px; border: 1px solid #D3EAA4; }
|
||||||
|
dt { font-weight: bold; }
|
||||||
|
</style>
|
||||||
|
</head><body>
|
||||||
|
|
||||||
|
<h1>README: JW Player</h1>
|
||||||
|
|
||||||
|
<p>Thank you for downloading JW Player 6, the world's most popular HTML5/Flash video player! See <a href="http://www.longtailvideo.com/support/jw-player/28832/about-jw-player">About JW Player</a> for an overview of supported browsers/devices, as well as a more detailed feature list. See the <a href="http://www.longtailvideo.com/support/jw-player/28835/release-notes">Release Notes</a> if you want to learn what changed with this latest release.</p>
|
||||||
|
|
||||||
|
<h2>Quick Start</h2>
|
||||||
|
|
||||||
|
<p>Copy the <strong>jwplayer</strong> folder that contains this README to the www root of your website. Next, include the <em>jwplayer.js</em> script in the <head> of your HTML page.</p>
|
||||||
|
|
||||||
|
<p>If you have purchased the <a href="http://www.longtailvideo.com/jw-player/pricing/">Pro, Premium or Ads edition</a> of JW Player, its features can be activated by inserting your server-less JW Player license key in the second line:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
|
||||||
|
<script type="text/javascript">jwplayer.key="ABCDEFGHIJKLMOPQ";</script>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Note: A key is not required to use the Free edition, but will still be available from your <a href="https://account.longtailvideo.com/">JW Player Account</a>. Including your key will enable the free <a href="http://www.longtailvideo.com/support/jw-player/28852/using-jw-player-analytics">JW Player Analytics</a> for your account.</p>
|
||||||
|
|
||||||
|
<h3>Embed Code</h3>
|
||||||
|
|
||||||
|
<p>When the script and key are set, scroll down to the <body> of your HTML page and insert the JW Player embed code at the place you want your video to appear:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<div id="myElement">Loading the player...</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
jwplayer("myElement").setup({
|
||||||
|
file: "/uploads/myVideo.mp4",
|
||||||
|
image: "/uploads/myPoster.jpg"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>See <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player">Embedding JW Player</a> for a more elaborate description of options and some example embeds.</p>
|
||||||
|
|
||||||
|
<p><em>Note two very common issues prevent smooth video playback in Internet Explorer 9/10. First, you need to set <strong><!DOCTYPE html></strong> to prevent triggering IE's compatibility mode. Second, your videos must be served with the <strong>video/mp4</strong> mimetype. Not doing so will cause IE not to play them. See our <a href="http://www.longtailvideo.com/support/jw-player/28840/troubleshooting-your-setup">troubleshooting guide</a> for more common issues.</em></p>
|
||||||
|
|
||||||
|
<h3>Premium Skins</h3>
|
||||||
|
|
||||||
|
<p>If you have purchased the Premium or Ads edition of the player, your player includes a set of Premium skins. These skins can be downloaded from your <a href="https://account.longtailvideo.com/">JW Player Account</a>, but you can also load them off our CDN by simply inserting the skin name:</p>
|
||||||
|
<pre> skin: "bekle"</pre>
|
||||||
|
|
||||||
|
<p>See <a href="http://www.longtailvideo.com/support/jw-player/28846/using-jw-player-skins">Using JW Player Skins</a> for more info.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Documentation</h2>
|
||||||
|
|
||||||
|
<p>If you need help, the LongTail Support Community contains a wealth of information, including guides on:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Supported <a href="http://www.longtailvideo.com/support/jw-player/28836/media-format-support">Media Formats</a> and <a href="http://www.longtailvideo.com/support/jw-player/28837/browser-device-support">Browsers & Devices</a>.</li>
|
||||||
|
<li> How to <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player">Customize</a> and <a href="http://www.longtailvideo.com/support/jw-player/28840/troubleshooting-your-setup">Troubleshoot</a> your embeds.</li>
|
||||||
|
<li>Configuring <a href="http://www.longtailvideo.com/support/jw-player/28842/working-with-playlists">Inline Playlists</a> or <a href="http://www.longtailvideo.com/support/jw-player/28843/loading-rss-feeds">RSS Feeds</a> (with multiple formats/qualities).</li>
|
||||||
|
<li>The <a href="http://www.longtailvideo.com/support/jw-player/28846/using-jw-player-skins">PNG Skinning Model</a> and <a href="http://www.longtailvideo.com/support/jw-player/28850/using-the-javascript-api">JavaScript API</a>.</li>
|
||||||
|
<li>Using <a href="http://www.longtailvideo.com/support/jw-player/28854/using-rtmp-streaming">RTMP Streaming</a> and <a href="http://www.longtailvideo.com/support/jw-player/28856/using-apple-hls-streaming/">Apple HLS</a> (Premium/Ads edition only).</li>
|
||||||
|
<li>How to <a href="http://www.longtailvideo.com/support/jw-player/28862/configuring-video-ads">Configure Video Ads</a> (Ads edition only).</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Visit our <a href="http://www.longtailvideo.com/support/forums/jw-player/">Support Forums</a> for setup problems, bug reports or suggestions for new features or enhancements. The forums are very active and frequently visited by members of the JW Player development team. Please see your <a href="http://account.longtailvideo.com">JW Player Account</a> for more information on obtaining technical support.</p>
|
||||||
|
|
||||||
|
<p>Follow the <a href="http://www.longtailvideo.com/blog/">LongTail Video Blog</a> for news on the JW Player and online video in general. We frequently publish posts on topics such as HTML5, video SEO, H.264, VAST advertising, etc. You can also <a href="http://twitter.com/longtailvideo">follow us on Twitter</a> or <a href="http://www.facebook.com/longtailvideo">like us on Facebook</a> to stay connected.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Licensing</h2>
|
||||||
|
|
||||||
|
<p>Please be aware that each player edition has its own license:</p>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>JW Player Free</dt>
|
||||||
|
<dd>Under the terms of our <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons license</a>, you can use, modify and redistribute the player for non-commercial purposes only.
|
||||||
|
Commercial sites must <a href=" http://www.longtailvideo.com/jw-player/pricing/">purchase a license</a> for the <strong>Pro</strong>, <strong>Premium</strong> or <strong>Ads</strong> editions. See the <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">JW Player 6 License</a> for further details.</dd>
|
||||||
|
<dt>JW Player Pro</dt>
|
||||||
|
<dd>
|
||||||
|
Under the terms of our <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">Commercial License</a>, you can deploy your copy of JW Player <strong>Pro</strong> for commercial use on 1 domain. See our <a href="http://www.longtailvideo.com/jw-player/pricing/">pricing page</a> for more information on edition features and pricing.
|
||||||
|
</dd>
|
||||||
|
<dt>JW Player Premium</dt>
|
||||||
|
<dd>
|
||||||
|
Under the terms of our <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">Commercial License</a>, you can deploy your copy of JW Player <strong>Premium</strong> for commercial use on up to 10 domains. See our <a href="http://www.longtailvideo.com/jw-player/pricing/">pricing page</a> for more information on edition features and pricing.
|
||||||
|
</dd>
|
||||||
|
<dt>JW Player Ads</dt>
|
||||||
|
<dd>
|
||||||
|
Under the terms of our <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">Commercial License</a>, you can deploy your copy of JW Player <strong>Ads</strong> for commercial use on up to 10 domains, with an additional restriction of up to 250.000 filled ad impressions per month. See our <a href="http://www.longtailvideo.com/jw-player/pricing/">pricing page</a> for more information on edition features and price.</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<p>Examples of <strong>commercial use</strong> includes websites with any advertisements, websites owned or operated by businesses, websites designed to promote products or services, and tools (e.g. a CMS) that bundle JW Player in their offering.</p>
|
||||||
|
|
||||||
|
<p>Note all editions of JW Player incorporate the <a href="http://www.movable-type.co.uk/scripts/tea-block.html">Block TEA library</a> from Movable Type (CC-BY license).</p>
|
||||||
|
|
||||||
|
<p>The player also makes use of the <a href="http://underscorejs.org/">Underscore.js</a> library, which is distributed under the following terms:</p>
|
||||||
|
|
||||||
|
<pre>Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative
|
||||||
|
Reporters & Editors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
webpackJsonpjwplayer([12],{56:function(r,o,t){var e,n;e=[],n=function(){function r(r){this.message=r}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.name="InvalidCharacterError",window.btoa||(window.btoa=function(t){for(var e,n,a=String(t),i=0,c=o,d="";a.charAt(0|i)||(c="=",i%1);d+=c.charAt(63&e>>8-i%1*8)){if(n=a.charCodeAt(i+=.75),n>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return d}),window.atob||(window.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4===1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,c=0,d="";a=e.charAt(c++);~a&&(n=i%4?64*n+a:a,i++%4)?d+=String.fromCharCode(255&n>>(-2*i&6)):0)a=o.indexOf(a);return d})}.apply(o,e),!(void 0!==n&&(r.exports=n))}});
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
webpackJsonpjwplayer([11],{57:function(t,n,e){var o,r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};o=[e(1)],r=function(t){function n(t,n){return function(){t.apply(n,arguments)}}function e(t){if("object"!==i(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,n(r,this),n(f,this))}function o(t){var n=this;return null===this._state?void this._deferreds.push(t):void s(function(){var e=n._state?t.onFulfilled:t.onRejected;if(null===e)return void(n._state?t.resolve:t.reject)(n._value);var o;try{o=e(n._value)}catch(r){return void t.reject(r)}t.resolve(o)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===("undefined"==typeof t?"undefined":i(t))||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void l(n(e,t),n(r,this),n(f,this))}this._state=!0,this._value=t,u.call(this)}catch(o){f.call(this,o)}}function f(t){this._state=!1,this._value=t,u.call(this)}function u(){for(var t=0,n=this._deferreds.length;t<n;t++)o.call(this,this._deferreds[t]);this._deferreds=null}function c(t,n,e,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.resolve=e,this.reject=o}function l(t,n,e){var o=!1;try{t(function(t){o||(o=!0,n(t))},function(t){o||(o=!0,e(t))})}catch(r){if(o)return;o=!0,e(r)}}var s=t.defer,a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};e.prototype["catch"]=function(t){return this.then(null,t)},e.prototype.then=function(t,n){var r=this;return new e(function(e,i){o.call(r,new c(t,n,e,i))})},e.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&a(arguments[0])?arguments[0]:arguments);return new e(function(n,e){function o(f,u){try{if(u&&("object"===("undefined"==typeof u?"undefined":i(u))||"function"==typeof u)){var c=u.then;if("function"==typeof c)return void c.call(u,function(t){o(f,t)},e)}t[f]=u,0===--r&&n(t)}catch(l){e(l)}}if(0===t.length)return n([]);for(var r=t.length,f=0;f<t.length;f++)o(f,t[f])})},e.resolve=function(t){return t&&"object"===("undefined"==typeof t?"undefined":i(t))&&t.constructor===e?t:new e(function(n){n(t)})},e.reject=function(t){return new e(function(n,e){e(t)})},e.race=function(t){return new e(function(n,e){for(var o=0,r=t.length;o<r;o++)t[o].then(n,e)})},e._setImmediateFn=function(t){s=t},window.Promise||(window.Promise=e)}.apply(n,o),!(void 0!==r&&(t.exports=r))}});
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
webpackJsonpjwplayer([8],{73:function(e,t,a){var i,l;i=[a(2)],l=function(e){return function(t,a){function i(){a.set("castState",{available:a.get("castAvailable"),active:a.get("castActive")})}function l(t){t&&t.forEach(function(t){t.file=e.getAbsolutePath(t.file)})}function n(t){t&&(t.image=e.getAbsolutePath(t.image),l(t.allSources),l(t.sources))}function c(){o.removeEventListener("webkitplaybacktargetavailabilitychanged",u.updateAvailability),o.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",u.updateActive)}function r(){o.addEventListener("webkitplaybacktargetavailabilitychanged",u.updateAvailability),o.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",u.updateActive)}function s(){o=null,a.getVideo()&&(o=a.getVideo().video),o&&(c(),r()),u.updateAvailability({}),u.updateActive()}var o=null,u=this;u.updateAvailability=function(e){a.set("castAvailable","available"===e.availability),i()},u.updateActive=function(){var e=!1;o&&(e=!!o.webkitCurrentPlaybackTargetIsWireless),a.off("change:playlistItem",n),e&&(t.instreamDestroy(),n(a.get("playlistItem")),a.on("change:playlistItem",n)),a.set("airplayActive",e),a.set("castActive",e),i()},u.airplayToggle=function(){o&&o.webkitShowPlaybackTargetPicker()},s(),a.on("itemReady",s)}}.apply(t,i),!(void 0!==l&&(e.exports=l))}});
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
|||||||
|
.jw-controls-right,.jw-plugin-sharing,.jw-display,.jw-overlay,.jw-dock{-webkit-transition:opacity .3s ease,visibility .3s ease;transition:opacity .3s ease,visibility .3s ease}.jw-background-color{-webkit-transition:background-color .3s ease,opacity .3s ease,visibility .3s ease;transition:background-color .3s ease,opacity .3s ease,visibility .3s ease}.jw-button-color{-webkit-transition:color .3s ease,fill .3s ease;transition:color .3s ease,fill .3s ease}.jw-knob{-webkit-transition:opacity .15s ease;transition:opacity .15s ease}.jw-skin-seven .jw-display-icon-container{border-radius:3.5em}.jw-skin-seven .jw-display-icon-container>.jw-icon{color:rgba(255,255,255,0.9)}.jw-skin-seven.jw-breakpoint-2 .jw-display .jw-icon{width:66px;height:66px;line-height:66px}.jw-skin-seven .jw-dock-button{border-radius:2.5em}.jw-skin-seven .jw-dock-button:hover{background:rgba(33,33,33,0.8)}.jw-skin-seven .jw-menu{padding:0}.jw-skin-seven .jw-dock .jw-overlay{border-radius:.5em}.jw-skin-seven .jw-skip{border-radius:.5em}.jw-skin-seven .jw-text{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jw-skin-seven .jw-slider-container .jw-knob{opacity:0}.jw-skin-seven .jw-slider-container:hover .jw-knob{opacity:1}.jw-skin-seven.jw-flag-touch .jw-knob{opacity:1}
|
||||||
|
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNldmVuLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1RUFBdUUsd0RBQStDLEFBQS9DLCtDQUErQyxDQUFDLHFCQUFxQixrRkFBeUUsQUFBekUseUVBQXlFLENBQUMsaUJBQWlCLGdEQUF1QyxBQUF2Qyx1Q0FBdUMsQ0FBQyxTQUFTLHFDQUE0QixBQUE1Qiw0QkFBNEIsQ0FBQywwQ0FBMEMsbUJBQW1CLENBQUMsbURBQW1ELDJCQUEyQixDQUFDLG9EQUFvRCxXQUFXLFlBQVksZ0JBQWdCLENBQUMsK0JBQStCLG1CQUFtQixDQUFDLHFDQUFxQyw2QkFBNkIsQ0FBQyx3QkFBd0IsU0FBUyxDQUFDLG9DQUFvQyxrQkFBa0IsQ0FBQyx3QkFBd0Isa0JBQWtCLENBQUMsd0JBQXdCLGtDQUFrQyxtQ0FBbUMsaUNBQWlDLENBQUMsNkNBQTZDLFNBQVMsQ0FBQyxtREFBbUQsU0FBUyxDQUFDLHNDQUFzQyxTQUFTLENBQUMiLCJmaWxlIjoic2V2ZW4uY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmp3LWNvbnRyb2xzLXJpZ2h0LC5qdy1wbHVnaW4tc2hhcmluZywuanctZGlzcGxheSwuanctb3ZlcmxheSwuanctZG9ja3t0cmFuc2l0aW9uOm9wYWNpdHkgLjNzIGVhc2UsdmlzaWJpbGl0eSAuM3MgZWFzZX0uanctYmFja2dyb3VuZC1jb2xvcnt0cmFuc2l0aW9uOmJhY2tncm91bmQtY29sb3IgLjNzIGVhc2Usb3BhY2l0eSAuM3MgZWFzZSx2aXNpYmlsaXR5IC4zcyBlYXNlfS5qdy1idXR0b24tY29sb3J7dHJhbnNpdGlvbjpjb2xvciAuM3MgZWFzZSxmaWxsIC4zcyBlYXNlfS5qdy1rbm9ie3RyYW5zaXRpb246b3BhY2l0eSAuMTVzIGVhc2V9Lmp3LXNraW4tc2V2ZW4gLmp3LWRpc3BsYXktaWNvbi1jb250YWluZXJ7Ym9yZGVyLXJhZGl1czozLjVlbX0uanctc2tpbi1zZXZlbiAuanctZGlzcGxheS1pY29uLWNvbnRhaW5lcj4uanctaWNvbntjb2xvcjpyZ2JhKDI1NSwyNTUsMjU1LDAuOSl9Lmp3LXNraW4tc2V2ZW4uanctYnJlYWtwb2ludC0yIC5qdy1kaXNwbGF5IC5qdy1pY29ue3dpZHRoOjY2cHg7aGVpZ2h0OjY2cHg7bGluZS1oZWlnaHQ6NjZweH0uanctc2tpbi1zZXZlbiAuanctZG9jay1idXR0b257Ym9yZGVyLXJhZGl1czoyLjVlbX0uanctc2tpbi1zZXZlbiAuanctZG9jay1idXR0b246aG92ZXJ7YmFja2dyb3VuZDpyZ2JhKDMzLDMzLDMzLDAuOCl9Lmp3LXNraW4tc2V2ZW4gLmp3LW1lbnV7cGFkZGluZzowfS5qdy1za2luLXNldmVuIC5qdy1kb2NrIC5qdy1vdmVybGF5e2JvcmRlci1yYWRpdXM6LjVlbX0uanctc2tpbi1zZXZlbiAuanctc2tpcHtib3JkZXItcmFkaXVzOi41ZW19Lmp3LXNraW4tc2V2ZW4gLmp3LXRleHR7dGV4dC1yZW5kZXJpbmc6b3B0aW1pemVMZWdpYmlsaXR5Oy13ZWJraXQtZm9udC1zbW9vdGhpbmc6YW50aWFsaWFzZWQ7LW1vei1vc3gtZm9udC1zbW9vdGhpbmc6Z3JheXNjYWxlfS5qdy1za2luLXNldmVuIC5qdy1zbGlkZXItY29udGFpbmVyIC5qdy1rbm9ie29wYWNpdHk6MH0uanctc2tpbi1zZXZlbiAuanctc2xpZGVyLWNvbnRhaW5lcjpob3ZlciAuancta25vYntvcGFjaXR5OjF9Lmp3LXNraW4tc2V2ZW4uanctZmxhZy10b3VjaCAuancta25vYntvcGFjaXR5OjF9Il19 */
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
webpackJsonpjwplayer([13],{25:function(e,t,r){var n,i;n=[r(36)],i=function(e){function t(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}}function r(e){function t(e,t,r,n){return 3600*(0|e)+60*(0|t)+(0|r)+(0|n)/1e3}var r=e.match(s);return r?r[3]?t(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}function n(){this.values=Object.create(null)}function i(e,t,r,n){for(var i=n?e.split(n):[e],a=0;a<=i.length;a+=1)if("string"==typeof i[a]){var s=i[a].split(r);if(2===s.length){var o=s[0],u=s[1];t(o,u)}}}function a(e,t,a){function s(){var t=r(e);if(null===t)throw new Error("Malformed timestamp: "+c);return e=e.replace(f,""),t}function o(e,t){var r=new n;i(e,function(e,t){switch(e){case"region":for(var n=a.length-1;n>=0;n--)if(a[n].id===t){r.set(e,a[n].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var i=t.split(","),s=i[0];r.integer(e,s),r.percent(e,s)&&r.set("snapToLines",!1),r.alt(e,s,["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",T,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",T,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",T,"end","left","right"])}},l,h),t.region=r.get("region",null),t.vertical=r.get("vertical","");var s=r.get("line","auto");"auto"===s&&E.line===-1&&(s=-1),t.line=s,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",T);var o=r.get("position","auto");"auto"===o&&50===E.position&&(o="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=o}function u(){e=e.replace(g,"")}var c=e;if(u(),t.startTime=s(),u(),"-->"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);e=e.substr(3),u(),t.endTime=s(),u(),o(e,t)}var s=/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/,o=/^-?\d+$/,u=/\r\n|\n/,c=/^NOTE($|[ \t])/,f=/^[^\sa-zA-Z-]+/,l=/:/,h=/\s/,g=/^\s+/,d=/-->/,p=/^WEBVTT([ \t].*)?$/,b=window.requestAnimationFrame||function(e){return window.setTimeout(e,17)},v=function(e,r){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=r||new t,this.regionList=[],this.maxCueBatch=1e3};n.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,r){for(var n=0;n<r.length;++n)if(t===r[n]){this.set(e,t);break}},integer:function(e,t){o.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return t=parseFloat(t),t>=0&&t<=100&&(this.set(e,t),!0)}};var E=new e(0,0,0),T="middle"===E.align?"middle":"center";return v.prototype={parse:function(t,r){function n(){for(var e=h.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,h.buffer=e.substr(t),r}function s(e){i(e,function(e,t){switch(e){case"Region":console.log("parse region",t)}},l)}function o(){"CUETEXT"===h.state&&h.cue&&h.oncue&&h.oncue(h.cue),h.cue=null,h.state="INITIAL"===h.state?"BADWEBVTT":"BADCUE"}function f(){try{for(;h.buffer&&w<=h.maxCueBatch;){if(!u.test(h.buffer))return h.flush(),this;switch(T?T=!1:g=n(),h.state){case"HEADER":l.test(g)?s(g):g||(h.state="ID");break;case"NOTE":g||(h.state="ID");break;case"ID":if(c.test(g)){h.state="NOTE";break}if(!g)break;if(h.cue=new e(0,0,""),h.state="CUE",!d.test(g)){h.cue.id=g;break}case"CUE":try{a(g,h.cue,h.regionList)}catch(t){h.cue=null,h.state="BADCUE";break}h.state="CUETEXT";break;case"CUETEXT":var i=d.test(g);if(!g||i&&(T=!0)){h.oncue&&(w+=1,h.oncue(h.cue)),h.cue=null,h.state="ID";break}h.cue.text&&(h.cue.text+="\n"),h.cue.text+=g;break;case"BADCUE":g||(h.state="ID")}}if(w=0,h.buffer)b(f);else if(!r)return h.flush(),this}catch(t){return o(t),this}}var h=this;t&&(h.buffer+=h.decoder.decode(t,{stream:!0}));try{var g;if("INITIAL"===h.state){if(!u.test(h.buffer))return this;g=n();var v=g.match(p);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");h.state="HEADER"}}catch(E){return o(),this}var T=!1,w=0;f()},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse(void 0,!0)),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return e.onflush&&e.onflush(),this}},v}.apply(t,n),!(void 0!==i&&(e.exports=i))}});
|
||||||
@ -0,0 +1 @@
|
|||||||
|
This is a dummy file placed to protect you from the old .swf file.
|
||||||
@ -0,0 +1,362 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
File: AC_QuickTime.js
|
||||||
|
|
||||||
|
Abstract: This file contains functions to generate OBJECT and EMBED tags for QuickTime content.
|
||||||
|
|
||||||
|
Version: <1.2>
|
||||||
|
|
||||||
|
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
|
||||||
|
Computer, Inc. ("Apple") in consideration of your agreement to the
|
||||||
|
following terms, and your use, installation, modification or
|
||||||
|
redistribution of this Apple software constitutes acceptance of these
|
||||||
|
terms. If you do not agree with these terms, please do not use,
|
||||||
|
install, modify or redistribute this Apple software.
|
||||||
|
|
||||||
|
In consideration of your agreement to abide by the following terms, and
|
||||||
|
subject to these terms, Apple grants you a personal, non-exclusive
|
||||||
|
license, under Apple's copyrights in this original Apple software (the
|
||||||
|
"Apple Software"), to use, reproduce, modify and redistribute the Apple
|
||||||
|
Software, with or without modifications, in source and/or binary forms;
|
||||||
|
provided that if you redistribute the Apple Software in its entirety and
|
||||||
|
without modifications, you must retain this notice and the following
|
||||||
|
text and disclaimers in all such redistributions of the Apple Software.
|
||||||
|
Neither the name, trademarks, service marks or logos of Apple Computer,
|
||||||
|
Inc. may be used to endorse or promote products derived from the Apple
|
||||||
|
Software without specific prior written permission from Apple. Except
|
||||||
|
as expressly stated in this notice, no other rights or licenses, express
|
||||||
|
or implied, are granted by Apple herein, including but not limited to
|
||||||
|
any patent rights that may be infringed by your derivative works or by
|
||||||
|
other works in which the Apple Software may be incorporated.
|
||||||
|
|
||||||
|
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
|
||||||
|
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
|
||||||
|
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
|
||||||
|
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||||
|
|
||||||
|
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
|
||||||
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
|
||||||
|
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
|
||||||
|
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
|
||||||
|
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
Copyright © 2006-2007 Apple Computer, Inc., All Rights Reserved
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file contains functions to generate OBJECT and EMBED tags for QuickTime content.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/************** LOCALIZABLE GLOBAL VARIABLES ****************/
|
||||||
|
|
||||||
|
var gArgCountErr = 'The "%%" function requires an even number of arguments.'
|
||||||
|
+ '\nArguments should be in the form "atttributeName", "attributeValue", ...';
|
||||||
|
|
||||||
|
/******************** END LOCALIZABLE **********************/
|
||||||
|
|
||||||
|
var gTagAttrs = null;
|
||||||
|
var gQTGeneratorVersion = 1.2;
|
||||||
|
var gQTBehaviorID = "qt_event_source";
|
||||||
|
var gQTEventsEnabled = false;
|
||||||
|
|
||||||
|
function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
|
||||||
|
|
||||||
|
function _QTComplain(callingFcnName, errMsg)
|
||||||
|
{
|
||||||
|
errMsg = errMsg.replace("%%", callingFcnName);
|
||||||
|
alert(errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTIsMSIE()
|
||||||
|
{
|
||||||
|
var ua = navigator.userAgent.toLowerCase();
|
||||||
|
var msie = /msie/.test(ua) && !/opera/.test(ua);
|
||||||
|
|
||||||
|
return msie;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTGenerateBehavior()
|
||||||
|
{
|
||||||
|
return objTag = '<!--[if IE]>'
|
||||||
|
+ '<object id="' + gQTBehaviorID + '" classid="clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598"></object>'
|
||||||
|
+ '<![endif]-->';
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTPageHasBehaviorObject(callingFcnName, args)
|
||||||
|
{
|
||||||
|
var haveBehavior = false;
|
||||||
|
var objects = document.getElementsByTagName('object');
|
||||||
|
|
||||||
|
for ( var ndx = 0, obj; obj = objects[ndx]; ndx++ )
|
||||||
|
{
|
||||||
|
if ( obj.getAttribute('classid') == "clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598" )
|
||||||
|
{
|
||||||
|
if ( obj.getAttribute('id') == gQTBehaviorID )
|
||||||
|
haveBehavior = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return haveBehavior;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTShouldInsertBehavior()
|
||||||
|
{
|
||||||
|
var shouldDo = false;
|
||||||
|
|
||||||
|
if ( gQTEventsEnabled && _QTIsMSIE() && !_QTPageHasBehaviorObject() )
|
||||||
|
shouldDo = true;
|
||||||
|
|
||||||
|
return shouldDo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTAddAttribute(prefix, slotName, tagName)
|
||||||
|
{
|
||||||
|
var value;
|
||||||
|
|
||||||
|
value = gTagAttrs[prefix + slotName];
|
||||||
|
if ( null == value )
|
||||||
|
value = gTagAttrs[slotName];
|
||||||
|
|
||||||
|
if ( null != value )
|
||||||
|
{
|
||||||
|
if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
|
||||||
|
tagName = slotName.substring(prefix.length);
|
||||||
|
if ( null == tagName )
|
||||||
|
tagName = slotName;
|
||||||
|
return ' ' + tagName + '="' + value + '"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTAddObjectAttr(slotName, tagName)
|
||||||
|
{
|
||||||
|
// don't bother if it is only for the embed tag
|
||||||
|
if ( 0 == slotName.indexOf("emb#") )
|
||||||
|
return "";
|
||||||
|
|
||||||
|
if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
|
||||||
|
tagName = slotName.substring(4);
|
||||||
|
|
||||||
|
return _QTAddAttribute("obj#", slotName, tagName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTAddEmbedAttr(slotName, tagName)
|
||||||
|
{
|
||||||
|
// don't bother if it is only for the object tag
|
||||||
|
if ( 0 == slotName.indexOf("obj#") )
|
||||||
|
return "";
|
||||||
|
|
||||||
|
if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
|
||||||
|
tagName = slotName.substring(4);
|
||||||
|
|
||||||
|
return _QTAddAttribute("emb#", slotName, tagName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTAddObjectParam(slotName, generateXHTML)
|
||||||
|
{
|
||||||
|
var paramValue;
|
||||||
|
var paramStr = "";
|
||||||
|
var endTagChar = (generateXHTML) ? ' />' : '>';
|
||||||
|
|
||||||
|
if ( -1 == slotName.indexOf("emb#") )
|
||||||
|
{
|
||||||
|
// look for the OBJECT-only param first. if there is none, look for a generic one
|
||||||
|
paramValue = gTagAttrs["obj#" + slotName];
|
||||||
|
if ( null == paramValue )
|
||||||
|
paramValue = gTagAttrs[slotName];
|
||||||
|
|
||||||
|
if ( 0 == slotName.indexOf("obj#") )
|
||||||
|
slotName = slotName.substring(4);
|
||||||
|
|
||||||
|
if ( null != paramValue )
|
||||||
|
paramStr = '<param name="' + slotName + '" value="' + paramValue + '"' + endTagChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return paramStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTDeleteTagAttrs()
|
||||||
|
{
|
||||||
|
for ( var ndx = 0; ndx < arguments.length; ndx++ )
|
||||||
|
{
|
||||||
|
var attrName = arguments[ndx];
|
||||||
|
delete gTagAttrs[attrName];
|
||||||
|
delete gTagAttrs["emb#" + attrName];
|
||||||
|
delete gTagAttrs["obj#" + attrName];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// generate an embed and object tag, return as a string
|
||||||
|
function _QTGenerate(callingFcnName, generateXHTML, args)
|
||||||
|
{
|
||||||
|
// is the number of optional arguments even?
|
||||||
|
if ( args.length < 4 || (0 != (args.length % 2)) )
|
||||||
|
{
|
||||||
|
_QTComplain(callingFcnName, gArgCountErr);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// allocate an array, fill in the required attributes with fixed place params and defaults
|
||||||
|
gTagAttrs = new Object();
|
||||||
|
gTagAttrs["src"] = args[0];
|
||||||
|
gTagAttrs["width"] = args[1];
|
||||||
|
gTagAttrs["height"] = args[2];
|
||||||
|
gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
|
||||||
|
//Impportant note: It is recommended that you use this exact classid in order to ensure a seamless experience for all viewers
|
||||||
|
gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";
|
||||||
|
|
||||||
|
// set up codebase attribute with specified or default version before parsing args so
|
||||||
|
// anything passed in will override
|
||||||
|
var activexVers = args[3]
|
||||||
|
if ( (null == activexVers) || ("" == activexVers) )
|
||||||
|
activexVers = "7,3,0,0";
|
||||||
|
gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;
|
||||||
|
|
||||||
|
var attrName,
|
||||||
|
attrValue;
|
||||||
|
|
||||||
|
// add all of the optional attributes to the array
|
||||||
|
for ( var ndx = 4; ndx < args.length; ndx += 2)
|
||||||
|
{
|
||||||
|
attrName = args[ndx].toLowerCase();
|
||||||
|
attrValue = args[ndx + 1];
|
||||||
|
|
||||||
|
gTagAttrs[attrName] = attrValue;
|
||||||
|
|
||||||
|
if ( ("postdomevents" == attrName) && (attrValue.toLowerCase() != "false") )
|
||||||
|
{
|
||||||
|
gQTEventsEnabled = true;
|
||||||
|
if ( _QTIsMSIE() )
|
||||||
|
gTagAttrs["obj#style"] = "behavior:url(#" + gQTBehaviorID + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// init both tags with the required and "special" attributes
|
||||||
|
var objTag = '<object '
|
||||||
|
+ _QTAddObjectAttr("classid")
|
||||||
|
+ _QTAddObjectAttr("width")
|
||||||
|
+ _QTAddObjectAttr("height")
|
||||||
|
+ _QTAddObjectAttr("codebase")
|
||||||
|
+ _QTAddObjectAttr("name")
|
||||||
|
+ _QTAddObjectAttr("id")
|
||||||
|
+ _QTAddObjectAttr("tabindex")
|
||||||
|
+ _QTAddObjectAttr("hspace")
|
||||||
|
+ _QTAddObjectAttr("vspace")
|
||||||
|
+ _QTAddObjectAttr("border")
|
||||||
|
+ _QTAddObjectAttr("align")
|
||||||
|
+ _QTAddObjectAttr("class")
|
||||||
|
+ _QTAddObjectAttr("title")
|
||||||
|
+ _QTAddObjectAttr("accesskey")
|
||||||
|
+ _QTAddObjectAttr("noexternaldata")
|
||||||
|
+ _QTAddObjectAttr("obj#style")
|
||||||
|
+ '>'
|
||||||
|
+ _QTAddObjectParam("src", generateXHTML);
|
||||||
|
var embedTag = '<embed '
|
||||||
|
+ _QTAddEmbedAttr("src")
|
||||||
|
+ _QTAddEmbedAttr("width")
|
||||||
|
+ _QTAddEmbedAttr("height")
|
||||||
|
+ _QTAddEmbedAttr("pluginspage")
|
||||||
|
+ _QTAddEmbedAttr("name")
|
||||||
|
+ _QTAddEmbedAttr("id")
|
||||||
|
+ _QTAddEmbedAttr("align")
|
||||||
|
+ _QTAddEmbedAttr("tabindex")
|
||||||
|
+ _QTAddEmbedAttr("title");
|
||||||
|
|
||||||
|
// delete the attributes/params we have already added
|
||||||
|
_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
|
||||||
|
"hspace","vspace","border","align","noexternaldata","class","title","accesskey","id","style");
|
||||||
|
|
||||||
|
// and finally, add all of the remaining attributes to the embed and object
|
||||||
|
for ( var attrName in gTagAttrs )
|
||||||
|
{
|
||||||
|
attrValue = gTagAttrs[attrName];
|
||||||
|
if ( null != attrValue )
|
||||||
|
{
|
||||||
|
embedTag += _QTAddEmbedAttr(attrName);
|
||||||
|
objTag += _QTAddObjectParam(attrName, generateXHTML);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// end both tags, we're done
|
||||||
|
return objTag + embedTag + '></em' + 'bed></ob' + 'ject' + '>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// return the object/embed as a string
|
||||||
|
function QT_GenerateOBJECTText()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_GenerateOBJECTText", false, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
txt = _QTGenerateBehavior() + txt;
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_GenerateOBJECTText_XHTML()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
txt = _QTGenerateBehavior() + txt;
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_WriteOBJECT()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_WriteOBJECT", false, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
document.writeln(_QTGenerateBehavior());
|
||||||
|
document.writeln(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_WriteOBJECT_XHTML()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_WriteOBJECT_XHTML", true, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
document.writeln(_QTGenerateBehavior());
|
||||||
|
document.writeln(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_GenerateBehaviorOBJECT()
|
||||||
|
{
|
||||||
|
return _QTGenerateBehavior();
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_ReplaceElementContents()
|
||||||
|
{
|
||||||
|
var element = arguments[0];
|
||||||
|
var args = [];
|
||||||
|
|
||||||
|
// copy all other arguments we want to pass through to the fcn
|
||||||
|
for ( var ndx = 1; ndx < arguments.length; ndx++ )
|
||||||
|
args.push(arguments[ndx]);
|
||||||
|
|
||||||
|
var txt = _QTGenerate("QT_ReplaceElementContents", false, args);
|
||||||
|
if ( txt.length > 0 )
|
||||||
|
element.innerHTML = txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function QT_ReplaceElementContents_XHTML()
|
||||||
|
{
|
||||||
|
var element = arguments[0];
|
||||||
|
var args = [];
|
||||||
|
|
||||||
|
// copy all other arguments we want to pass through to the fcn
|
||||||
|
for ( var ndx = 1; ndx < arguments.length; ndx++ )
|
||||||
|
args.push(arguments[ndx]);
|
||||||
|
|
||||||
|
var txt = _QTGenerate("QT_ReplaceElementContents_XHTML", true, args);
|
||||||
|
if ( txt.length > 0 )
|
||||||
|
element.innerHTML = txt;
|
||||||
|
}
|
||||||
@ -0,0 +1,362 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
File: AC_QuickTime.js
|
||||||
|
|
||||||
|
Abstract: This file contains functions to generate OBJECT and EMBED tags for QuickTime content.
|
||||||
|
|
||||||
|
Version: <1.2>
|
||||||
|
|
||||||
|
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
|
||||||
|
Computer, Inc. ("Apple") in consideration of your agreement to the
|
||||||
|
following terms, and your use, installation, modification or
|
||||||
|
redistribution of this Apple software constitutes acceptance of these
|
||||||
|
terms. If you do not agree with these terms, please do not use,
|
||||||
|
install, modify or redistribute this Apple software.
|
||||||
|
|
||||||
|
In consideration of your agreement to abide by the following terms, and
|
||||||
|
subject to these terms, Apple grants you a personal, non-exclusive
|
||||||
|
license, under Apple's copyrights in this original Apple software (the
|
||||||
|
"Apple Software"), to use, reproduce, modify and redistribute the Apple
|
||||||
|
Software, with or without modifications, in source and/or binary forms;
|
||||||
|
provided that if you redistribute the Apple Software in its entirety and
|
||||||
|
without modifications, you must retain this notice and the following
|
||||||
|
text and disclaimers in all such redistributions of the Apple Software.
|
||||||
|
Neither the name, trademarks, service marks or logos of Apple Computer,
|
||||||
|
Inc. may be used to endorse or promote products derived from the Apple
|
||||||
|
Software without specific prior written permission from Apple. Except
|
||||||
|
as expressly stated in this notice, no other rights or licenses, express
|
||||||
|
or implied, are granted by Apple herein, including but not limited to
|
||||||
|
any patent rights that may be infringed by your derivative works or by
|
||||||
|
other works in which the Apple Software may be incorporated.
|
||||||
|
|
||||||
|
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
|
||||||
|
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
|
||||||
|
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
|
||||||
|
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||||
|
|
||||||
|
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
|
||||||
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
|
||||||
|
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
|
||||||
|
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
|
||||||
|
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
Copyright © 2006-2007 Apple Computer, Inc., All Rights Reserved
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file contains functions to generate OBJECT and EMBED tags for QuickTime content.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/************** LOCALIZABLE GLOBAL VARIABLES ****************/
|
||||||
|
|
||||||
|
var gArgCountErr = 'The "%%" function requires an even number of arguments.'
|
||||||
|
+ '\nArguments should be in the form "atttributeName", "attributeValue", ...';
|
||||||
|
|
||||||
|
/******************** END LOCALIZABLE **********************/
|
||||||
|
|
||||||
|
var gTagAttrs = null;
|
||||||
|
var gQTGeneratorVersion = 1.2;
|
||||||
|
var gQTBehaviorID = "qt_event_source";
|
||||||
|
var gQTEventsEnabled = false;
|
||||||
|
|
||||||
|
function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
|
||||||
|
|
||||||
|
function _QTComplain(callingFcnName, errMsg)
|
||||||
|
{
|
||||||
|
errMsg = errMsg.replace("%%", callingFcnName);
|
||||||
|
alert(errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTIsMSIE()
|
||||||
|
{
|
||||||
|
var ua = navigator.userAgent.toLowerCase();
|
||||||
|
var msie = /msie/.test(ua) && !/opera/.test(ua);
|
||||||
|
|
||||||
|
return msie;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTGenerateBehavior()
|
||||||
|
{
|
||||||
|
return objTag = '<!--[if IE]>'
|
||||||
|
+ '<object id="' + gQTBehaviorID + '" classid="clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598"></object>'
|
||||||
|
+ '<![endif]-->';
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTPageHasBehaviorObject(callingFcnName, args)
|
||||||
|
{
|
||||||
|
var haveBehavior = false;
|
||||||
|
var objects = document.getElementsByTagName('object');
|
||||||
|
|
||||||
|
for ( var ndx = 0, obj; obj = objects[ndx]; ndx++ )
|
||||||
|
{
|
||||||
|
if ( obj.getAttribute('classid') == "clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598" )
|
||||||
|
{
|
||||||
|
if ( obj.getAttribute('id') == gQTBehaviorID )
|
||||||
|
haveBehavior = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return haveBehavior;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTShouldInsertBehavior()
|
||||||
|
{
|
||||||
|
var shouldDo = false;
|
||||||
|
|
||||||
|
if ( gQTEventsEnabled && _QTIsMSIE() && !_QTPageHasBehaviorObject() )
|
||||||
|
shouldDo = true;
|
||||||
|
|
||||||
|
return shouldDo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTAddAttribute(prefix, slotName, tagName)
|
||||||
|
{
|
||||||
|
var value;
|
||||||
|
|
||||||
|
value = gTagAttrs[prefix + slotName];
|
||||||
|
if ( null == value )
|
||||||
|
value = gTagAttrs[slotName];
|
||||||
|
|
||||||
|
if ( null != value )
|
||||||
|
{
|
||||||
|
if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
|
||||||
|
tagName = slotName.substring(prefix.length);
|
||||||
|
if ( null == tagName )
|
||||||
|
tagName = slotName;
|
||||||
|
return ' ' + tagName + '="' + value + '"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTAddObjectAttr(slotName, tagName)
|
||||||
|
{
|
||||||
|
// don't bother if it is only for the embed tag
|
||||||
|
if ( 0 == slotName.indexOf("emb#") )
|
||||||
|
return "";
|
||||||
|
|
||||||
|
if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
|
||||||
|
tagName = slotName.substring(4);
|
||||||
|
|
||||||
|
return _QTAddAttribute("obj#", slotName, tagName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTAddEmbedAttr(slotName, tagName)
|
||||||
|
{
|
||||||
|
// don't bother if it is only for the object tag
|
||||||
|
if ( 0 == slotName.indexOf("obj#") )
|
||||||
|
return "";
|
||||||
|
|
||||||
|
if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
|
||||||
|
tagName = slotName.substring(4);
|
||||||
|
|
||||||
|
return _QTAddAttribute("emb#", slotName, tagName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _QTAddObjectParam(slotName, generateXHTML)
|
||||||
|
{
|
||||||
|
var paramValue;
|
||||||
|
var paramStr = "";
|
||||||
|
var endTagChar = (generateXHTML) ? ' />' : '>';
|
||||||
|
|
||||||
|
if ( -1 == slotName.indexOf("emb#") )
|
||||||
|
{
|
||||||
|
// look for the OBJECT-only param first. if there is none, look for a generic one
|
||||||
|
paramValue = gTagAttrs["obj#" + slotName];
|
||||||
|
if ( null == paramValue )
|
||||||
|
paramValue = gTagAttrs[slotName];
|
||||||
|
|
||||||
|
if ( 0 == slotName.indexOf("obj#") )
|
||||||
|
slotName = slotName.substring(4);
|
||||||
|
|
||||||
|
if ( null != paramValue )
|
||||||
|
paramStr = '<param name="' + slotName + '" value="' + paramValue + '"' + endTagChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return paramStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _QTDeleteTagAttrs()
|
||||||
|
{
|
||||||
|
for ( var ndx = 0; ndx < arguments.length; ndx++ )
|
||||||
|
{
|
||||||
|
var attrName = arguments[ndx];
|
||||||
|
delete gTagAttrs[attrName];
|
||||||
|
delete gTagAttrs["emb#" + attrName];
|
||||||
|
delete gTagAttrs["obj#" + attrName];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// generate an embed and object tag, return as a string
|
||||||
|
function _QTGenerate(callingFcnName, generateXHTML, args)
|
||||||
|
{
|
||||||
|
// is the number of optional arguments even?
|
||||||
|
if ( args.length < 4 || (0 != (args.length % 2)) )
|
||||||
|
{
|
||||||
|
_QTComplain(callingFcnName, gArgCountErr);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// allocate an array, fill in the required attributes with fixed place params and defaults
|
||||||
|
gTagAttrs = new Object();
|
||||||
|
gTagAttrs["src"] = args[0];
|
||||||
|
gTagAttrs["width"] = args[1];
|
||||||
|
gTagAttrs["height"] = args[2];
|
||||||
|
gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
|
||||||
|
//Impportant note: It is recommended that you use this exact classid in order to ensure a seamless experience for all viewers
|
||||||
|
gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";
|
||||||
|
|
||||||
|
// set up codebase attribute with specified or default version before parsing args so
|
||||||
|
// anything passed in will override
|
||||||
|
var activexVers = args[3]
|
||||||
|
if ( (null == activexVers) || ("" == activexVers) )
|
||||||
|
activexVers = "7,3,0,0";
|
||||||
|
gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;
|
||||||
|
|
||||||
|
var attrName,
|
||||||
|
attrValue;
|
||||||
|
|
||||||
|
// add all of the optional attributes to the array
|
||||||
|
for ( var ndx = 4; ndx < args.length; ndx += 2)
|
||||||
|
{
|
||||||
|
attrName = args[ndx].toLowerCase();
|
||||||
|
attrValue = args[ndx + 1];
|
||||||
|
|
||||||
|
gTagAttrs[attrName] = attrValue;
|
||||||
|
|
||||||
|
if ( ("postdomevents" == attrName) && (attrValue.toLowerCase() != "false") )
|
||||||
|
{
|
||||||
|
gQTEventsEnabled = true;
|
||||||
|
if ( _QTIsMSIE() )
|
||||||
|
gTagAttrs["obj#style"] = "behavior:url(#" + gQTBehaviorID + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// init both tags with the required and "special" attributes
|
||||||
|
var objTag = '<object '
|
||||||
|
+ _QTAddObjectAttr("classid")
|
||||||
|
+ _QTAddObjectAttr("width")
|
||||||
|
+ _QTAddObjectAttr("height")
|
||||||
|
+ _QTAddObjectAttr("codebase")
|
||||||
|
+ _QTAddObjectAttr("name")
|
||||||
|
+ _QTAddObjectAttr("id")
|
||||||
|
+ _QTAddObjectAttr("tabindex")
|
||||||
|
+ _QTAddObjectAttr("hspace")
|
||||||
|
+ _QTAddObjectAttr("vspace")
|
||||||
|
+ _QTAddObjectAttr("border")
|
||||||
|
+ _QTAddObjectAttr("align")
|
||||||
|
+ _QTAddObjectAttr("class")
|
||||||
|
+ _QTAddObjectAttr("title")
|
||||||
|
+ _QTAddObjectAttr("accesskey")
|
||||||
|
+ _QTAddObjectAttr("noexternaldata")
|
||||||
|
+ _QTAddObjectAttr("obj#style")
|
||||||
|
+ '>'
|
||||||
|
+ _QTAddObjectParam("src", generateXHTML);
|
||||||
|
var embedTag = '<embed '
|
||||||
|
+ _QTAddEmbedAttr("src")
|
||||||
|
+ _QTAddEmbedAttr("width")
|
||||||
|
+ _QTAddEmbedAttr("height")
|
||||||
|
+ _QTAddEmbedAttr("pluginspage")
|
||||||
|
+ _QTAddEmbedAttr("name")
|
||||||
|
+ _QTAddEmbedAttr("id")
|
||||||
|
+ _QTAddEmbedAttr("align")
|
||||||
|
+ _QTAddEmbedAttr("tabindex")
|
||||||
|
+ _QTAddEmbedAttr("title");
|
||||||
|
|
||||||
|
// delete the attributes/params we have already added
|
||||||
|
_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
|
||||||
|
"hspace","vspace","border","align","noexternaldata","class","title","accesskey","id","style");
|
||||||
|
|
||||||
|
// and finally, add all of the remaining attributes to the embed and object
|
||||||
|
for ( var attrName in gTagAttrs )
|
||||||
|
{
|
||||||
|
attrValue = gTagAttrs[attrName];
|
||||||
|
if ( null != attrValue )
|
||||||
|
{
|
||||||
|
embedTag += _QTAddEmbedAttr(attrName);
|
||||||
|
objTag += _QTAddObjectParam(attrName, generateXHTML);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// end both tags, we're done
|
||||||
|
return objTag + embedTag + '></em' + 'bed></ob' + 'ject' + '>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// return the object/embed as a string
|
||||||
|
function QT_GenerateOBJECTText()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_GenerateOBJECTText", false, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
txt = _QTGenerateBehavior() + txt;
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_GenerateOBJECTText_XHTML()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
txt = _QTGenerateBehavior() + txt;
|
||||||
|
return txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_WriteOBJECT()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_WriteOBJECT", false, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
document.writeln(_QTGenerateBehavior());
|
||||||
|
document.writeln(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_WriteOBJECT_XHTML()
|
||||||
|
{
|
||||||
|
var txt = _QTGenerate("QT_WriteOBJECT_XHTML", true, arguments);
|
||||||
|
if ( _QTShouldInsertBehavior() )
|
||||||
|
document.writeln(_QTGenerateBehavior());
|
||||||
|
document.writeln(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_GenerateBehaviorOBJECT()
|
||||||
|
{
|
||||||
|
return _QTGenerateBehavior();
|
||||||
|
}
|
||||||
|
|
||||||
|
function QT_ReplaceElementContents()
|
||||||
|
{
|
||||||
|
var element = arguments[0];
|
||||||
|
var args = [];
|
||||||
|
|
||||||
|
// copy all other arguments we want to pass through to the fcn
|
||||||
|
for ( var ndx = 1; ndx < arguments.length; ndx++ )
|
||||||
|
args.push(arguments[ndx]);
|
||||||
|
|
||||||
|
var txt = _QTGenerate("QT_ReplaceElementContents", false, args);
|
||||||
|
if ( txt.length > 0 )
|
||||||
|
element.innerHTML = txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function QT_ReplaceElementContents_XHTML()
|
||||||
|
{
|
||||||
|
var element = arguments[0];
|
||||||
|
var args = [];
|
||||||
|
|
||||||
|
// copy all other arguments we want to pass through to the fcn
|
||||||
|
for ( var ndx = 1; ndx < arguments.length; ndx++ )
|
||||||
|
args.push(arguments[ndx]);
|
||||||
|
|
||||||
|
var txt = _QTGenerate("QT_ReplaceElementContents_XHTML", true, args);
|
||||||
|
if ( txt.length > 0 )
|
||||||
|
element.innerHTML = txt;
|
||||||
|
}
|
||||||
@ -0,0 +1,576 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Silverlight.js version 2.0.30523.6
|
||||||
|
//
|
||||||
|
// This file is provided by Microsoft as a helper file for websites that
|
||||||
|
// incorporate Silverlight Objects. This file is provided under the Microsoft
|
||||||
|
// Public License available at
|
||||||
|
// http://code.msdn.microsoft.com/silverlightjs/Project/License.aspx.
|
||||||
|
// You may not use or distribute this file or the code in this file except as
|
||||||
|
// expressly permitted under that license.
|
||||||
|
//
|
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
if (!window.Silverlight)
|
||||||
|
{
|
||||||
|
window.Silverlight = { };
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// _silverlightCount:
|
||||||
|
//
|
||||||
|
// Counter of globalized event handlers
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight._silverlightCount = 0;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// fwlinkRoot:
|
||||||
|
//
|
||||||
|
// Prefix for fwlink URL's
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.fwlinkRoot='http://go2.microsoft.com/fwlink/?LinkID=';
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// onGetSilverlight:
|
||||||
|
//
|
||||||
|
// Called by Silverlight.GetSilverlight to notify the page that a user
|
||||||
|
// has requested the Silverlight installer
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.onGetSilverlight = null;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// onSilverlightInstalled:
|
||||||
|
//
|
||||||
|
// Called by Silverlight.WaitForInstallCompletion when the page detects
|
||||||
|
// that Silverlight has been installed. The event handler is not called
|
||||||
|
// in upgrade scenarios.
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.onSilverlightInstalled = function () {window.location.reload(false);};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// isInstalled:
|
||||||
|
//
|
||||||
|
// Checks to see if the correct version is installed
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.isInstalled = function(version)
|
||||||
|
{
|
||||||
|
var isVersionSupported=false;
|
||||||
|
var container = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var control = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
control = new ActiveXObject('AgControl.AgControl');
|
||||||
|
if ( version == null )
|
||||||
|
{
|
||||||
|
isVersionSupported = true;
|
||||||
|
}
|
||||||
|
else if ( control.IsVersionSupported(version) )
|
||||||
|
{
|
||||||
|
isVersionSupported = true;
|
||||||
|
}
|
||||||
|
control = null;
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
var plugin = navigator.plugins["Silverlight Plug-In"] ;
|
||||||
|
if ( plugin )
|
||||||
|
{
|
||||||
|
if ( version === null )
|
||||||
|
{
|
||||||
|
isVersionSupported = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var actualVer = plugin.description;
|
||||||
|
if ( actualVer === "1.0.30226.2")
|
||||||
|
actualVer = "2.0.30226.2";
|
||||||
|
var actualVerArray =actualVer.split(".");
|
||||||
|
while ( actualVerArray.length > 3)
|
||||||
|
{
|
||||||
|
actualVerArray.pop();
|
||||||
|
}
|
||||||
|
while ( actualVerArray.length < 4)
|
||||||
|
{
|
||||||
|
actualVerArray.push(0);
|
||||||
|
}
|
||||||
|
var reqVerArray = version.split(".");
|
||||||
|
while ( reqVerArray.length > 4)
|
||||||
|
{
|
||||||
|
reqVerArray.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
var requiredVersionPart ;
|
||||||
|
var actualVersionPart
|
||||||
|
var index = 0;
|
||||||
|
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
requiredVersionPart = parseInt(reqVerArray[index]);
|
||||||
|
actualVersionPart = parseInt(actualVerArray[index]);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
while (index < reqVerArray.length && requiredVersionPart === actualVersionPart);
|
||||||
|
|
||||||
|
if ( requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart) )
|
||||||
|
{
|
||||||
|
isVersionSupported = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
isVersionSupported = false;
|
||||||
|
}
|
||||||
|
if (container)
|
||||||
|
{
|
||||||
|
document.body.removeChild(container);
|
||||||
|
}
|
||||||
|
|
||||||
|
return isVersionSupported;
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// WaitForInstallCompletion:
|
||||||
|
//
|
||||||
|
// Occasionally checks for Silverlight installation status. If it
|
||||||
|
// detects that Silverlight has been installed then it calls
|
||||||
|
// Silverlight.onSilverlightInstalled();. This is only supported
|
||||||
|
// if Silverlight was not previously installed on this computer.
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.WaitForInstallCompletion = function()
|
||||||
|
{
|
||||||
|
if ( ! Silverlight.isBrowserRestartRequired && Silverlight.onSilverlightInstalled )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
navigator.plugins.refresh();
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if ( Silverlight.isInstalled(null) )
|
||||||
|
{
|
||||||
|
Silverlight.onSilverlightInstalled();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setTimeout(Silverlight.WaitForInstallCompletion, 3000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// __startup:
|
||||||
|
//
|
||||||
|
// Performs startup tasks
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.__startup = function()
|
||||||
|
{
|
||||||
|
Silverlight.isBrowserRestartRequired = Silverlight.isInstalled(null);
|
||||||
|
if ( !Silverlight.isBrowserRestartRequired)
|
||||||
|
{
|
||||||
|
Silverlight.WaitForInstallCompletion();
|
||||||
|
}
|
||||||
|
if (window.removeEventListener) {
|
||||||
|
window.removeEventListener('load', Silverlight.__startup , false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
window.detachEvent('onload', Silverlight.__startup );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.addEventListener)
|
||||||
|
{
|
||||||
|
window.addEventListener('load', Silverlight.__startup , false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window.attachEvent('onload', Silverlight.__startup );
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// createObject:
|
||||||
|
//
|
||||||
|
// Inserts a Silverlight <object> tag or installation experience into the HTML
|
||||||
|
// DOM based on the current installed state of Silverlight.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Silverlight.createObject = function(source, parentElement, id, properties, events, initParams, userContext)
|
||||||
|
{
|
||||||
|
var slPluginHelper = new Object();
|
||||||
|
var slProperties = properties;
|
||||||
|
var slEvents = events;
|
||||||
|
|
||||||
|
slPluginHelper.version = slProperties.version;
|
||||||
|
slProperties.source = source;
|
||||||
|
slPluginHelper.alt = slProperties.alt;
|
||||||
|
|
||||||
|
//rename properties to their tag property names. For bacwards compatibility
|
||||||
|
//with Silverlight.js version 1.0
|
||||||
|
if ( initParams )
|
||||||
|
slProperties.initParams = initParams;
|
||||||
|
if ( slProperties.isWindowless && !slProperties.windowless)
|
||||||
|
slProperties.windowless = slProperties.isWindowless;
|
||||||
|
if ( slProperties.framerate && !slProperties.maxFramerate)
|
||||||
|
slProperties.maxFramerate = slProperties.framerate;
|
||||||
|
if ( id && !slProperties.id)
|
||||||
|
slProperties.id = id;
|
||||||
|
|
||||||
|
// remove elements which are not to be added to the instantiation tag
|
||||||
|
delete slProperties.ignoreBrowserVer;
|
||||||
|
delete slProperties.inplaceInstallPrompt;
|
||||||
|
delete slProperties.version;
|
||||||
|
delete slProperties.isWindowless;
|
||||||
|
delete slProperties.framerate;
|
||||||
|
delete slProperties.data;
|
||||||
|
delete slProperties.src;
|
||||||
|
delete slProperties.alt;
|
||||||
|
|
||||||
|
|
||||||
|
// detect that the correct version of Silverlight is installed, else display install
|
||||||
|
|
||||||
|
if (Silverlight.isInstalled(slPluginHelper.version))
|
||||||
|
{
|
||||||
|
//move unknown events to the slProperties array
|
||||||
|
for (var name in slEvents)
|
||||||
|
{
|
||||||
|
if ( slEvents[name])
|
||||||
|
{
|
||||||
|
if ( name == "onLoad" && typeof slEvents[name] == "function" && slEvents[name].length != 1 )
|
||||||
|
{
|
||||||
|
var onLoadHandler = slEvents[name];
|
||||||
|
slEvents[name]=function (sender){ return onLoadHandler(document.getElementById(id), userContext, sender)};
|
||||||
|
}
|
||||||
|
var handlerName = Silverlight.__getHandlerName(slEvents[name]);
|
||||||
|
if ( handlerName != null )
|
||||||
|
{
|
||||||
|
slProperties[name] = handlerName;
|
||||||
|
slEvents[name] = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw "typeof events."+name+" must be 'function' or 'string'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
slPluginHTML = Silverlight.buildHTML(slProperties);
|
||||||
|
}
|
||||||
|
//The control could not be instantiated. Show the installation prompt
|
||||||
|
else
|
||||||
|
{
|
||||||
|
slPluginHTML = Silverlight.buildPromptHTML(slPluginHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
// insert or return the HTML
|
||||||
|
if(parentElement)
|
||||||
|
{
|
||||||
|
parentElement.innerHTML = slPluginHTML;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return slPluginHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// buildHTML:
|
||||||
|
//
|
||||||
|
// create HTML that instantiates the control
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.buildHTML = function( slProperties)
|
||||||
|
{
|
||||||
|
var htmlBuilder = [];
|
||||||
|
|
||||||
|
htmlBuilder.push('<object type=\"application/x-silverlight\" data="data:application/x-silverlight,"');
|
||||||
|
if ( slProperties.id != null )
|
||||||
|
{
|
||||||
|
htmlBuilder.push(' id="' + slProperties.id + '"');
|
||||||
|
}
|
||||||
|
if ( slProperties.width != null )
|
||||||
|
{
|
||||||
|
htmlBuilder.push(' width="' + slProperties.width+ '"');
|
||||||
|
}
|
||||||
|
if ( slProperties.height != null )
|
||||||
|
{
|
||||||
|
htmlBuilder.push(' height="' + slProperties.height + '"');
|
||||||
|
}
|
||||||
|
htmlBuilder.push(' >');
|
||||||
|
|
||||||
|
delete slProperties.id;
|
||||||
|
delete slProperties.width;
|
||||||
|
delete slProperties.height;
|
||||||
|
|
||||||
|
for (var name in slProperties)
|
||||||
|
{
|
||||||
|
if (slProperties[name])
|
||||||
|
{
|
||||||
|
htmlBuilder.push('<param name="'+Silverlight.HtmlAttributeEncode(name)+'" value="'+Silverlight.HtmlAttributeEncode(slProperties[name])+'" />');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
htmlBuilder.push('<\/object>');
|
||||||
|
return htmlBuilder.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// createObjectEx:
|
||||||
|
//
|
||||||
|
// takes a single parameter of all createObject
|
||||||
|
// parameters enclosed in {}
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Silverlight.createObjectEx = function(params)
|
||||||
|
{
|
||||||
|
var parameters = params;
|
||||||
|
var html = Silverlight.createObject(parameters.source, parameters.parentElement, parameters.id, parameters.properties, parameters.events, parameters.initParams, parameters.context);
|
||||||
|
if (parameters.parentElement == null)
|
||||||
|
{
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// buildPromptHTML
|
||||||
|
//
|
||||||
|
// Builds the HTML to prompt the user to download and install Silverlight
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.buildPromptHTML = function(slPluginHelper)
|
||||||
|
{
|
||||||
|
var slPluginHTML = "";
|
||||||
|
var urlRoot = Silverlight.fwlinkRoot;
|
||||||
|
var shortVer = slPluginHelper.version ;
|
||||||
|
if ( slPluginHelper.alt )
|
||||||
|
{
|
||||||
|
slPluginHTML = slPluginHelper.alt;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (! shortVer )
|
||||||
|
{
|
||||||
|
shortVer="";
|
||||||
|
}
|
||||||
|
slPluginHTML = "<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";
|
||||||
|
slPluginHTML = slPluginHTML.replace('{1}', shortVer );
|
||||||
|
slPluginHTML = slPluginHTML.replace('{2}', urlRoot + '108181');
|
||||||
|
}
|
||||||
|
|
||||||
|
return slPluginHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// getSilverlight:
|
||||||
|
//
|
||||||
|
// Navigates the browser to the appropriate Silverlight installer
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.getSilverlight = function(version)
|
||||||
|
{
|
||||||
|
if (Silverlight.onGetSilverlight )
|
||||||
|
{
|
||||||
|
Silverlight.onGetSilverlight();
|
||||||
|
}
|
||||||
|
|
||||||
|
var shortVer = "";
|
||||||
|
var reqVerArray = String(version).split(".");
|
||||||
|
if (reqVerArray.length > 1)
|
||||||
|
{
|
||||||
|
var majorNum = parseInt(reqVerArray[0] );
|
||||||
|
if ( isNaN(majorNum) || majorNum < 2 )
|
||||||
|
{
|
||||||
|
shortVer = "1.0";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
shortVer = reqVerArray[0]+'.'+reqVerArray[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var verArg = "";
|
||||||
|
|
||||||
|
if (shortVer.match(/^\d+\056\d+$/) )
|
||||||
|
{
|
||||||
|
verArg = "&v="+shortVer;
|
||||||
|
}
|
||||||
|
|
||||||
|
Silverlight.followFWLink("114576" + verArg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// followFWLink:
|
||||||
|
//
|
||||||
|
// Navigates to a url based on fwlinkid
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.followFWLink = function(linkid)
|
||||||
|
{
|
||||||
|
top.location=Silverlight.fwlinkRoot+String(linkid);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// HtmlAttributeEncode:
|
||||||
|
//
|
||||||
|
// Encodes special characters in input strings as charcodes
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.HtmlAttributeEncode = function( strInput )
|
||||||
|
{
|
||||||
|
var c;
|
||||||
|
var retVal = '';
|
||||||
|
|
||||||
|
if(strInput == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(var cnt = 0; cnt < strInput.length; cnt++)
|
||||||
|
{
|
||||||
|
c = strInput.charCodeAt(cnt);
|
||||||
|
|
||||||
|
if (( ( c > 96 ) && ( c < 123 ) ) ||
|
||||||
|
( ( c > 64 ) && ( c < 91 ) ) ||
|
||||||
|
( ( c > 43 ) && ( c < 58 ) && (c!=47)) ||
|
||||||
|
( c == 95 ))
|
||||||
|
{
|
||||||
|
retVal = retVal + String.fromCharCode(c);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retVal = retVal + '&#' + c + ';';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// default_error_handler:
|
||||||
|
//
|
||||||
|
// Default error handling function
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Silverlight.default_error_handler = function (sender, args)
|
||||||
|
{
|
||||||
|
var iErrorCode;
|
||||||
|
var errorType = args.ErrorType;
|
||||||
|
|
||||||
|
iErrorCode = args.ErrorCode;
|
||||||
|
|
||||||
|
var errMsg = "\nSilverlight error message \n" ;
|
||||||
|
|
||||||
|
errMsg += "ErrorCode: "+ iErrorCode + "\n";
|
||||||
|
|
||||||
|
|
||||||
|
errMsg += "ErrorType: " + errorType + " \n";
|
||||||
|
errMsg += "Message: " + args.ErrorMessage + " \n";
|
||||||
|
|
||||||
|
if (errorType == "ParserError")
|
||||||
|
{
|
||||||
|
errMsg += "XamlFile: " + args.xamlFile + " \n";
|
||||||
|
errMsg += "Line: " + args.lineNumber + " \n";
|
||||||
|
errMsg += "Position: " + args.charPosition + " \n";
|
||||||
|
}
|
||||||
|
else if (errorType == "RuntimeError")
|
||||||
|
{
|
||||||
|
if (args.lineNumber != 0)
|
||||||
|
{
|
||||||
|
errMsg += "Line: " + args.lineNumber + " \n";
|
||||||
|
errMsg += "Position: " + args.charPosition + " \n";
|
||||||
|
}
|
||||||
|
errMsg += "MethodName: " + args.methodName + " \n";
|
||||||
|
}
|
||||||
|
alert (errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// __cleanup:
|
||||||
|
//
|
||||||
|
// Releases event handler resources when the page is unloaded
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.__cleanup = function ()
|
||||||
|
{
|
||||||
|
for (var i = Silverlight._silverlightCount - 1; i >= 0; i--) {
|
||||||
|
window['__slEvent' + i] = null;
|
||||||
|
}
|
||||||
|
Silverlight._silverlightCount = 0;
|
||||||
|
if (window.removeEventListener) {
|
||||||
|
window.removeEventListener('unload', Silverlight.__cleanup , false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
window.detachEvent('onunload', Silverlight.__cleanup );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// __getHandlerName:
|
||||||
|
//
|
||||||
|
// Generates named event handlers for delegates.
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Silverlight.__getHandlerName = function (handler)
|
||||||
|
{
|
||||||
|
var handlerName = "";
|
||||||
|
if ( typeof handler == "string")
|
||||||
|
{
|
||||||
|
handlerName = handler;
|
||||||
|
}
|
||||||
|
else if ( typeof handler == "function" )
|
||||||
|
{
|
||||||
|
if (Silverlight._silverlightCount == 0)
|
||||||
|
{
|
||||||
|
if (window.addEventListener)
|
||||||
|
{
|
||||||
|
window.addEventListener('onunload', Silverlight.__cleanup , false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window.attachEvent('onunload', Silverlight.__cleanup );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var count = Silverlight._silverlightCount++;
|
||||||
|
handlerName = "__slEvent"+count;
|
||||||
|
|
||||||
|
window[handlerName]=handler;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
handlerName = null;
|
||||||
|
}
|
||||||
|
return handlerName;
|
||||||
|
}
|
||||||
@ -0,0 +1,749 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* JW WMV Player version 1.1, created with M$ Silverlight 1.0
|
||||||
|
*
|
||||||
|
* This file contains all logic for the JW WMV Player. For a functional setup,
|
||||||
|
* the following two files are also needed:
|
||||||
|
* - silverlight.js (for instantiating the silverlight plugin)
|
||||||
|
* - wmvplayer.xaml (or another XAML skin describing the player graphics)
|
||||||
|
*
|
||||||
|
* More info: http://www.jeroenwijering.com/?item=JW_WMV_Player
|
||||||
|
****************************************************************************/
|
||||||
|
if(typeof jeroenwijering == "undefined") {
|
||||||
|
var jeroenwijering = new Object();
|
||||||
|
jeroenwijering.utils = new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* The player wrapper; loads config variables and starts MVC cycle.
|
||||||
|
****************************************************************************/
|
||||||
|
jeroenwijering.Player = function(cnt,src,cfg) {
|
||||||
|
this.controller;
|
||||||
|
this.model;
|
||||||
|
this.view;
|
||||||
|
this.configuration = {
|
||||||
|
backgroundcolor:'FFFFFF',
|
||||||
|
windowless:'false',
|
||||||
|
file:'',
|
||||||
|
height:'260',
|
||||||
|
image:'',
|
||||||
|
backcolor:'FFFFFF',
|
||||||
|
frontcolor:'000000',
|
||||||
|
lightcolor:'000000',
|
||||||
|
screencolor:'000000',
|
||||||
|
width:'320',
|
||||||
|
logo:'',
|
||||||
|
overstretch:'false',
|
||||||
|
shownavigation:'true',
|
||||||
|
showstop:'false',
|
||||||
|
showdigits:'true',
|
||||||
|
usefullscreen:'true',
|
||||||
|
usemute:'false',
|
||||||
|
autostart:'false',
|
||||||
|
bufferlength:'3',
|
||||||
|
duration:'0',
|
||||||
|
repeat:'false',
|
||||||
|
sender:'',
|
||||||
|
start:'0',
|
||||||
|
volume:'90',
|
||||||
|
link:'',
|
||||||
|
linkfromdisplay:'false',
|
||||||
|
linktarget:'_self'
|
||||||
|
};
|
||||||
|
for(itm in this.configuration) {
|
||||||
|
if(cfg[itm] != undefined) {
|
||||||
|
if (itm.indexOf('color') > 0) {
|
||||||
|
this.configuration[itm] = cfg[itm].substr(cfg[itm].length-6);
|
||||||
|
} else {
|
||||||
|
this.configuration[itm] = cfg[itm];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Silverlight.createObjectEx({
|
||||||
|
source:src,
|
||||||
|
parentElement:cnt,
|
||||||
|
properties:{
|
||||||
|
width:this.configuration['width'],
|
||||||
|
height:this.configuration['height'],
|
||||||
|
version:'1.0',
|
||||||
|
inplaceInstallPrompt:true,
|
||||||
|
isWindowless:this.configuration['windowless'],
|
||||||
|
background:'#'+this.configuration['backgroundcolor']
|
||||||
|
},
|
||||||
|
events:{
|
||||||
|
onLoad:this.onLoadHandler,
|
||||||
|
onError:null
|
||||||
|
},
|
||||||
|
context:this
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
jeroenwijering.Player.prototype = {
|
||||||
|
addListener: function(typ,fcn) {
|
||||||
|
this.view.listeners.push({type:typ,func:fcn});
|
||||||
|
},
|
||||||
|
|
||||||
|
getConfig: function() {
|
||||||
|
return this.configuration;
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoadHandler: function(pid,tgt,sdr) {
|
||||||
|
tgt.configuration['sender'] = sdr;
|
||||||
|
tgt.controller = new jeroenwijering.Controller(tgt.configuration);
|
||||||
|
tgt.view = new jeroenwijering.View(tgt.configuration,tgt.controller);
|
||||||
|
tgt.model = new jeroenwijering.Model(tgt.configuration,tgt.controller,tgt.view);
|
||||||
|
tgt.controller.startMVC(tgt.view,tgt.model);
|
||||||
|
},
|
||||||
|
|
||||||
|
sendEvent: function(typ,prm) {
|
||||||
|
switch(typ.toUpperCase()) {
|
||||||
|
case 'LINK':
|
||||||
|
this.controller.setLink();
|
||||||
|
break;
|
||||||
|
case 'LOAD':
|
||||||
|
this.controller.setLoad(prm);
|
||||||
|
break;
|
||||||
|
case 'MUTE':
|
||||||
|
this.controller.setMute();
|
||||||
|
break;
|
||||||
|
case 'PLAY':
|
||||||
|
this.controller.setPlay();
|
||||||
|
break;
|
||||||
|
case 'SCRUB':
|
||||||
|
this.controller.setScrub(prm);
|
||||||
|
break;
|
||||||
|
case 'STOP':
|
||||||
|
this.controller.setStop();
|
||||||
|
break;
|
||||||
|
case 'VOLUME':
|
||||||
|
this.controller.setVolume(prm);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* The controller of the player MVC triad, which processes all user input.
|
||||||
|
****************************************************************************/
|
||||||
|
jeroenwijering.Controller = function(cfg) {
|
||||||
|
this.configuration = cfg;
|
||||||
|
}
|
||||||
|
|
||||||
|
jeroenwijering.Controller.prototype = {
|
||||||
|
startMVC: function(vie,mdl) {
|
||||||
|
this.view = vie;
|
||||||
|
this.model = mdl;
|
||||||
|
if(this.configuration['usemute'] == 'true') {
|
||||||
|
this.view.onVolume(0);
|
||||||
|
this.view.onMute(true);
|
||||||
|
this.model.goVolume(0);
|
||||||
|
} else {
|
||||||
|
this.view.onVolume(this.configuration['volume']);
|
||||||
|
this.model.goVolume(this.configuration['volume']);
|
||||||
|
}
|
||||||
|
if(this.configuration['autostart'] == 'true') {
|
||||||
|
this.model.goStart();
|
||||||
|
} else {
|
||||||
|
this.model.goPause();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setState: function(old,stt) {
|
||||||
|
this.state = stt;
|
||||||
|
var pos = this.configuration['start'];
|
||||||
|
if(old == 'Closed' && pos > 0) {
|
||||||
|
setTimeout(jeroenwijering.utils.delegate(this,this.setScrub),200,pos);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setLink: function() {
|
||||||
|
if (this.configuration['linktarget'].indexOf('javascript:') == 0) {
|
||||||
|
return Function(this.configuration['linktarget']).apply();
|
||||||
|
} else if (this.configuration['linktarget'] == '_blank') {
|
||||||
|
window.open(this.configuration['link']);
|
||||||
|
} else if (this.configuration['linktarget'] != '') {
|
||||||
|
window.location = this.configuration['link'];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setLoad: function(fil) {
|
||||||
|
if(this.model.state != "Closed") {
|
||||||
|
this.model.goStop();
|
||||||
|
}
|
||||||
|
this.configuration['file'] = fil;
|
||||||
|
if(this.configuration['autostart'] == 'true') {
|
||||||
|
setTimeout(jeroenwijering.utils.delegate(this.model,this.model.goStart),100);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setMute: function() {
|
||||||
|
if(this.configuration['usemute'] == 'true') {
|
||||||
|
this.configuration['usemute'] = 'false';
|
||||||
|
this.model.goVolume(this.configuration['volume']);
|
||||||
|
this.view.onMute(false);
|
||||||
|
} else {
|
||||||
|
this.configuration['usemute'] = 'true';
|
||||||
|
this.model.goVolume(0);
|
||||||
|
this.view.onMute(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setPlay: function() {
|
||||||
|
if(this.state == 'Buffering' || this.state == 'Playing') {
|
||||||
|
if(this.configuration['duration'] == 0) {
|
||||||
|
this.model.goStop();
|
||||||
|
} else {
|
||||||
|
this.model.goPause();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.model.goStart();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setScrub: function(sec) {
|
||||||
|
if(sec < 2) {
|
||||||
|
sec = 0;
|
||||||
|
} else if (sec > this.configuration['duration']-4) {
|
||||||
|
sec = this.configuration['duration']-4;
|
||||||
|
}
|
||||||
|
if(this.state == 'Buffering' || this.state == 'Playing') {
|
||||||
|
this.model.goStart(sec);
|
||||||
|
} else {
|
||||||
|
this.model.goPause(sec);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setStop: function() {
|
||||||
|
this.model.goStop();
|
||||||
|
},
|
||||||
|
|
||||||
|
setVolume: function(pct) {
|
||||||
|
if(pct < 0) { pct = 0; } else if(pct > 100) { pct = 100; }
|
||||||
|
this.configuration['volume'] = Math.round(pct);
|
||||||
|
this.model.goVolume(pct);
|
||||||
|
this.view.onVolume(pct);
|
||||||
|
if(this.configuration['usemute'] == 'true') {
|
||||||
|
this.configuration['usemute'] = 'false';
|
||||||
|
this.view.onMute(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setFullscreen: function() {
|
||||||
|
var fss = !this.configuration['sender'].getHost().content.FullScreen;
|
||||||
|
this.configuration['sender'].getHost().content.FullScreen = fss;
|
||||||
|
jeroenwijering.utils.delegate(this.view,this.view.onFullscreen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* The view of the player MVC triad, which manages the graphics.
|
||||||
|
****************************************************************************/
|
||||||
|
jeroenwijering.View = function(cfg,ctr) {
|
||||||
|
this.configuration = cfg;
|
||||||
|
this.listeners = Array();
|
||||||
|
this.controller = ctr;
|
||||||
|
this.fstimeout;
|
||||||
|
this.fslistener;
|
||||||
|
this.display = this.configuration['sender'].findName("PlayerDisplay");
|
||||||
|
this.controlbar = this.configuration['sender'].findName("PlayerControls");
|
||||||
|
this.configuration['sender'].getHost().content.onResize =
|
||||||
|
jeroenwijering.utils.delegate(this,this.resizePlayer);
|
||||||
|
this.configuration['sender'].getHost().content.onFullScreenChange =
|
||||||
|
jeroenwijering.utils.delegate(this,this.onFullscreen);
|
||||||
|
this.assignColorsClicks();
|
||||||
|
this.resizePlayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
jeroenwijering.View.prototype = {
|
||||||
|
onBuffer: function(pct) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
if(pct == 0) {
|
||||||
|
snd.findName("BufferText").Text = null;
|
||||||
|
} else {
|
||||||
|
pct < 10 ? pct = "0"+pct: pct = ""+pct;
|
||||||
|
snd.findName("BufferText").Text = pct;
|
||||||
|
}
|
||||||
|
this.delegate('BUFFER',[pct]);
|
||||||
|
},
|
||||||
|
|
||||||
|
onFullscreen: function(fss) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
var fst = snd.getHost().content.FullScreen;
|
||||||
|
if(fst) {
|
||||||
|
this.fstimeout = setTimeout(jeroenwijering.utils.delegate(this,
|
||||||
|
this.hideFSControls),2000);
|
||||||
|
this.fslistener = this.display.addEventListener('MouseMove',
|
||||||
|
jeroenwijering.utils.delegate(this,this.showFSControls));
|
||||||
|
snd.findName("FullscreenSymbol").Visibility = "Collapsed";
|
||||||
|
snd.findName("FullscreenOffSymbol").Visibility = "Visible";
|
||||||
|
} else {
|
||||||
|
clearTimeout(this.fstimeout);
|
||||||
|
this.display.removeEventListener("MouseMove",this.fslistener);
|
||||||
|
this.controlbar.Visibility = "Visible";
|
||||||
|
this.display.Cursor = "Hand";
|
||||||
|
snd.findName("FullscreenSymbol").Visibility = "Visible";
|
||||||
|
snd.findName("FullscreenOffSymbol").Visibility = "Collapsed";
|
||||||
|
}
|
||||||
|
this.resizePlayer();
|
||||||
|
this.delegate('FULLSCREEN');
|
||||||
|
},
|
||||||
|
|
||||||
|
showFSControls: function(sdr,arg) {
|
||||||
|
var vbt = sdr.findName('PlayerControls');
|
||||||
|
var yps = arg.GetPosition(vbt).Y;
|
||||||
|
clearTimeout(this.fstimeout);
|
||||||
|
this.controlbar.Visibility = "Visible";
|
||||||
|
this.display.Cursor = "Hand";
|
||||||
|
if(yps < 0) {
|
||||||
|
this.fstimeout = setTimeout(jeroenwijering.utils.delegate(this,
|
||||||
|
this.hideFSControls),2000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
hideFSControls: function() {
|
||||||
|
this.controlbar.Visibility = "Collapsed";
|
||||||
|
this.display.Cursor = "None";
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad: function(pct) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
var max = snd.findName("TimeSlider").Width;
|
||||||
|
snd.findName("DownloadProgress").Width = Math.round(max*pct/100);
|
||||||
|
this.delegate('LOAD',[pct]);
|
||||||
|
},
|
||||||
|
|
||||||
|
onMute: function(mut) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
this.configuration['usemute'] = ''+mut;
|
||||||
|
if(mut) {
|
||||||
|
snd.findName("VolumeHighlight").Visibility = "Collapsed";
|
||||||
|
snd.findName("MuteSymbol").Visibility = "Visible";
|
||||||
|
snd.findName("MuteOffSymbol").Visibility = "Collapsed";
|
||||||
|
if(this.state == 'Playing') {
|
||||||
|
snd.findName("MuteIcon").Visibility = "Visible";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
snd.findName("VolumeHighlight").Visibility = "Visible";
|
||||||
|
snd.findName("MuteSymbol").Visibility = "Collapsed";
|
||||||
|
snd.findName("MuteOffSymbol").Visibility = "Visible";
|
||||||
|
snd.findName("MuteIcon").Visibility = "Collapsed";
|
||||||
|
}
|
||||||
|
this.delegate('MUTE');
|
||||||
|
},
|
||||||
|
|
||||||
|
onState: function(old,stt) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
this.state = stt;
|
||||||
|
if(stt == 'Buffering' || stt == 'Playing' || stt == 'Opening') {
|
||||||
|
snd.findName("PlayIcon").Visibility = "Collapsed";
|
||||||
|
snd.findName("PlaySymbol").Visibility = "Collapsed";
|
||||||
|
snd.findName("PlayOffSymbol").Visibility = "Visible";
|
||||||
|
if (stt=='Playing') {
|
||||||
|
snd.findName("BufferIcon").Visibility = "Collapsed";
|
||||||
|
snd.findName("BufferText").Visibility = "Collapsed";
|
||||||
|
if(this.configuration['usemute'] == 'true') {
|
||||||
|
snd.findName("MuteIcon").Visibility = "Visible";
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
snd.findName("BufferIcon").Visibility = "Visible";
|
||||||
|
snd.findName("BufferText").Visibility = "Visible";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
snd.findName("MuteIcon").Visibility = "Collapsed";
|
||||||
|
snd.findName("BufferIcon").Visibility = "Collapsed";
|
||||||
|
snd.findName("BufferText").Visibility = "Collapsed";
|
||||||
|
snd.findName("PlayOffSymbol").Visibility = "Collapsed";
|
||||||
|
snd.findName("PlaySymbol").Visibility = "Visible";
|
||||||
|
if(this.configuration['linkfromdisplay'] == 'true') {
|
||||||
|
snd.findName("PlayIcon").Visibility = "Collapsed";
|
||||||
|
} else {
|
||||||
|
snd.findName("PlayIcon").Visibility = "Visible";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if(!(old == 'Completed' && stt == 'Buffering') &&
|
||||||
|
!(old == 'Buffering' && stt == 'Paused')) {
|
||||||
|
playerStatusChange(old.toUpperCase(),stt.toUpperCase());
|
||||||
|
}
|
||||||
|
} catch (err) {}
|
||||||
|
this.delegate('STATE',[old,stt]);
|
||||||
|
},
|
||||||
|
|
||||||
|
onTime: function(elp,dur) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
var max = snd.findName("TimeSlider").Width;
|
||||||
|
if(dur > 0) {
|
||||||
|
var pos = Math.round(max*elp/dur);
|
||||||
|
this.configuration['duration'] = dur;
|
||||||
|
snd.findName("ElapsedText").Text = jeroenwijering.utils.timestring(elp);
|
||||||
|
snd.findName("RemainingText").Text = jeroenwijering.utils.timestring(dur-elp);
|
||||||
|
snd.findName("TimeSymbol").Visibility = "Visible";
|
||||||
|
snd.findName("TimeSymbol")['Canvas.Left'] = pos+4;
|
||||||
|
snd.findName("TimeHighlight").Width = pos-2;
|
||||||
|
} else {
|
||||||
|
snd.findName("TimeSymbol").Visibility = "Collapsed";
|
||||||
|
}
|
||||||
|
this.delegate('TIME',[elp,dur]);
|
||||||
|
},
|
||||||
|
|
||||||
|
onVolume: function(pct) {
|
||||||
|
var snd = this.configuration['sender'];
|
||||||
|
snd.findName("VolumeHighlight").Width = Math.round(pct/5);
|
||||||
|
this.delegate('VOLUME',[pct]);
|
||||||
|
},
|
||||||
|
|
||||||
|
assignColorsClicks: function() {
|
||||||
|
this.display.Cursor = "Hand";
|
||||||
|
this.display.Background = "#FF"+this.configuration['screencolor'];
|
||||||
|
if(this.configuration['linkfromdisplay'] == 'false') {
|
||||||
|
this.display.addEventListener('MouseLeftButtonUp',
|
||||||
|
jeroenwijering.utils.delegate(this.controller,
|
||||||
|
this.controller.setPlay));
|
||||||
|
} else {
|
||||||
|
this.display.addEventListener('MouseLeftButtonUp',
|
||||||
|
jeroenwijering.utils.delegate(this.controller,
|
||||||
|
this.controller.setLink));
|
||||||
|
this.display.findName("PlayIcon").Visibility = "Collapsed";
|
||||||
|
}
|
||||||
|
if(this.configuration['logo'] != '') {
|
||||||
|
this.display.findName('OverlayCanvas').Visibility = "Visible";
|
||||||
|
this.display.findName('OverlayLogo').ImageSource =
|
||||||
|
this.configuration['logo'];
|
||||||
|
}
|
||||||
|
this.controlbar.findName("ControlbarBack").Fill =
|
||||||
|
"#FF"+this.configuration['backcolor'];
|
||||||
|
this.assignButton('Play',this.controller.setPlay);
|
||||||
|
this.assignButton('Stop',this.controller.setStop);
|
||||||
|
this.configuration['sender'].findName('ElapsedText').Foreground =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
this.assignSlider('Time',this.changeTime);
|
||||||
|
this.configuration['sender'].findName('DownloadProgress').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
this.configuration['sender'].findName('RemainingText').Foreground =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
this.assignButton('Link',this.controller.setLink);
|
||||||
|
this.assignButton('Fullscreen',this.controller.setFullscreen);
|
||||||
|
this.assignButton('Mute',this.controller.setMute);
|
||||||
|
this.assignSlider('Volume',this.changeVolume);
|
||||||
|
},
|
||||||
|
|
||||||
|
assignButton: function(btn,act) {
|
||||||
|
var el1 = this.configuration['sender'].findName(btn+'Button');
|
||||||
|
el1.Cursor = "Hand";
|
||||||
|
el1.addEventListener('MouseLeftButtonUp',
|
||||||
|
jeroenwijering.utils.delegate(this.controller,act));
|
||||||
|
el1.addEventListener('MouseEnter',
|
||||||
|
jeroenwijering.utils.delegate(this,this.rollOver));
|
||||||
|
el1.addEventListener('MouseLeave',
|
||||||
|
jeroenwijering.utils.delegate(this,this.rollOut));
|
||||||
|
this.configuration['sender'].findName(btn+'Symbol').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
try {
|
||||||
|
this.configuration['sender'].findName(btn+'OffSymbol').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
} catch(e) {}
|
||||||
|
},
|
||||||
|
|
||||||
|
assignSlider: function(sld,act) {
|
||||||
|
var el1 = this.configuration['sender'].findName(sld+'Button');
|
||||||
|
el1.Cursor = "Hand";
|
||||||
|
el1.addEventListener('MouseLeftButtonUp',
|
||||||
|
jeroenwijering.utils.delegate(this,act));
|
||||||
|
el1.addEventListener('MouseEnter',
|
||||||
|
jeroenwijering.utils.delegate(this,this.rollOver));
|
||||||
|
el1.addEventListener('MouseLeave',
|
||||||
|
jeroenwijering.utils.delegate(this,this.rollOut));
|
||||||
|
this.configuration['sender'].findName(sld+'Slider').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
this.configuration['sender'].findName(sld+'Highlight').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
this.configuration['sender'].findName(sld+'Symbol').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
},
|
||||||
|
|
||||||
|
delegate: function(typ,arg) {
|
||||||
|
for(var i=0; i<this.listeners.length; i++) {
|
||||||
|
if(this.listeners[i]['type'].toUpperCase() == typ) {
|
||||||
|
this.listeners[i]['func'].apply(null,arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
rollOver: function(sdr) {
|
||||||
|
var str = sdr.Name.substr(0,sdr.Name.length-6);
|
||||||
|
this.configuration['sender'].findName(str+'Symbol').Fill =
|
||||||
|
"#FF"+this.configuration['lightcolor'];
|
||||||
|
try {
|
||||||
|
this.configuration['sender'].findName(str+'OffSymbol').Fill =
|
||||||
|
"#FF"+this.configuration['lightcolor'];
|
||||||
|
} catch(e) {}
|
||||||
|
},
|
||||||
|
|
||||||
|
rollOut: function(sdr) {
|
||||||
|
var str = sdr.Name.substr(0,sdr.Name.length-6);
|
||||||
|
this.configuration['sender'].findName(str+'Symbol').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
try {
|
||||||
|
this.configuration['sender'].findName(str+'OffSymbol').Fill =
|
||||||
|
"#FF"+this.configuration['frontcolor'];
|
||||||
|
} catch(e) {}
|
||||||
|
},
|
||||||
|
|
||||||
|
changeTime: function(sdr,arg) {
|
||||||
|
var tbt = sdr.findName('TimeSlider');
|
||||||
|
var xps = arg.GetPosition(tbt).X;
|
||||||
|
var sec = Math.floor(xps/tbt.Width*this.configuration['duration']);
|
||||||
|
this.controller.setScrub(sec);
|
||||||
|
},
|
||||||
|
|
||||||
|
changeVolume: function(sdr,arg) {
|
||||||
|
var vbt = sdr.findName('VolumeButton');
|
||||||
|
var xps = arg.GetPosition(vbt).X;
|
||||||
|
this.controller.setVolume(xps*5);
|
||||||
|
},
|
||||||
|
|
||||||
|
resizePlayer: function() {
|
||||||
|
var wid = this.configuration['sender'].getHost().content.actualWidth;
|
||||||
|
var hei = this.configuration['sender'].getHost().content.actualHeight;
|
||||||
|
var fss = this.configuration['sender'].getHost().content.FullScreen;
|
||||||
|
if(this.configuration['shownavigation'] == 'true') {
|
||||||
|
if(fss == true) {
|
||||||
|
this.resizeDisplay(wid,hei);
|
||||||
|
this.controlbar['Canvas.Left'] = Math.round(wid/2-250);
|
||||||
|
this.resizeControlbar(500,hei-this.controlbar.Height-16);
|
||||||
|
this.controlbar.findName('ControlbarBack')['Opacity'] = 0.5;
|
||||||
|
} else {
|
||||||
|
this.resizeDisplay(wid,hei-20);
|
||||||
|
this.controlbar['Canvas.Left'] = 0;
|
||||||
|
this.resizeControlbar(wid,hei-this.controlbar.Height);
|
||||||
|
this.controlbar.findName('ControlbarBack')['Opacity'] = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.resizeDisplay(wid,hei);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
resizeDisplay: function(wid,hei) {
|
||||||
|
this.stretchElement('PlayerDisplay',wid,hei);
|
||||||
|
this.stretchElement('VideoWindow',wid,hei);
|
||||||
|
this.stretchElement('PlaceholderImage',wid,hei);
|
||||||
|
this.centerElement('PlayIcon',wid,hei);
|
||||||
|
this.centerElement('MuteIcon',wid,hei);
|
||||||
|
this.centerElement('BufferIcon',wid,hei);
|
||||||
|
this.centerElement('BufferText',wid,hei);
|
||||||
|
this.display.findName('OverlayCanvas')['Canvas.Left'] = wid -
|
||||||
|
this.display.findName('OverlayCanvas').Width - 10;
|
||||||
|
this.display.Visibility = "Visible";
|
||||||
|
},
|
||||||
|
|
||||||
|
resizeControlbar: function(wid,yps,alp) {
|
||||||
|
this.controlbar['Canvas.Top'] = yps;
|
||||||
|
this.stretchElement('PlayerControls',wid);
|
||||||
|
this.stretchElement('ControlbarBack',wid);
|
||||||
|
this.placeElement('PlayButton',0);
|
||||||
|
var lft = 17;
|
||||||
|
this.placeElement('VolumeButton',wid-24);
|
||||||
|
this.placeElement('MuteButton',wid-37);
|
||||||
|
var rgt = 37;
|
||||||
|
if(this.configuration['showstop'] == 'true') {
|
||||||
|
this.placeElement('StopButton',lft);
|
||||||
|
lft += 17;
|
||||||
|
} else {
|
||||||
|
this.controlbar.findName('StopButton').Visibility="Collapsed";
|
||||||
|
}
|
||||||
|
if(this.configuration['usefullscreen'] == 'true') {
|
||||||
|
rgt += 18;
|
||||||
|
this.placeElement('FullscreenButton',wid-rgt);
|
||||||
|
} else {
|
||||||
|
this.controlbar.findName('FullscreenButton').Visibility =
|
||||||
|
"Collapsed";
|
||||||
|
}
|
||||||
|
if(this.configuration['link'] != '') {
|
||||||
|
rgt += 18;
|
||||||
|
this.placeElement('LinkButton',wid-rgt);
|
||||||
|
} else {
|
||||||
|
this.controlbar.findName('LinkButton').Visibility="Collapsed";
|
||||||
|
}
|
||||||
|
if(this.configuration['showdigits'] == 'true' && wid-rgt-lft> 160) {
|
||||||
|
rgt += 35;
|
||||||
|
this.controlbar.findName('RemainingButton').Visibility="Visible";
|
||||||
|
this.controlbar.findName('ElapsedButton').Visibility="Visible";
|
||||||
|
this.placeElement('RemainingButton',wid-rgt);
|
||||||
|
this.placeElement('ElapsedButton',lft);
|
||||||
|
lft +=35;
|
||||||
|
} else {
|
||||||
|
this.controlbar.findName('RemainingButton').Visibility =
|
||||||
|
"Collapsed";
|
||||||
|
this.controlbar.findName('ElapsedButton').Visibility="Collapsed";
|
||||||
|
}
|
||||||
|
this.placeElement('TimeButton',lft);
|
||||||
|
this.stretchElement('TimeButton',wid-lft-rgt);
|
||||||
|
this.stretchElement('TimeShadow',wid-lft-rgt);
|
||||||
|
this.stretchElement('TimeStroke',wid-lft-rgt);
|
||||||
|
this.stretchElement('TimeFill',wid-lft-rgt);
|
||||||
|
this.stretchElement('TimeSlider',wid-lft-rgt-10);
|
||||||
|
this.stretchElement('DownloadProgress',wid-lft-rgt-10);
|
||||||
|
var tsb = this.configuration['sender'].findName('TimeSymbol');
|
||||||
|
this.stretchElement('TimeHighlight',tsb['Canvas.Left']-5);
|
||||||
|
this.controlbar.Visibility = "Visible";
|
||||||
|
},
|
||||||
|
|
||||||
|
centerElement: function(nam,wid,hei) {
|
||||||
|
var elm = this.configuration['sender'].findName(nam);
|
||||||
|
elm['Canvas.Left'] = Math.round(wid/2 - elm.Width/2);
|
||||||
|
elm['Canvas.Top'] = Math.round(hei/2 - elm.Height/2);
|
||||||
|
},
|
||||||
|
|
||||||
|
stretchElement: function(nam,wid,hei) {
|
||||||
|
var elm = this.configuration['sender'].findName(nam);
|
||||||
|
elm.Width = wid;
|
||||||
|
if (hei != undefined) { elm.Height = hei; }
|
||||||
|
},
|
||||||
|
|
||||||
|
placeElement: function(nam,xps,yps) {
|
||||||
|
var elm = this.configuration['sender'].findName(nam);
|
||||||
|
elm['Canvas.Left'] = xps;
|
||||||
|
if(yps) { elm['Canvas.Top'] = yps; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* The model of the player MVC triad, which stores all playback logic.
|
||||||
|
****************************************************************************/
|
||||||
|
jeroenwijering.Model = function(cfg,ctr,vie) {
|
||||||
|
this.configuration = cfg;
|
||||||
|
this.controller = ctr;
|
||||||
|
this.view = vie;
|
||||||
|
this.video = this.configuration['sender'].findName("VideoWindow");
|
||||||
|
this.preview = this.configuration['sender'].findName("PlaceholderImage");
|
||||||
|
var str = {
|
||||||
|
'true':'UniformToFill',
|
||||||
|
'false':'Uniform',
|
||||||
|
'fit':'Fill',
|
||||||
|
'none':'None'
|
||||||
|
}
|
||||||
|
this.state = this.video.CurrentState;
|
||||||
|
this.timeint;
|
||||||
|
this.video.Stretch = str[this.configuration['overstretch']];
|
||||||
|
this.preview.Stretch = str[this.configuration['overstretch']];
|
||||||
|
this.video.BufferingTime =
|
||||||
|
jeroenwijering.utils.spanstring(this.configuration['bufferlength']);
|
||||||
|
this.video.AutoPlay = true;
|
||||||
|
this.video.AddEventListener("CurrentStateChanged",
|
||||||
|
jeroenwijering.utils.delegate(this,this.stateChanged));
|
||||||
|
this.video.AddEventListener("MediaEnded",
|
||||||
|
jeroenwijering.utils.delegate(this,this.mediaEnded));
|
||||||
|
this.video.AddEventListener("BufferingProgressChanged",
|
||||||
|
jeroenwijering.utils.delegate(this,this.bufferChanged));
|
||||||
|
this.video.AddEventListener("DownloadProgressChanged",
|
||||||
|
jeroenwijering.utils.delegate(this,this.downloadChanged));
|
||||||
|
if(this.configuration['image'] != '') {
|
||||||
|
this.preview.Source = this.configuration['image'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jeroenwijering.Model.prototype = {
|
||||||
|
goPause: function(sec) {
|
||||||
|
this.video.pause();
|
||||||
|
if(!isNaN(sec)) {
|
||||||
|
this.video.Position = jeroenwijering.utils.spanstring(sec);
|
||||||
|
}
|
||||||
|
this.timeChanged();
|
||||||
|
},
|
||||||
|
|
||||||
|
goStart: function(sec) {
|
||||||
|
this.video.Visibility = 'Visible';
|
||||||
|
this.preview.Visibility = 'Collapsed';
|
||||||
|
if(this.state == "Closed") {
|
||||||
|
this.video.Source = this.configuration['file'];
|
||||||
|
} else {
|
||||||
|
this.video.play();
|
||||||
|
}
|
||||||
|
if(!isNaN(sec)) {
|
||||||
|
this.video.Position = jeroenwijering.utils.spanstring(sec);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
goStop: function() {
|
||||||
|
this.video.Visibility = 'Collapsed';
|
||||||
|
this.preview.Visibility = 'Visible';
|
||||||
|
this.goPause(0);
|
||||||
|
this.video.Source = 'null';
|
||||||
|
this.view.onBuffer(0);
|
||||||
|
clearInterval(this.timeint);
|
||||||
|
},
|
||||||
|
|
||||||
|
goVolume: function(pct) {
|
||||||
|
this.video.Volume = pct/100;
|
||||||
|
},
|
||||||
|
|
||||||
|
stateChanged: function() {
|
||||||
|
var stt = this.video.CurrentState;
|
||||||
|
if(stt != this.state) {
|
||||||
|
this.controller.setState(this.state,stt);
|
||||||
|
this.view.onState(this.state,stt);
|
||||||
|
this.state = stt;
|
||||||
|
this.configuration['duration'] =
|
||||||
|
Math.round(this.video.NaturalDuration.Seconds*10)/10;
|
||||||
|
if(stt != "Playing" && stt != "Buffering" && stt != "Opening") {
|
||||||
|
clearInterval(this.timeint);
|
||||||
|
} else {
|
||||||
|
this.timeint = setInterval(jeroenwijering.utils.delegate(
|
||||||
|
this,this.timeChanged),100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mediaEnded: function() {
|
||||||
|
if(this.configuration['repeat'] == 'true') {
|
||||||
|
this.goStart(0);
|
||||||
|
} else {
|
||||||
|
this.state = 'Completed';
|
||||||
|
this.view.onState(this.state,'Completed');
|
||||||
|
this.video.Visibility = 'Collapsed';
|
||||||
|
this.preview.Visibility = 'Visible';
|
||||||
|
this.goPause(0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
bufferChanged: function() {
|
||||||
|
var bfr = Math.round(this.video.BufferingProgress*100);
|
||||||
|
this.view.onBuffer(bfr);
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadChanged: function() {
|
||||||
|
var dld = Math.round(this.video.DownloadProgress*100);
|
||||||
|
this.view.onLoad(dld);
|
||||||
|
},
|
||||||
|
|
||||||
|
timeChanged: function() {
|
||||||
|
var pos = Math.round(this.video.Position.Seconds*10)/10;
|
||||||
|
this.view.onTime(pos,this.configuration['duration']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Some utility functions.
|
||||||
|
****************************************************************************/
|
||||||
|
jeroenwijering.utils.delegate = function(obj,fcn) {
|
||||||
|
return function() {
|
||||||
|
return fcn.apply(obj,arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jeroenwijering.utils.timestring = function(stp) {
|
||||||
|
var hrs = Math.floor(stp/3600);
|
||||||
|
var min = Math.floor(stp%3600/60);
|
||||||
|
var sec = Math.round(stp%60);
|
||||||
|
var str = "";
|
||||||
|
sec > 9 ? str += sec: str +='0'+sec;
|
||||||
|
min > 9 ? str = min+":"+str: str='0'+min+":"+str;
|
||||||
|
hrs > 0 ? str = hrs+":"+str: null;
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
jeroenwijering.utils.spanstring = function(stp) {
|
||||||
|
var hrs = Math.floor(stp/3600);
|
||||||
|
var min = Math.floor(stp%3600/60);
|
||||||
|
var sec = Math.round(stp%60*10)/10;
|
||||||
|
var str = hrs+':'+min+':'+sec;
|
||||||
|
return str;
|
||||||
|
}
|
||||||
@ -0,0 +1,313 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
JW WMV Player version 1.1, created with M$ Silverlight 1.0.
|
||||||
|
|
||||||
|
This file contains all logic for the JW WMV Player. For a functional setup,
|
||||||
|
the following two files are also needed:
|
||||||
|
- silverlight.js (for instantiating the silverlight plugin)
|
||||||
|
- wmvplayer.js (this file contains all the scripting logic)
|
||||||
|
|
||||||
|
More info: http://www.jeroenwijering.com/?item=JW_WMV_Player
|
||||||
|
-->
|
||||||
|
|
||||||
|
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="320" Height="260">
|
||||||
|
|
||||||
|
<Canvas x:Name="PlayerDisplay" Width="320" Height="240" Background="#FF000000" Visibility="Collapsed">
|
||||||
|
<Image x:Name="PlaceholderImage" Width="320" Height="240" />
|
||||||
|
<MediaElement x:Name="VideoWindow" Width="320" Height="240" />
|
||||||
|
<Canvas x:Name="PlayIcon" Width="40" Height="40" Canvas.Left="140" Canvas.Top="100">
|
||||||
|
<Path x:Name="PlayIconBack" Width="40" Height="40" Fill="#77000000" Data="F1 M4,0 L36,0 C38,0 40,2 40,4 L40,36 C40,38 38,40 36,40 L4,40 C2,40 0,38 0,36 L0,4 C0,2 2,0 4,0 Z"/>
|
||||||
|
<Path x:Name="PlayIconFront" Width="18" Height="18" Canvas.Left="12" Canvas.Top="11" Fill="#FFFFFFFF" Data="F1 M0,0 L18,9 L0,18 L0,0 Z"/>
|
||||||
|
</Canvas>
|
||||||
|
<Canvas x:Name="MuteIcon" Width="40" Height="40" Canvas.Left="140" Canvas.Top="100" Visibility="Collapsed">
|
||||||
|
<Path x:Name="MuteIconBack" Width="40" Height="40" Fill="#77000000" Data="F1 M4,0 L36,0 C38,0 40,2 40,4 L40,36 C40,38 38,40 36,40 L4,40 C2,40 0,38 0,36 L0,4 C0,2 2,0 4,0 Z"/>
|
||||||
|
<Path x:Name="MuteIconFront" Width="18" Height="18" Canvas.Left="13" Canvas.Top="11" Fill="#FFFFFFFF" Data="F1 M0,4 L4,4 L4,14 L0,14 L0,4 M6,4 L11,0 L11,18 L6,14 L6,4 M14,8 L18,8 L18,10 L14,10 L14,8 Z"/>
|
||||||
|
</Canvas>
|
||||||
|
<Canvas x:Name="BufferIcon" Width="32" Height="32" Canvas.Left="148" Canvas.Top="98" Visibility="Collapsed">
|
||||||
|
<Canvas.RenderTransform>
|
||||||
|
<RotateTransform x:Name="BufferRotation" Angle="0" CenterX="16" CenterY="16" />
|
||||||
|
</Canvas.RenderTransform>
|
||||||
|
<Canvas.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="Canvas.Loaded">
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="BufferRotation" Storyboard.TargetProperty="Angle" Duration="0:0:1.2" RepeatBehavior="Forever">
|
||||||
|
<DiscreteDoubleKeyFrame Value="30" KeyTime="0:0:0.1" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="60" KeyTime="0:0:0.2" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="90" KeyTime="0:0:0.3" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="120" KeyTime="0:0:0.4" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="150" KeyTime="0:0:0.5" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="180" KeyTime="0:0:0.6" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="210" KeyTime="0:0:0.7" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="240" KeyTime="0:0:0.8" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="270" KeyTime="0:0:0.9" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="300" KeyTime="0:0:1" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="330" KeyTime="0:0:1.1" />
|
||||||
|
<DiscreteDoubleKeyFrame Value="360" KeyTime="0:0:1.2" />
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger>
|
||||||
|
</Canvas.Triggers>
|
||||||
|
<Path x:Name="BufferPath1" Width="2" Height="8" Canvas.Left="15" Canvas.Top="0" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M16,0 L16,0 C16.55,0 17,0.45 17,1 L17,7 C17,7.55 16.55,8 16,8 L16,8C 15.45,8 15,7.55 15,7 L15,1 C15,0.45 15.45,0 16,0 Z "/>
|
||||||
|
<Path x:Name="BufferPath2" Width="5" Height="7.2" Canvas.Left="7.5" Canvas.Top="2" Stretch="Fill" Fill="#EEFFFFFF" Data="F1 M8,2.14 L8,2.14 C8.48,1.87 9.09,2.03 9.37,2.51 L12.366,7.71 C12.64,8.18 12.48,8.80 12,9.07 L12,9.07 C11.52,9.35 10.91,9.18 10.63,8.71 L7.63,3.51 C7.36,3.03 7.52,2.42 8,2.14 Z "/>
|
||||||
|
<Path x:Name="BufferPath3" Width="7.2" Height="5" Canvas.Left="2" Canvas.Top="7.5" Stretch="Fill" Fill="#DDFFFFFF" Data="F1 M2.14,8. L2.14,8 C2.42,7.52 3.03,7.36 3.51,7.63 L8.71,10.63 C9.18,10.91 9.35,11.52 9.07,12 L9.07,12 C8.80,12.48 8.18,12.64 7.71,12.36 L2.51,9.37 C2.03,9.09 1.87,8.48 2.14,8 Z "/>
|
||||||
|
<Path x:Name="BufferPath4" Width="8" Height="2" Canvas.Left="0" Canvas.Top="15" Stretch="Fill" Fill="#BBFFFFFF" Data="F1 M0,16 L0,16 C0,15.45 0.45,15 1,15 L7,15 C7.55,15 8,15.45 8,16 L8,16 C8,16.55 7.55,17 7,17 L1,17 C0.45,17 0,16.55 0,16 Z "/>
|
||||||
|
<Path x:Name="BufferPath5" Width="7.2" Height="5" Canvas.Left="2" Canvas.Top="19.5" Stretch="Fill" Fill="#AAFFFFFF" Data="F1 M2.14,24 L2.14,24 C1.87,23.52 2.03,22.91 2.51,22.63 L7.71,19.63 C8.18,19.35 8.80,19.52 9.08,20 L9.07,20 C9.35,20.48 9.18,21.09 8.71,21.36 L3.51,24.37 C3.03,24.64 2.42,24.48 2.14,24 Z "/>
|
||||||
|
<Path x:Name="BufferPath6" Width="5" Height="7.2" Canvas.Left="7.5" Canvas.Top="22.8" Stretch="Fill" Fill="#99FFFFFF" Data="F1 M8,29.86 L8,29.86 C7.52,29.58 7.36,28.97 7.63,28.49 L10.63,23.29 C10.91,22.82 11.52,22.65 12,22.93 L12,22.93 C12.48,23.20 12.64,23.82 12.37,24.39 L9.37,29.49 C9.09,29.97 8.48,30.13 8,29.86 Z "/>
|
||||||
|
<Path x:Name="BufferPath7" Width="2" Height="8" Canvas.Left="15" Canvas.Top="24" Stretch="Fill" Fill="#77FFFFFF" Data="F1 M16,24 L16,24 C16.55,24 17,24.45 17,25 L17,31 C17,31.55 16.55,32 16,32 L16,32 C15.45,32 15,31.55 15,31 L15,25 C15,24.45 15.45,24 16,24 Z "/>
|
||||||
|
<Path x:Name="BufferPath8" Width="5" Height="7.2" Canvas.Left="19.5" Canvas.Top="22.8" Stretch="Fill" Fill="#66FFFFFF" Data="F1 M20,22.93 L20,22.93 C20.48,22.65 21.09,22.82 21.36,23.29 L24.37,28.49 C24.64,28.97 24.48,29.58 24,29.86 L24,29.86 C23.52,30.13 22.91,29.97 22.63,29.49 L19.63,24.39 C19.36,23.82 19.52,23.20 20,22.93 Z "/>
|
||||||
|
<Path x:Name="BufferPath9" Width="7.2" Height="5" Canvas.Left="22.8" Canvas.Top="19.5" Stretch="Fill" Fill="#55FFFFFF" Data="F1 M22.93,20 L22.93,20 C23.20,19.52 23.82,19.36 24.39,19.63 L29.49,22.63 C29.97,22.91 30.13,23.52 29.86,24 L29.86,24 C29.58,24.48 28.97,24.64 28.49,24.37 L23.29,21.37 C22.82,21.09 22.65,20.48 22.93,20 Z "/>
|
||||||
|
<Path x:Name="BufferPath10" Width="8" Height="2" Canvas.Left="24" Canvas.Top="15" Stretch="Fill" Fill="#33FFFFFF" Data="F1 M24,16 L24,16 C24,15.45 24.45,15 25,15 L31,15 C31.55,15 32,15.45 32,16 L32,16 C32,16.55 31.55,17 31,17 L25,17 C24.45,17 24,16.55 24,16 Z "/>
|
||||||
|
<Path x:Name="BufferPath11" Width="7.2" Height="5" Canvas.Left="22.8" Canvas.Top="7.5" Stretch="Fill" Fill="#22FFFFFF" Data="F1 M 22.93,12 L22.93,12 C22.65,11.52 22.82,10.91 23.29,10.63 L28.49,7.63 C28.97,7.36 29.58,7.52 29.86,8 L29.86,8 C30.13,8.48 29.97,9.09 29.49,9.37 L24.39,12.36 C23.82,12.64 23.20,12.48 22.93,12 Z "/>
|
||||||
|
<Path x:Name="BufferPath12" Width="5" Height="7.2" Canvas.Left="19.5" Canvas.Top="2" Stretch="Fill" Fill="#11FFFFFF" Data="F1 M 20,9.07 L20,9.07 C19.52,8.80 19.36,8.18 19.63,7.71 L22.63,2.51 C22.91,2.03 23.52,1.87 24,2.14 L24,2.14 C24.48,2.42 24.64,3.03 24.37,3.51 L21.37,8.71 C21.09,9.18 20.48,9.35 20,9.07 Z "/>
|
||||||
|
</Canvas>
|
||||||
|
<TextBlock x:Name="BufferText" Canvas.Left="158" Canvas.Top="108" FontFamily="Verdana" FontSize="9" FontWeight="Bold" Foreground="#FFFFFFFF" Width="12" Height="10"/>
|
||||||
|
<Canvas x:Name="OverlayCanvas" Width="300" Height="200" Canvas.Left="220" Canvas.Top="10" Visibility="Collapsed">
|
||||||
|
<Canvas.Background>
|
||||||
|
<ImageBrush x:Name="OverlayLogo" AlignmentX="Right" AlignmentY="Top" Stretch="None" />
|
||||||
|
</Canvas.Background>
|
||||||
|
</Canvas>
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="PlayerControls" Width="320" Height="20" Canvas.Top="240" Visibility="Collapsed">
|
||||||
|
<Rectangle x:Name="ControlbarBack" Width="320" Height="19" Fill="#FFFFFFFF" />
|
||||||
|
|
||||||
|
<Canvas x:Name="VolumeButton" Width="24" Height="20" Canvas.Left="296">
|
||||||
|
<Rectangle x:Name="VolumeShadow" Width="24" Height="1" Canvas.Top="19" Stretch="Fill" Fill="#55000000"/>
|
||||||
|
<Path x:Name="VolumeStroke" Width="24" Height="19" Data="F1 M 0,0 L 24,0 L 24,19 L 0,19 L 0,18 L 23,18 L 23,1 L 0,1 0,0 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="VolumeFill" Width="23" Height="17" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Canvas x:Name="VolumeMask" Width="18" Height="19" Clip="F1 M1,9 L2,9 L2,10 L1,10 L1,9 M3,8.5 L4,8.5 L4,10.5 L3,10.5 L3,8.5 M5,8 L6,8 L6,11 L5,11 L5,8 M7,7.5 L8,7.5 L8,11.5 L7,11.5 L7,7.5 M9,7 L10,7 L10,12 L9,12 L9,7 M11,6.5 L12,6.5 L12,12.5 L11,12.5 L11,6.5 M13,6 L14,6 L14,13 L13,13 L13,6 M15,5.5 L16,5.5 L16,13.5 L15,13.5 L15,5.5 M17,5 L18,5 L18,14 L17,14 L17,5 Z">
|
||||||
|
<Rectangle x:Name="VolumeSlider" Width="18" Height="15" Canvas.Top="2" Opacity="0.3" Fill="#FF000000"/>
|
||||||
|
<Rectangle x:Name="VolumeHighlight" Width="18" Height="15" Canvas.Top="2" Fill="#FF000000"/>
|
||||||
|
<Rectangle x:Name="VolumeSymbol" Width="1" Canvas.Top="6" Height="7" Fill="#00000000"/>
|
||||||
|
</Canvas>
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="MuteButton" Width="13" Height="20" Canvas.Left="283">
|
||||||
|
<Rectangle x:Name="MuteShadow" Width="13" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="MuteStroke" Width="13" Height="19" Data="F 1 M 0,0 L 13,0 L 13,1 L 1,1 L 1,18 L 13,18 L 13,19 L 0,19 0,0 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="MuteFill" Width="12" Height="17" Canvas.Left="1" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Path x:Name="MuteOffSymbol" Width="5" Height="7" Canvas.Left="6" Canvas.Top="6" Fill="#FF000000" Data="F 1 M 0,2 L2,2 L 2,5 L0,5 L0,0 M3,1 L4,1 L4,0 L5,0 L5,7 L4,7 L4,6 L3,6 L3,1 Z "/>
|
||||||
|
<Path x:Name="MuteSymbol" Width="5" Height="7" Canvas.Left="6" Canvas.Top="6" Opacity="0.3" Fill="#FF000000" Data="F 1 M 0,2 L2,2 L 2,5 L0,5 L0,0 M3,1 L4,1 L4,0 L5,0 L5,7 L4,7 L4,6 L3,6 L3,1 Z "/>
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="FullscreenButton" Width="18" Height="20" Canvas.Left="265">
|
||||||
|
<Rectangle x:Name="FullscreenShadow" Width="18" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="FullscreenStroke" Width="18" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F1 M0,0 L18,0 L18,1 L1,1 L1,18 L18,18 L 18,19 L0,19 L0,0 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="FullscreenFill" Width="17" Height="17" Canvas.Left="1" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Path x:Name="FullscreenSymbol" Width="9" Height="9" Canvas.Left="5" Fill="#FF000000" Canvas.Top="5" Data="F1 M0,0 L2,0 L2,1 L1,1 L1,2 L0,2 L0,0 M0,7 L1,7 L1,8 L2,8 L2,9 L0,9 L0,7 M7,0 L9,0 L9,2 L8,2 L8,1 L7,1 L7,0 M8,7 L9,7 L9,9 L7,9 L7,8 L8,8 L8,7 M2,2 L7,2 L7,7 L2,7 L2,2 Z" />
|
||||||
|
<Path x:Name="FullscreenOffSymbol" Width="9" Height="9" Canvas.Left="5" Fill="#00000000" Canvas.Top="5" Visibility="Collapsed" Data="F1 M1,0 L2,0 L2,2 L0,2 L0,1 L1,1 L1,0 M0,7 L2,7 L2,9 L1,9 L1,8 L0,8 L0,7 M7,0 L8,0 L8,1 L9,1 L9,2 L7,2 L7,0 M7,7 L9,7 L9,8 L8,8 L8,9 L7,9 L7,7 M2,2 L7,2 L7,7 L2,7 L2,2 Z" />
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="LinkButton" Width="18" Height="20" Canvas.Left="247">
|
||||||
|
<Rectangle x:Name="LinkShadow" Width="18" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="LinkStroke" Width="18" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F1 M0,0 L18,0 L18,1 L1,1 L1,18 L18,18 L 18,19 L0,19 L0,0 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="LinkFill" Width="17" Height="17" Canvas.Left="1" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Path x:Name="LinkSymbol" Width="9" Height="9" Canvas.Left="5" Fill="#FF000000" Canvas.Top="5" Data="F1 M2,0 L7,0 L7,4 L9,4 L5,9 L4,9 L0,4 L2,4 L2,0 Z" />
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="RemainingButton" Width="35" Height="20" Canvas.Left="207">
|
||||||
|
<Rectangle x:Name="RemainingShadow" Width="35" Height="1" Canvas.Top="19" Fill="#55000000" />
|
||||||
|
<Path x:Name="RemainingStroke" Width="35" Height="19" Stretch="Fill" Data="F1 M0,0 L35,0 L35,01 L0,1 L0,0 M 0,18 L35,18 L35,19 L0,19 L0,18 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="RemainingFill" Width="35" Height="17" Canvas.Left="0" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0.0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<TextBlock x:Name="RemainingText" Text="00:00" Canvas.Left="1" Canvas.Top="4" FontFamily="Verdana" FontSize="9" FontWeight="Bold" />
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="TimeButton" Width="133" Height="20" Canvas.Left="74" Canvas.Top="0">
|
||||||
|
<Rectangle x:Name="TimeShadow" Width="133" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="TimeStroke" Width="133" Height="19" Stretch="Fill" Data="F1 M0,0 L168,0 L168,01 L0,1 L0,0 M0,18 L168,18 L168,19 L0,19 L0,18 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="TimeFill" Width="133" Height="17" Canvas.Top="1" Stretch="Fill" >
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Rectangle x:Name="TimeSlider" Width="123" Height="5" Canvas.Top="7" Canvas.Left="5" Fill="#00000000" Opacity="0" />
|
||||||
|
<Rectangle x:Name="DownloadProgress" Width="123" Height="5" Canvas.Top="7" Canvas.Left="5" Fill="#00000000" Opacity="0.3" />
|
||||||
|
<Rectangle x:Name="TimeHighlight" Width="123" Height="5" Canvas.Top="7" Canvas.Left="5" Fill="#FF000000"/>
|
||||||
|
<Rectangle x:Name="TimeSymbol" Width="2" Height="7" Canvas.Top="6" Canvas.Left="5" Fill="#FF000000"/>
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="ElapsedButton" Width="35" Height="20" Canvas.Left="34">
|
||||||
|
<Rectangle x:Name="ElapsedShadow" Width="35" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="ElapsedStroke" Width="40" Height="19" Data="F1 M0,0 L35,0 L35,01 L0,1 L0,0 M 0,18 L35,18 L35,19 L0,19 L0,18 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="ElapsedFill" Width="35" Height="17" Canvas.Left="0" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0.0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<TextBlock x:Name="ElapsedText" Text="00:00" Canvas.Left="6" Canvas.Top="4" FontFamily="Verdana" FontSize="9" FontWeight="Bold" />
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="StopButton" Width="17" Height="20" Canvas.Left="17">
|
||||||
|
<Rectangle x:Name="StopShadow" Width="17" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="StopStroke" Width="17" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F1 M 0,0 L17,0 L17,19 L0,19 L0,18 L16,18 L16,1 L0,1 L0,0 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="StopFill" Width="16" Height="17" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Path x:Name="StopSymbol" Width="6" Height="7" Canvas.Left="5" Fill="#FF000000" Canvas.Top="6" Data="F1 M0,0 L6,0 L6,7 L0,7 L0,0 Z " />
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
<Canvas x:Name="PlayButton" Width="17" Height="20">
|
||||||
|
<Rectangle x:Name="PlayShadow" Width="17" Height="1" Canvas.Top="19" Fill="#55000000"/>
|
||||||
|
<Path x:Name="PlayStroke" Width="17" Height="19" Canvas.Left="0" Canvas.Top="0" Data="F0 M 0,0 L17,0 L17,19 L0,19 L0,0 M1,1 L16,1 L16,18 L1,18 L1,1 Z ">
|
||||||
|
<Path.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#C0000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#C0FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
<Rectangle x:Name="PlayFill" Width="15" Height="17" Canvas.Left="1" Canvas.Top="1">
|
||||||
|
<Rectangle.Fill>
|
||||||
|
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#40000000" Offset="0"/>
|
||||||
|
<GradientStop Color="#40FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Rectangle.Fill>
|
||||||
|
</Rectangle>
|
||||||
|
<Path x:Name="PlayOffSymbol" Width="5" Height="7" Canvas.Left="6" Fill="#FF000000" Canvas.Top="6" Visibility="Collapsed" Data="F1 M0,0 L2,0 L2,7 L0,7 L0,0 M3,0 L5,0 L5,7 L3,7 L3,0 Z " />
|
||||||
|
<Path x:Name="PlaySymbol" Width="6" Height="7" Canvas.Left="6" Fill="#FF000000" Canvas.Top="6" Data="F1 M0,0 L1,0 L1,1 L3,1 L3,2 L5,2 L5,3 L6,3 L6,4 L5,4 L5,5 L3,5 L3,6 L1,6 L1,7 L0,7 L0,0 Z" />
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
</Canvas>
|
||||||
|
|
||||||
|
</Canvas>
|
||||||
@ -0,0 +1,387 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
/* -------------------------------- Clappr embed templates -------------------------------- */
|
||||||
|
$clapprEmbed = "
|
||||||
|
<div id=\"avID_{SOURCEID}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\"></div>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
var player = new Clappr.Player({
|
||||||
|
source: '{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}',
|
||||||
|
poster: '{PLAYER_POSTER_FRAME}',
|
||||||
|
height: '{HEIGHT}',
|
||||||
|
width: '{WIDTH}',
|
||||||
|
autoPlay: {PLAYER_AUTOPLAY},
|
||||||
|
loop: {PLAYER_LOOP},
|
||||||
|
//hideMediaControl: {JWPLAYER_CONTROLS},
|
||||||
|
parentId: '#avID_{SOURCEID}'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
$clapprEmbedRemote = "
|
||||||
|
<div id=\"avID_{SOURCEID}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\"></div>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
var player = new Clappr.Player({
|
||||||
|
source: '{SOURCE}',
|
||||||
|
poster: '{PLAYER_POSTER_FRAME_REMOTE}',
|
||||||
|
height: '{HEIGHT}',
|
||||||
|
width: '{WIDTH}',
|
||||||
|
autoPlay: {PLAYER_AUTOPLAY},
|
||||||
|
loop: {PLAYER_LOOP},
|
||||||
|
//hideMediaControl: {JWPLAYER_CONTROLS},
|
||||||
|
parentId: '#avID_{SOURCEID}'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
/* -------------------------------- JW Player embed templates -------------------------------- */
|
||||||
|
$jwPlayerEmbed = "
|
||||||
|
<div id=\"avID_{SOURCEID}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\"></div>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
jwplayer('avID_{SOURCEID}').setup({
|
||||||
|
'file': '{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}',
|
||||||
|
'image': '{PLAYER_POSTER_FRAME}',
|
||||||
|
'height': '{HEIGHT}',
|
||||||
|
'width': '{WIDTH}',
|
||||||
|
'autostart': '{PLAYER_AUTOPLAY}',
|
||||||
|
'repeat': '{PLAYER_LOOP}',
|
||||||
|
'controls': '{JWPLAYER_CONTROLS}'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
$jwPlayerEmbedRemote = "
|
||||||
|
<div id=\"avID_{SOURCEID}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\"></div>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
jwplayer('avID_{SOURCEID}').setup({
|
||||||
|
'file': '{SOURCE}',
|
||||||
|
'image': '{PLAYER_POSTER_FRAME_REMOTE}',
|
||||||
|
'height': '{HEIGHT}',
|
||||||
|
'width': '{WIDTH}',
|
||||||
|
'type': '{FILE_TYPE}',
|
||||||
|
'autostart': '{PLAYER_AUTOPLAY}',
|
||||||
|
'repeat': '{PLAYER_LOOP}',
|
||||||
|
'controls': '{JWPLAYER_CONTROLS}'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
/* -------------------------------- Embed templates for Quicktime Media -------------------------------- */
|
||||||
|
$qtEmbed = "
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
QT_WriteOBJECT_XHTML('{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}', '{WIDTH}', '{HEIGHT}', '', 'autoplay', '{PLAYER_AUTOPLAY}', 'loop', '{PLAYER_LOOP}', 'bgcolor', '{PLAYER_BACKGROUNDQT}', 'scale', 'aspect', 'wmode', 'transparent', 'title', 'JoomlaWorks AllVideos Player');
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
$qtEmbedRemote = "
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
QT_WriteOBJECT_XHTML('{SOURCE}', '{WIDTH}', '{HEIGHT}', '', 'autoplay', '{PLAYER_AUTOPLAY}', 'loop', '{PLAYER_LOOP}', 'bgcolor', '{PLAYER_BACKGROUNDQT}', 'scale', 'aspect', 'wmode', 'transparent', 'title', 'JoomlaWorks AllVideos Player');
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
/* -------------------------------- Embed templates for Windows Media -------------------------------- */
|
||||||
|
$wmEmbed = "
|
||||||
|
<div id=\"avID_{SOURCEID}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\"></div>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
var cnt = document.getElementById('avID_{SOURCEID}');
|
||||||
|
var src = '{PLUGIN_PATH}/includes/js/wmvplayer/wmvplayer.xaml';
|
||||||
|
var cfg = {
|
||||||
|
'file': '{SITEURL}/{FOLDER}/{SOURCE}.{FILE_EXT}',
|
||||||
|
'image': '{PLAYER_POSTER_FRAME}',
|
||||||
|
'width': '{WIDTH}',
|
||||||
|
'height': '{HEIGHT}',
|
||||||
|
'autostart': '{PLAYER_AUTOPLAY}',
|
||||||
|
'repeat': '{PLAYER_LOOP}'
|
||||||
|
};
|
||||||
|
var ply = new jeroenwijering.Player(cnt,src,cfg);
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
$wmEmbedRemote = "
|
||||||
|
<div id=\"avID_{SOURCEID}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\"></div>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
var cnt = document.getElementById('avID_{SOURCEID}');
|
||||||
|
var src = '{PLUGIN_PATH}/includes/js/wmvplayer/wmvplayer.xaml';
|
||||||
|
var cfg = {
|
||||||
|
'file': '{SOURCE}',
|
||||||
|
'width': '{WIDTH}',
|
||||||
|
'height': '{HEIGHT}',
|
||||||
|
'autostart': '{PLAYER_AUTOPLAY}',
|
||||||
|
'repeat': '{PLAYER_LOOP}'
|
||||||
|
};
|
||||||
|
var ply = new jeroenwijering.Player(cnt,src,cfg);
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------- Tags & formats -------------------------------- */
|
||||||
|
$tagReplace = array(
|
||||||
|
|
||||||
|
/* --- Audio/Video formats --- */
|
||||||
|
|
||||||
|
/* JW Player compatible media */
|
||||||
|
"3gp" => $jwPlayerEmbed,
|
||||||
|
"3gpremote" => $jwPlayerEmbedRemote,
|
||||||
|
"3g2" => $jwPlayerEmbed,
|
||||||
|
"3g2remote" => $jwPlayerEmbedRemote,
|
||||||
|
|
||||||
|
"mp4" => $clapprEmbed,
|
||||||
|
"mp4remote" => $clapprEmbedRemote,
|
||||||
|
"m4v" => $jwPlayerEmbed,
|
||||||
|
"m4vremote" => $jwPlayerEmbedRemote,
|
||||||
|
"mkv" => $jwPlayerEmbed,
|
||||||
|
"mkvremote" => $jwPlayerEmbedRemote,
|
||||||
|
"webm" => $clapprEmbed,
|
||||||
|
"webmremote" => $clapprEmbedRemote,
|
||||||
|
|
||||||
|
"ogv" => $jwPlayerEmbed,
|
||||||
|
"ogvremote" => $jwPlayerEmbedRemote,
|
||||||
|
|
||||||
|
"flv" => $jwPlayerEmbed,
|
||||||
|
"flvremote" => $jwPlayerEmbedRemote,
|
||||||
|
"f4v" => $jwPlayerEmbed,
|
||||||
|
"f4vremote" => $jwPlayerEmbedRemote,
|
||||||
|
|
||||||
|
"mp3" => $clapprEmbed,
|
||||||
|
"mp3remote" => $clapprEmbedRemote,
|
||||||
|
"aac" => $jwPlayerEmbed,
|
||||||
|
"aacremote" => $jwPlayerEmbedRemote,
|
||||||
|
"m4a" => $jwPlayerEmbed,
|
||||||
|
"m4aremote" => $jwPlayerEmbedRemote,
|
||||||
|
"ogg" => $jwPlayerEmbed,
|
||||||
|
"oggremote" => $jwPlayerEmbedRemote,
|
||||||
|
"oga" => $jwPlayerEmbed,
|
||||||
|
"ogaremote" => $jwPlayerEmbedRemote,
|
||||||
|
|
||||||
|
/* Quicktime */
|
||||||
|
"mov" => $qtEmbed,
|
||||||
|
"movremote" => $qtEmbedRemote,
|
||||||
|
"mpeg" => $qtEmbed,
|
||||||
|
"mpegremote" => $qtEmbedRemote,
|
||||||
|
"mpg" => $qtEmbed,
|
||||||
|
"mpgremote" => $qtEmbedRemote,
|
||||||
|
"avi" => $qtEmbed,
|
||||||
|
"aviremote" => $qtEmbedRemote,
|
||||||
|
|
||||||
|
/* Windows Media */
|
||||||
|
"wmv" => $wmEmbed,
|
||||||
|
"wma" => $wmEmbed,
|
||||||
|
"wmvremote" => $wmEmbedRemote,
|
||||||
|
"wmaremote" => $wmEmbedRemote,
|
||||||
|
|
||||||
|
/* DivX */
|
||||||
|
"divx" => "
|
||||||
|
<object type=\"video/divx\" data=\"{SITEURL}/{FOLDER}/{SOURCE}.divx\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\">
|
||||||
|
<param name=\"type\" value=\"video/divx\" />
|
||||||
|
<param name=\"src\" value=\"{SITEURL}/{FOLDER}/{SOURCE}.divx\" />
|
||||||
|
<param name=\"data\" value=\"{SITEURL}/{FOLDER}/{SOURCE}.divx\" />
|
||||||
|
<param name=\"codebase\" value=\"{SITEURL}/{FOLDER}/{SOURCE}.divx\" />
|
||||||
|
<param name=\"url\" value=\"{SITEURL}/{FOLDER}/{SOURCE}.divx\" />
|
||||||
|
<param name=\"mode\" value=\"full\" />
|
||||||
|
<param name=\"pluginspage\" value=\"http://go.divx.com/plugin/download/\" />
|
||||||
|
<param name=\"allowContextMenu\" value=\"true\" />
|
||||||
|
<param name=\"previewImage\" value=\"{SITEURL}/{FOLDER}/{SOURCE}.jpg\" />
|
||||||
|
<param name=\"autoPlay\" value=\"{PLAYER_AUTOPLAY}\" />
|
||||||
|
<param name=\"loop\" value=\"{PLAYER_LOOP}\" />
|
||||||
|
<param name=\"minVersion\" value=\"1.0.0\" />
|
||||||
|
<param name=\"custommode\" value=\"none\" />
|
||||||
|
<p>No video? Get the DivX browser plug-in for <a href=\"http://download.divx.com/player/DivXWebPlayerInstaller.exe\">Windows</a> or <a href=\"http://download.divx.com/player/DivXWebPlayer.dmg\">Mac</a></p>
|
||||||
|
</object>
|
||||||
|
",
|
||||||
|
|
||||||
|
"divxremote" => "
|
||||||
|
<object type=\"video/divx\" data=\"{SOURCE}\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" title=\"JoomlaWorks AllVideos Player\">
|
||||||
|
<param name=\"type\" value=\"video/divx\" />
|
||||||
|
<param name=\"src\" value=\"{SOURCE}\" />
|
||||||
|
<param name=\"data\" value=\"{SOURCE}\" />
|
||||||
|
<param name=\"codebase\" value=\"{SOURCE}\" />
|
||||||
|
<param name=\"url\" value=\"{SOURCE}\" />
|
||||||
|
<param name=\"mode\" value=\"full\" />
|
||||||
|
<param name=\"pluginspage\" value=\"http://go.divx.com/plugin/download/\" />
|
||||||
|
<param name=\"allowContextMenu\" value=\"true\" />
|
||||||
|
<param name=\"previewImage\" value=\"\" />
|
||||||
|
<param name=\"autoPlay\" value=\"{PLAYER_AUTOPLAY}\" />
|
||||||
|
<param name=\"loop\" value=\"{PLAYER_LOOP}\" />
|
||||||
|
<param name=\"minVersion\" value=\"1.0.0\" />
|
||||||
|
<param name=\"custommode\" value=\"none\" />
|
||||||
|
<p>No video? Get the DivX browser plug-in for <a href=\"http://download.divx.com/player/DivXWebPlayerInstaller.exe\">Windows</a> or <a href=\"http://download.divx.com/player/DivXWebPlayer.dmg\">Mac</a></p>
|
||||||
|
</object>
|
||||||
|
",
|
||||||
|
|
||||||
|
/* SWF */
|
||||||
|
"swf" => "
|
||||||
|
<object type=\"application/x-shockwave-flash\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" data=\"{SITEURL}/{FOLDER}/{SOURCE}.swf\">
|
||||||
|
<param name=\"movie\" value=\"{SITEURL}/{FOLDER}/{SOURCE}.swf\" />
|
||||||
|
<param name=\"quality\" value=\"high\" />
|
||||||
|
<param name=\"wmode\" value=\"{PLAYER_TRANSPARENCY}\" />
|
||||||
|
<param name=\"bgcolor\" value=\"{PLAYER_BACKGROUND}\" />
|
||||||
|
<param name=\"autoplay\" value=\"{PLAYER_AUTOPLAY}\" />
|
||||||
|
<param name=\"loop\" value=\"{PLAYER_LOOP}\" />
|
||||||
|
</object>
|
||||||
|
",
|
||||||
|
|
||||||
|
"swfremote" => "
|
||||||
|
<object type=\"application/x-shockwave-flash\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" data=\"{SOURCE}\">
|
||||||
|
<param name=\"movie\" value=\"{SOURCE}\" />
|
||||||
|
<param name=\"quality\" value=\"high\" />
|
||||||
|
<param name=\"wmode\" value=\"{PLAYER_TRANSPARENCY}\" />
|
||||||
|
<param name=\"bgcolor\" value=\"{PLAYER_BACKGROUND}\" />
|
||||||
|
<param name=\"autoplay\" value=\"{PLAYER_AUTOPLAY}\" />
|
||||||
|
<param name=\"loop\" value=\"{PLAYER_LOOP}\" />
|
||||||
|
</object>
|
||||||
|
",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* --- Major 3rd party video 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}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// vimeo.com - http://www.vimeo.com/1319796
|
||||||
|
"Vimeo" => "<iframe src=\"https://player.vimeo.com/video/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// dailymotion.com - http://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}\" 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}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// 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={PLAYER_AUTOPLAY}&maxwidth={WIDTH}&url={SOURCE}',
|
||||||
|
'callback': 'soundcloud{SOURCEID}',
|
||||||
|
'playerID': 'avID_{SOURCEID}'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id=\"avID_{SOURCEID}\" title=\"JoomlaWorks AllVideos Player\"> </div>
|
||||||
|
",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* --- Other 3rd party video providers --- */
|
||||||
|
// collegehumor.com - http://www.collegehumor.com/video/6961115/should-we-do-a-bitcoin-sketch
|
||||||
|
"CollegeHumor" => "
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
allvideos.ready(function(){
|
||||||
|
allvideos.embed({
|
||||||
|
'url': 'https://json2jsonp.com/?callback=collegeHumor{SOURCEID}&url=http%3A%2F%2Fwww.collegehumor.com%2Foembed.json%3Fmaxwidth%3D{WIDTH}%26url%3D{SOURCE}',
|
||||||
|
'callback': 'collegeHumor{SOURCEID}',
|
||||||
|
'playerID': 'avID_{SOURCEID}'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id=\"avID_{SOURCEID}\" title=\"JoomlaWorks AllVideos Player\"> </div>
|
||||||
|
",
|
||||||
|
|
||||||
|
// dotsub.com - https://dotsub.com/view/6c5d7514-5656-476a-9504-07dd4e2f6509
|
||||||
|
"Dotsub" => "<iframe src=\"https://dotsub.com/media/{SOURCE}/embed/\" width=\"{WIDTH}\" height=\"{HEIGHT}\" 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>
|
||||||
|
",
|
||||||
|
|
||||||
|
// funnyordie.com - https://www.funnyordie.com/videos/7c52bd0f81/the-pussy-patch-from-lil-jon
|
||||||
|
"FunnyOrDie" => "<iframe src=\"https://www.funnyordie.com/embed/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// gloria.tv - https://gloria.tv/video/radASVdUvido2xP8bd8n6zEpS
|
||||||
|
"Gloria" => "<iframe src=\"https://gloria.tv/embed/+/video/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// godtube.com - http://www.godtube.com/watch/?v=FJ219MNU
|
||||||
|
"GodTube" => "<iframe src=\"https://www.godtube.com/embed/watch/{SOURCE}/?w=728&h=408&ap=true&sl=true&title=true&dp=true\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// ku6.com (China) - http://ku6.com/2017/detail.html?vid=MY8_sA92OcjFb4EezXaFZQ
|
||||||
|
"Ku6" => $clapprEmbedRemote,
|
||||||
|
|
||||||
|
// liveleak.com - https://www.liveleak.com/view?i=ea0_1506997861
|
||||||
|
"LiveLeak" => "<iframe src=\"https://www.liveleak.com/ll_embed?i={SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// metacafe.com - http://www.metacafe.com/watch/11498826/amazing-girl-pours-rainbow-shots/
|
||||||
|
"Metacafe" => "<iframe src=\"{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// myspace.com - https://myspace.com/myspace/video/the-pedicab-interviews-chris-cole/109546118
|
||||||
|
"Myspace" => "<iframe src=\"//media.myspace.com/play/video/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// rutube.ru - https://rutube.ru/video/2e311cf4495d9b69304b50a6aafe72cb/
|
||||||
|
"Rutube" => "
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
allvideos.ready(function(){
|
||||||
|
allvideos.embed({
|
||||||
|
'url': 'https://json2jsonp.com/?callback=rutube{SOURCEID}&url=https%3A%2F%2Frutube.ru%2Fapi%2Foembed%2F%3Fformat%3Djson%26maxwidth%3D{WIDTH}%26maxheight%3D{HEIGHT}%26url%3D{SOURCE}',
|
||||||
|
'callback': 'rutube{SOURCEID}',
|
||||||
|
'playerID': 'avID_{SOURCEID}'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id=\"avID_{SOURCEID}\" title=\"JoomlaWorks AllVideos Player\"> </div>
|
||||||
|
",
|
||||||
|
|
||||||
|
// sapo.pt - http://videos.sapo.pt/A9AWbpCMRmFKA2ZZIdNm - oEmbed API: https://rd3.videos.sapo.pt/oembed?format=json&url=http://videos.sapo.pt/A9AWbpCMRmFKA2ZZIdNm
|
||||||
|
"SAPO" => "<iframe src=\"https://rd3.videos.sapo.pt/playhtml?file=https://rd3.videos.sapo.pt/{SOURCE}/mov/1\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// screenr.com - http://www.screenr.com/LQ2s [retired but existing videos still work]
|
||||||
|
"Screenr" => "<iframe src=\"http://www.screenr.com/embed/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// twitch.tv - https://go.twitch.tv/rom_bik (channel) or https://www.twitch.tv/videos/179343513 (video)
|
||||||
|
"Twitch" => "<iframe src=\"https://player.twitch.tv/?{SOURCE}&autoplay=false\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// ustream.tv - http://www.ustream.tv/recorded/108521696
|
||||||
|
"Ustream" => "<iframe src=\"https://www.ustream.tv/embed/recorded/{SOURCE}?html5ui\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// vbox7.com - https://www.vbox7.com/play:213e79223b
|
||||||
|
"VBox7" => "<iframe src=\"https://www.vbox7.com/emb/external.php?vid={SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// veoh.com - http://www.veoh.com/watch/v21091373cQe4FGa9
|
||||||
|
"veoh" => "
|
||||||
|
<object type=\"application/x-shockwave-flash\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" data=\"http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=&permalinkId={SOURCE}&player=videodetailsembedded&videoAutoPlay={PLAYER_AUTOPLAY}&id=anonymous\" title=\"JoomlaWorks AllVideos Player\">
|
||||||
|
<param name=\"movie\" value=\"http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=&permalinkId={SOURCE}&player=videodetailsembedded&videoAutoPlay={PLAYER_AUTOPLAY}&id=anonymous\" />
|
||||||
|
<param name=\"quality\" value=\"high\" />
|
||||||
|
<param name=\"wmode\" value=\"{PLAYER_TRANSPARENCY}\" />
|
||||||
|
<param name=\"bgcolor\" value=\"{PLAYER_BACKGROUND}\" />
|
||||||
|
<param name=\"autoplay\" value=\"{PLAYER_AUTOPLAY}\" />
|
||||||
|
<param name=\"loop\" value=\"{PLAYER_LOOP}\" />
|
||||||
|
<param name=\"allowfullscreen\" value=\"true\" />
|
||||||
|
<param name=\"allowscriptaccess\" value=\"always\" />
|
||||||
|
</object>
|
||||||
|
",
|
||||||
|
|
||||||
|
// videa.hu - http://videa.hu/videok/filmklub/film-animacio/tom-cruise-tancol-kockazatos-uzlet-pmd0e3xAJUEbJird
|
||||||
|
"Videa" => "<iframe src=\"//videa.hu/player?v={SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// vine.co - https://vine.co/v/hr9OQTHJYPj
|
||||||
|
"Vine" => "<iframe src=\"{SOURCE}/embed/simple?audio=1\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// yahoo.com - https://uk.news.yahoo.com/video/catalan-protesters-block-roads-general-114436805.html
|
||||||
|
"Yahoo" => "<iframe src=\"{SOURCE}?format=embed\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// youku.com (China) - http://v.youku.com/v_show/id_XMzAyNjcxNDkzNg==.html?spm=a2hww.20027244.ykRecommend.5~5!2~5~5~A
|
||||||
|
"Youku" => "<iframe src=\"https://player.youku.com/embed/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
// youmaker.com - https://www.youmaker.com/video/722db6ac-1ce4-4beb-7385-9621278e738a
|
||||||
|
"YouMaker" => "<iframe src=\"https://www.youmaker.com/api/{SOURCE}\" width=\"{WIDTH}\" height=\"{HEIGHT}\" allowfullscreen=\"true\" frameborder=\"0\" scrolling=\"no\" title=\"JoomlaWorks AllVideos Player\"></iframe>",
|
||||||
|
|
||||||
|
);
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* General */
|
||||||
|
.avPlayerWrapper div,
|
||||||
|
.avPlayerWrapper iframe,
|
||||||
|
.avPlayerWrapper object,
|
||||||
|
.avPlayerWrapper embed {outline:0;padding:0;margin:0;}
|
||||||
|
|
||||||
|
/* Classic Layout */
|
||||||
|
.avPlayerWrapper {display:block;text-align:center;clear:both;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer {display:block;padding:0;margin:0 auto;}
|
||||||
|
/* Video container styling only */
|
||||||
|
.avVideo .avPlayerContainer {padding:0;}
|
||||||
|
/* Audio container styling only */
|
||||||
|
.avAudio .avPlayerContainer {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock {display:block;padding:0;margin:0;line-height:normal;text-align:center;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock div {text-align:center!important;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink {text-align:center;padding:4px;font-size:11px;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a:hover {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a span {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a:hover span {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink span.hint {padding-left:4px;color:#999;font-style:italic;}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="avPlayerWrapper<?php echo $output->mediaTypeClass; ?>">
|
||||||
|
<div style="width:<?php echo $output->playerWidth; ?>px;" class="avPlayerContainer">
|
||||||
|
<div id="<?php echo $output->playerID; ?>" class="avPlayerBlock">
|
||||||
|
<?php echo $output->player; ?>
|
||||||
|
<?php if ($allowAudioDownloading && $output->mediaType=='audio'): ?>
|
||||||
|
<div class="avDownloadLink">
|
||||||
|
<a target="_blank" href="<?php echo $output->source; ?>">
|
||||||
|
<span><?php echo JText::_('JW_PLG_AV_DOWNLOAD'); ?></span>
|
||||||
|
</a>
|
||||||
|
<span class="hint">(<?php echo JText::_('JW_PLG_AV_DOWNLOAD_HINT'); ?>)</span>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* General */
|
||||||
|
.avPlayerWrapper div,
|
||||||
|
.avPlayerWrapper iframe,
|
||||||
|
.avPlayerWrapper object,
|
||||||
|
.avPlayerWrapper embed {outline:0;padding:0;margin:0;}
|
||||||
|
|
||||||
|
/* Framed Layout */
|
||||||
|
.avPlayerWrapper {display:block;text-align:center;clear:both;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer {display:block;padding:0;margin:0 auto;}
|
||||||
|
/* Video container styling only */
|
||||||
|
.avVideo .avPlayerContainer {padding:16px 20px 14px;border-radius:4px;background:url(../images/allvideos_v4_bg_1000x550.jpg) repeat 50% 50%;}
|
||||||
|
/* Audio container styling only */
|
||||||
|
.avAudio .avPlayerContainer {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock {display:block;padding:0;margin:0;line-height:normal;text-align:center;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock div {text-align:center!important;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink {text-align:center;padding:4px;font-size:11px;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a:hover {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a span {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a:hover span {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink span.hint {padding-left:4px;color:#999;font-style:italic;}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="avPlayerWrapper<?php echo $output->mediaTypeClass; ?>">
|
||||||
|
<div style="width:<?php echo $output->playerWidth; ?>px;" class="avPlayerContainer">
|
||||||
|
<div id="<?php echo $output->playerID; ?>" class="avPlayerBlock">
|
||||||
|
<?php echo $output->player; ?>
|
||||||
|
<?php if ($allowAudioDownloading && $output->mediaType=='audio'): ?>
|
||||||
|
<div class="avDownloadLink">
|
||||||
|
<a target="_blank" href="<?php echo $output->source; ?>">
|
||||||
|
<span><?php echo JText::_('JW_PLG_AV_DOWNLOAD'); ?></span>
|
||||||
|
</a>
|
||||||
|
<span class="hint">(<?php echo JText::_('JW_PLG_AV_DOWNLOAD_HINT'); ?>)</span>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* General */
|
||||||
|
.avPlayerWrapper div,
|
||||||
|
.avPlayerWrapper iframe,
|
||||||
|
.avPlayerWrapper object,
|
||||||
|
.avPlayerWrapper embed {outline:0;}
|
||||||
|
|
||||||
|
/* Responsive Layout */
|
||||||
|
.avPlayerWrapper {display:block;text-align:center;clear:both;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer {display:block;padding:0;margin:0 auto;}
|
||||||
|
|
||||||
|
/* Video container styling only */
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock {width:100%!important;position:relative!important;padding:0 0 56% 0!important;}
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock iframe,
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock object,
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock embed,
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock video,
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock > div {position:absolute!important;top:0;left:0;min-width:100%!important;width:100%!important;max-width:100%;height:100%!important;}
|
||||||
|
|
||||||
|
/* Corrects the transform issue in mp4 videos by JWPlayer */
|
||||||
|
.avVideo .avPlayerContainer .avPlayerBlock video { transform: scale(1,1)!important; }
|
||||||
|
|
||||||
|
/* SoundCloud container styling only */
|
||||||
|
.avSoundCloudSet .avPlayerContainer .avPlayerBlock {width:100%!important;position:relative!important;padding:0 0 56% 0!important;}
|
||||||
|
.avSoundCloudSet .avPlayerContainer .avPlayerBlock iframe,
|
||||||
|
.avSoundCloudSet .avPlayerContainer .avPlayerBlock object,
|
||||||
|
.avSoundCloudSet .avPlayerContainer .avPlayerBlock embed {position:absolute!important;top:0;left:0;min-width:100%!important;width:100%!important;height:100%!important;}
|
||||||
|
|
||||||
|
.avSoundCloudSong .avPlayerContainer .avPlayerBlock {width:100%!important;padding:0!important;}
|
||||||
|
.avSoundCloudSong .avPlayerContainer .avPlayerBlock iframe,
|
||||||
|
.avSoundCloudSong .avPlayerContainer .avPlayerBlock object,
|
||||||
|
.avSoundCloudSong .avPlayerContainer .avPlayerBlock embed {min-width:100%!important;width:100%!important;height:168px!important;}
|
||||||
|
/* Audio container styling only */
|
||||||
|
.avAudio .avPlayerContainer .avPlayerBlock {width:100%!important;padding:0!important;}
|
||||||
|
.avAudio .avPlayerContainer .avPlayerBlock > div {min-width:100%!important;width:100%!important;height:24px!important;}
|
||||||
|
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock > div {text-align:center!important;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink {text-align:center;padding:4px;font-size:11px;}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a:hover {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a span {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink a:hover span {}
|
||||||
|
.avPlayerWrapper .avPlayerContainer .avPlayerBlock .avDownloadLink span.hint {padding-left:4px;color:#999;font-style:italic;}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @version 4.8.0
|
||||||
|
* @package AllVideos (plugin)
|
||||||
|
* @author JoomlaWorks - http://www.joomlaworks.net
|
||||||
|
* @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
|
||||||
|
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// no direct access
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="avPlayerWrapper<?php echo $output->mediaTypeClass; ?>">
|
||||||
|
<div class="avPlayerContainer">
|
||||||
|
<div id="<?php echo $output->playerID; ?>" class="avPlayerBlock">
|
||||||
|
<?php echo $output->player; ?>
|
||||||
|
<?php if ($allowAudioDownloading && $output->mediaType=='audio'): ?>
|
||||||
|
<div class="avDownloadLink">
|
||||||
|
<a target="_blank" href="<?php echo $output->source; ?>">
|
||||||
|
<span><?php echo JText::_('JW_PLG_AV_DOWNLOAD'); ?></span>
|
||||||
|
</a>
|
||||||
|
<span class="hint">(<?php echo JText::_('JW_PLG_AV_DOWNLOAD_HINT'); ?>)</span>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user