make pointer disappear in full screen jwplayer 6 - javascript

is there some code I can add to setup which will achieve this or is it a case of configuring files or making a new skin.
<head>
<script src="/jwplayer/jwplayer.js"></script>
</head>
<body>
<div id='my-video'></div>
<script type='text/javascript'>
wplayer('my-video').setup
({
file: 'clash.mp4',
width: '480',
height: '270',
});
</script>

This is a bug that we are going to fix.

Related

How do I set up this jquery-based US map using jquery?

I am trying to incorporate the clickable jquery United States map from this site https://newsignature.github.io/us-map/ into a page I'm building in Sharepoint. I'm using a content editor web part, and embedding this code into it, but the map isn't showing up. As you can see from my code below, I have linked the javascript files that were included in the us-map-1.0.1.zip file that I downloaded from the site. I also uploaded the 2 svg maps from that zip package to the folder of the page I'm working on. I'm not sure how I am supposed to connect to those svg files, and how I can get this map to display. Is there anything I should do to modify this code?
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <!--this version works with IE-->
<script type="text/javascript" src="https://epwork.ep.corp/wg/ProdPayroll/SiteAssets/jquery.usmap.js"></script>
<script type="text/javascript" src="https://epwork.ep.corp/wg/ProdPayroll/SiteAssets/raphael.js"></script>
<script type="text/javascript" src="https://epwork.ep.corp/wg/ProdPayroll/SiteAssets/color.jquery.js"></script>
<script>
$(document).ready(function() {
$('#map').usmap({
// The click action
click: function(event, data) {
$('#clicked-state')
.text('You clicked: '+data.name)
.parent().effect('highlight', {color: '#C7F464'}, 2000);
}
});
});
</script>
<style>
$('#map').usmap({
stateStyles: {fill: 'blue'}
});
</style>
<div id="map" style="width: 350px; height: 250px;"></div>
<div id="clicked-state"></div>
OK, let´s start.
First of all, it seems that your links are outdated or broken.
https://epwork.ep.corp/wg/ProdPayroll/SiteAssets/jquery.usmap.js
is not working.
The files must be reachable.
Next point s that you are using javascript inside of style tags.
That won't work.
After your links are fixed, try it like this:
$(document).ready(function() {
/** FIRST YOU HAVE TO INITIALIZE THE MAP **/
$('#map').usmap({
stateStyles: {fill: 'blue'},
'click': function(event, data) {
$('#clicked-state').text('You clicked:'+data.name );
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.0.0/raphael-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-color/2.1.2/jquery.color.min.js"></script>
<script src="https://cdn.rawgit.com/NewSignature/us-map/0677afad/jquery.usmap.js"></script>
<div id="map" style="width: 350px; height: 250px;"></div>
<div id="clicked-state"></div>

Change width of farbtastic color picker does not work for me

i tried really hard to change the width and height of the farbtastic color picker without success.... JS is not my language
Can someone please help me out
I tried every possible solution on http://liveweave.com html-online-editor
<!DOCTYPE html>
<html>
<head>
<title>HTML5, CSS3 and JavaScript demo</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.js'></script>
<script type='text/javascript' src='http://gilbertsincobh.com/wp-content/plugins/revslider/js/farbtastic/farbtastic.js'></script>
<link rel='stylesheet' href='http://gilbertsincobh.com/wp-content/plugins/revslider/js/farbtastic/farbtastic.css' type='text/css' />
<script type='text/javascript'>
$(document).ready(function(){
$('#demo').hide();
$('#picker').farbtastic('#color');
$.farbtastic("#picker", {callback: pickerUpdate, width: 600, height: 600});
function pickerUpdate(color){console.log("Color Picker Wheel: " + color);
}
);
</script>
</head>
<body>
<div id="picker"></div>
</body>
</html>
The width and height are hard coded into the plugin source. Just refer to the plugin source from the repo. https://rawgit.com/mattfarina/farbtastic/master/src/farbtastic.js
This should work
$(function () {
$('#colorpicker1').farbtastic('#color1');
$('#colorpicker2').farbtastic({ callback: '#color2', width: 150 });
});
Here is working demo.

Synchronizing two videos in JWPlayer (RTMP Streaming) - is it possible?

I want to use 2 players synchronously. When I trigger the play in one, both run together!
Is there any way to when the User move the video forward or there is some buffer in a video, both videos still together?
Absolutely. Here is some quick basic example code that uses our JavaScript API to do this. Note, this uses 6.12 and uses HTML5, but the same should work with Flash/RTMP/JW7. This uses our JavaScript API - http://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference
Code:
<!DOCTYPE html>
<html>
<head>
<title>Sync</title>
<script src="http://p.jwpcdn.com/6/12/jwplayer.js" type="text/javascript"></script>
</head>
<body>
<div id="player1"></div>
<br />
<div id="player2"></div>
<script type="text/javascript" language="javascript">
jwplayer("player1").setup({
file: "http://content.jwplatform.com/videos/C4lp6Dtd-el5vTWpr.mp4",
});
jwplayer("player2").setup({
file: "http://content.bitsontherun.com/videos/bkaovAYt-364766.mp4",
});
jwplayer("player1").onBeforePlay(function(){
jwplayer("player2").play();
});
jwplayer("player2").onBeforePlay(function() {
jwplayer("player1").play();
});
jwplayer("player1").onPause(function(){
if(jwplayer("player2").getState() == "PLAYING"){
jwplayer("player2").pause();
}
});
jwplayer("player2").onPause(function(){
if(jwplayer("player1").getState() == "PLAYING"){
jwplayer("player1").pause();
}
});
jwplayer("player1").onSeek(function(e){
jwplayer("player2").seek(e.offset);
});
jwplayer("player2").onSeek(function(e){
jwplayer("player1").seek(e.offset);
});
</script>
</body>
</html>
Update, here is an example of this working with one set of controls for both players:
<!DOCTYPE html>
<html>
<head>
<title>Sync</title>
<script src="http://p.jwpcdn.com/6/12/jwplayer.js" type="text/javascript"></script>
</head>
<body>
<div style="float:left;"><div id="player1"></div></div>
<div style="float:right;"><div id="player2"></div></div>
Play/Pause |
Stop |
Seek Back |
Seek Ahead
<script type="text/javascript" language="javascript">
jwplayer("player1").setup({
file: "http://content.jwplatform.com/videos/C4lp6Dtd-el5vTWpr.mp4",
controls:false
});
jwplayer("player2").setup({
file: "http://content.jwplatform.com/videos/C4lp6Dtd-el5vTWpr.mp4",
controls:false
});
</script>
</body>
</html>

JSTween library broken

The JSTween library doesn't seem to perform a simple animation pulled from the library's tutorial. Using the following code, the alert box will show up after the allotted 1 second duration, but no animation will take place.
I must have set up the library wrong somehow, but I can't see the problem.
<html>
<head>
<style type="text/css">
#box
{
width: 16px;
height: 16px;
}
</style>
<script type="text/javascript" src="jquery-1.10.1.js"></script>
<script type="text/javascript" src="jstween-1.1.js" ></script>
<script type="text/javascript" src="jstween-1.1.min.js" ></script>
<script type="text/javascript">
function animate()
{
$('#box').tween({
width:{
start: 16,
stop: 200,
time: 0,
units: 'px',
duration: 1,
effect:'easeInOut',
onStop: function(){ alert( 'Done!' ); }
}
}).play();
}
</script>
</head>
<body>
<div id="box">
<img src="image.png" onClick="animate()" />
</div>
</body>
</html>
Additional info: using Safari on 10.7.5. Code does not work in Chrome or Firefox either.
For anyone who may read this in the future, I discovered the problem: the CSS element #box needs position: relative; as an attribute, otherwise the browser will hold the element in place by default.

How to get alert message when a play button is clicked in jwplayer 5?

I am working on omniture site catalyst variables to be placed for video tracking for a client. My problem is when we click on jwplayer play button i want to throw a alert message. Can anybody please advise me how to do this one.
Here is a quick sample!
<html>
<head>
<title>Test Page</title>
</head>
<body>
<script type="text/javascript" src="http://player.longtailvideo.com/jwplayer.js"></script>
<div id="player"></div>
<script type="text/javascript">
jwplayer("player").setup({
file: "http://www.longtailvideo.com/jw/upload/bunny.mp4",
image: "http://www.longtailvideo.com/jw/upload/bunny.jpg",
flashplayer: "http://player.longtailvideo.com/player.swf",
height: 300,
width: 465,
events:{
onPlay: function(event) {
alert('Playing!');
}
}
});
</script>
</body>
</html>

Categories