I recently added jwplayer to my site. I added video with subtitles. But when we do full screen subtitles are too low almost at the bottom. Is there anyway i can adjust it to appear higher.
Here my code:
<div id="myElement">Loading the player ...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "/sample.mp4",
height: 420,
width: 950,
tracks: [{
file: "/sample.srt",
label: "English",
kind: "captions",
"default": true }]
});
</script>
This solution will work for HTML5, I am not sure about flash though.
check this out show-subtitle-outside-of-player
You need to catch the caption div and override the css
Related
I have configured a no toolbar and ReadOnly instance of CKEditor to show formatted HTML on a web page.
This was working well with V3.5 of CKEditor with:
<script language="javascript" type="text/javascript">
$('.CKEditorRTE').ckeditor(function () { }, { readOnly: true, toolbar: 'ReadOnly',toolbarStartupExpanded: false, toolbarCanCollapse: false, toolbar_Custom: [],uiColor: '#edeff1', resize_minHeight : 100, height: 125, resize_minWidth : 100, width: 600 })
</script>
With V4.4.5 The formatting goes, unless I put the following in the "Config.js"
config.toolbar_ReadOnly = [{items: ['Format']}];
Now I actually do not want this format icon, but I do want the preformatted text. So how can I have preformatted HTML text with no toolbar icons with CKEditor 4.4.5 ?
So I've been trying to apply the plugin to the Body Element and for some reason it just doesn't work..
Things I've tried:
$(function() {
$('body, html').slimScroll({
size: '8px',
width: '100%',
height: '100%',
color: '#ff4800',
allowPageScroll: true,
alwaysVisible: true
});
});
$(function() {
$('#body').slimScroll({
size: '8px',
width: '100%',
height: '100%',
color: '#ff4800',
allowPageScroll: true,
alwaysVisible: true
});
});
Does anyone know what Im doing wrong ?
Thanks in advance for answering
"What If I dont have control of the body tag ? and Im embed a template into a 3rd party site? so the body has no id tag it only has view-source:avatars.imvu.com/LadyKonstantine"
Since you need to apply slim scroll on body you have to use the body selector for jQuery. The code will be like this :
<script type="text/javascript">
$(function(){
$("body").slimScroll({
size: '8px',
width: '100%',
height: '100%',
color: '#ff4800',
allowPageScroll: true,
alwaysVisible: true
});
});
</script>
Remember these
Make sure you have installed both jQuery and slimScroll plugin.
Scroll will be visible if your body have height above 100%
If you would like to use $("#body") instead of $("body") don't forget to add
<body id="body">
More Details
Click here! to read more about slim scroll.
Attaching slimScroll directly to Body tag is not a preffered solution in my view. Try it and you will find the slimScroll wraps your BODY tag inside it's own DIV tag; at least I found it that way when I attempted to attached slimScroll to the BODY element. As a result, you will find the HTML of your page is a complete mess. The sequence of tags will be HEAD - slimScrollDiv - BODY. Instead, I suggest to have a wrapper DIV inside BODY immediately after you open BODY tag and then attach slimScroll to this wrapper DIV.
SlimScroll only works on div element. To achieve this, add a main wrapper just after the opening body tag. In this case I will call it:
In the HTML:
<div id="body"></div>
Then calculate the viewport height, not the HTML, document height. Once done, pass this value to the height of the slimscroll plugin. Example:
In the JS:
var viewportHeight= $(window).height();
$('#body').slimScroll({
height: viewportHeight+'px',
color: '#455A64',
distance: '0',
allowPageScroll: true,
alwaysVisible: true
});
You can also use the new CSS value of vh to compute the height of slimscroll. Example:
$('#body').slimScroll({
height: '100vh',
color: '#455A64',
distance: '0',
allowPageScroll: true,
alwaysVisible: true
});
I'd like remove the header controls from the top of the Kendo UI Scheduler control, i.e. the part outlined in red from this screenshot:
I just want to show one static Day view for a single day. Any ideas?
for all Day Slot hide
$("#scheduler").kendoScheduler({
allDaySlot: false,
});
for Toolbar hide:
<style>
.k-scheduler-toolbar {
border-width: 0 0 1px;
display: none;
}
</style>
I'm not sure how to remove all of that, but you can at least remove the All Day slot by selecting allDaySlot: false in the views collection. If you only want to show the "day" view, you would use something like this (also showing how to remove footer; same doesn't appear to work for header, though):
$("#scheduler").kendoScheduler({
views: [
{ type: "day", selected: true, allDaySlot: false}
],
footer: false // removes the footer
});
Please check the information below:
To remove the footer you can set the footer option to false
The toolbar can be removed using CSS styles:
.k-scheduler-toolbar {
display: none;
}
All-day slot can be removed using the allDaySlot
I am using Joomla for my websites and I have added SlideShowPro to multiple websites with success.
However for some reason when I add the extension to one of my particular sites, something is going wrong.
I'm using JCE and under Editor Parameters > Advanced, I have all of the following turned on:
Allow Javascript
Allow CSS
Allow PHP XHTML Inline Scripts
Under the tab Plugin Parameters then Media Support, I have all of the following turned off:
Strict XHTML Flash
Allow HTML5 Audio
Allow HTML5 Video
Allow OBJECT Elements
Allow EMBED Elements
and Allow Iframes
When I add the following code:
<!-- START EMBED CODE -->
<script type="text/javascript" src="http://www.colmandesigns.co.nz/colmangallery/m/embed.js"></script>
<div id="album-6">
</div>
<script type="text/javascript">
SlideShowPro({
attributes: {
id: "album-6",
width: 550,
height: 400
},
mobile: {
auto: false
},
params: {
bgcolor: "#000000",
allowfullscreen: true
},
flashvars: {
xmlFilePath: "http://www.colmandesigns.co.nz/colmangallery/images.php?album=6",
paramXMLPath: "http://www.colmandesigns.co.nz/colmangallery/m/params/chrome.xml",
contentScale: "Crop to Fit All"
}
});
</script>
<!-- END EMBED CODE -->
It ends up coming out like this once I click save:
<!-- START EMBED CODE -->
<p>
<s-cript type="text/j-avascript" src="http://www.colmandesigns.co.nz/colmangallery/m/embed.js"></s-cript>
</p>
<div id="album-6"> </div>
<p>
<s-cript type="text/j-avascript"> SlideShowPro({ attributes: { id: "album-6", width: 550, height: 400 }, mobile: { auto: false }, params: { bgcolor: "#000000", allowfullscreen: true }, flashvars: { xmlFilePath: "http://www.colmandesigns.co.nz/colmangallery/images.php?album=6", paramXMLPath: "http://www.colmandesigns.co.nz/colmangallery/m/params/chrome.xml", contentScale: "Crop to Fit All" } });
<!-- END EMBED CODE -->
</s-cript>
</p>
<p> </p>
What do I need to do differently?
Yes, WYSIWYG editors will mess your embedded scripts and styles. What I do on my sites is configure JCE to not appear by default.
Go to "Components > JCE Editor > Profiles > Default > Features and Layout > Editor State" and set it to "Off".
This will give you a generic text area for editing your articles (by default) and a link to turn on WYSIWYG editing. This way it will not mess up your JavaScript / CSS.
You can also try "Flexi Custom Code" module, which works similarly to "Custom HTML" module but is intended to be used for JS / CSS instead.
Good luck.
Disabling text filters for super users might help:
Go do administrator / global config / text filters and choose no filters next to Super Users
I have the following in my code. Having the option
legend: {show:true}
messes up the chart badly. The legend section is so long
and there is no chart.
I have pasted the image here of how the chart looks :
http://tinypic.com/view.php?pic=2eqgbgy&s=7
It shows fine without the legend option though, but chart is of course without the legend.
In Chrome I see the following exception
Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1
<script type="text/javascript">
line2 = [['Living Expenses',1000], ['Loans',2000], ['Credit
Card',500]];
$j(document).ready(function() {
$j.jqplot.config.enablePlugins = true;
$j.jqplot('piechartdiv', [line2], {
title: 'Where is my money going?',
seriesDefaults:{renderer:$j.jqplot.PieRenderer,
rendererOptions:{sliceMargin:8}}, legend:{show:true}
});
});
</script>
<div style="width: 450px;margin: 0px auto;">
<div id='piechartdiv'></div>
</div>
Any help appreciated.
Are you using Bootstrap or some other CSS reset library?
If you go into firebug, and select the <table class="jqplot-table-legend" ...> element, you'll probably see that there is a width:100% default property set the table elements. You can fix it in your CSS layout:
#piechartdiv table.jqplot-table-legend {
width:auto;
}
The only thing that seems weird to me is this:
$j.jqplot
Why are there some J's on your code?, besides that, everything seems to be fine, maybe try putting a location on the legend to see if that fix the issue, here is an example:
plot = $.jqplot('chart2', [arr], {
grid: {
drawBorder: true,
drawGridlines: false,
background: '#FFFFFF',
shadow: true
},
seriesDefaults: {
renderer: $.jqplot.PieRenderer,
rendererOptions: {
showDataLabels: true
}
},
legend: {
show: true,
location: 'e'
}
});
Have you included the jqplot.css file in your code.
Make sure that it is included in the code, and that the file is also present in the directory you are referring to.
Thank you
I came across something similar.
try checking css property text-align:left
<div id='piechartdiv' style="text-align:left;"></div>
I'm afraid I don't know why but these fixed the error for me