--- a/web/client.php Sat Nov 04 03:57:19 2017 +0100
+++ b/web/client.php Tue Nov 21 12:09:29 2017 +0100
@@ -44,6 +44,7 @@
}
$embed = (isset($_REQUEST['embed']) && $_REQUEST['embed']);
+$embed_video = isset($_REQUEST['embed_video']) ? boolval($_REQUEST['embed_video']) : true;
$videoWidth = ( $embed ? 412 : 480 );
$videoHeight = ( $embed ? 280 : 320 );
if ($embed && !isset($_SESSION['TWITTER_ACCESS_TOKEN']) && (isset($_REQUEST['auth_redirect']) || isset($_SERVER['HTTP_REFERER']))) {
@@ -126,15 +127,15 @@
$(document).ready(function() {
-
+ const TWEET_LENGTH = <?php echo(TWEET_LENGTH)?>;
function updateCounter() {
var _v = $("#status").val();
- if (_v.length > 140) {
- _v = _v.substr(0,140);
+ if (_v.length > TWEET_LENGTH) {
+ _v = _v.substr(0,TWEET_LENGTH);
$("#status").val(_v);
}
- $('#tweetCounter').html(140-_v.length);
- if(140-_v.length < 0) {
+ $('#tweetCounter').html(TWEET_LENGTH-_v.length);
+ if(TWEET_LENGTH-_v.length < 0) {
$('#tweetCounter').addClass("tweetCounterNegative");
}
else {
@@ -284,7 +285,9 @@
</ul>
<div class="ifwrap" id="vlWrap">
<div id="videoLivePlayer">
- <?php if(isset($config['islive_embed']) && $config['islive_embed']):?>
+ <?php if(!$embed_video): ?>
+ <img src='<?php echo($big_visual_url); ?>' />
+ <?php elseif(isset($config['islive_embed']) && $config['islive_embed']):?>
<?php echo str_replace(array('{{width}}','{{height}}'), array($videoWidth, $videoHeight), $translate->_('config__islive_embed')); ?>
<?php else: ?>
<video id="videoPlayer" width=<?php echo($videoWidth); ?> height=<?php echo($videoHeight); ?> autoplay controls poster="<?php echo($big_visual_url); ?>" class="video-js vjs-default-skin"><img class="live-thumbnail" src="<?php echo($big_visual_url); ?>" /></video>
@@ -396,7 +399,7 @@
<div id="twwWrap">
<div id="tweetWriter">
<?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
- <div id="tweetCounter"><?php echo(140-strlen($config['hashtag']));?></div>
+ <div id="tweetCounter"><?php echo(TWEET_LENGTH-strlen($config['hashtag']));?></div>
<?php endif;?>
<h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3>
<form action="tweet.php" method="post" id="statusform" >