How to stop video onclick function in jwplayer - php

Javascript:
jwplayer("mvcontainer").setup({
flashplayer: "https://media.dreamhost.com/mp5/player.swf",
file: "video_file.flv",
icons: true,
autostart: true,
controlbar: "bottom",
height: 406,
width: 628
});
HTML:
<div id="mvcontainer"></div>
The above coding is using to play flv video in my site. This coding working correctly but I have a problem. I removed the video then replaced some content in same page. The video is not stopped, it continuously playing in background.
How do I stop it?

Try using this
jwplayer().remove();
or
jwplayer().stop();
There's JW Player JS API Documentation

Related

thumbnail not proper genrate of server store file in dropzone

I am using this line of code to show the store images on server in my dropzone area its working fine but the thumbnail which is genrated by this is not proper its not show the thumbnail of full image its just zoom the image and then make its thumbnail this is the screenshot of thumbnail https://www.screencast.com/t/PZJjZIN9VJTV
and this is the screenshot of which i want
https://www.screencast.com/t/nwfNbMW2mzFx
var mockFile = {
id:id,
name:filePath,
size: '2000',
type: 'image/jpeg',
accepted: true // required if using 'MaxFiles' option
};
// this.files.push(mockFile); // add to files array
this.emit("addedfile", mockFile);
this.emit("thumbnail", mockFile,'http://inspiretech.local/uploads/'+filePath);
this.emit("complete", mockFile);
this answer comes a couple of years late, but in case it helps shorten the search time of other fellow users.
I found an easy way to solve this issue:
thanks to makitweb tutorial =>
have css correct your image size like so:
.dz-preview .dz-image img{
width: 100% !important;
height: 100% !important;
object-fit: cover;
}

unable to fix the height of the tab page in facebook

Using tab application in Face book,i am unable to set the height of the iframe which is always set to 800.
I have tried so many variations but nothing works for me.
FB.Canvas.setSize({ width: 640, height: 1480 });
FB.Canvas.setAutoResize();
FB.Canvas.setAutoGrow();
By the way i am using v2.9.
Can you please suggest me how to remove the scrollbar and show full page ?

JW Player not working in Chrome

Iam using JW Player in the website to play youtube videos. I have used embed code for that. It is working properly in all browsers when executing the file from my local diretory. But it is not working in google chrome when executing the file from the server. Below is the code.
<embed id="ply" height="384" width="430" flashvars="autostart=true&repeat=always&file=http:/www.youtube.com/watch?v=cNBFihPwThM&screencolor=000000&backcolor=000000&frontcolor=ffffff&skin=http://www.creatingafamily.org/modules/mod_jwmedia/skins/snel.swf" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#000000" name="ply" style="" src="http://www.creatingafamily.org/modules/mod_jwmedia/player.swf" type="application/x-shockwave-flash"/>
Please help to achieve this. Thanks in advance.
First of all , we should let jwplayer's javascript to build the html code.
Initilaize jwplayer with js, and use HTML5 video in html like this:
<center>
<video controls="controls" id="container" poster="http://www.example.com/yourvideothumbs/videothumb.jpg" width="693" height="388">
<source src="http://www.example.com/videos/jourvideo.mp4" type="video/mp4" />
</video>
</center>
Javascript:
if(navigator.userAgent.toLowerCase().match(/(android)/) || navigator.userAgent.toLowerCase().match(/(chrom)/) ){
//wee must force flash video player in chrome, because mp4 video files is not supported yet in chrome's HTML5 video implementation.
modes = [{type: 'flash', src: '[JWPLAYERBASEDIR]/swf/player.swf'}];
}else{
modes = [ {type: 'html5'},{type: 'flash', src: '[JWPLAYERBASEDIR]swf/player.swf'}];
}
jwplayer("container").setup({
'modes':modes,
});
This worked me in all browsers. jwplayer can conform if is HTML5 supported or not.
Or the below with forced HTML4 implementation:
<div id="container"></div>
<script type="text/javascript">
jwplayer("container").setup({
modes = [{type: 'flash', src: '[JWPLAYERBASEDIR]/swf/player.swf'}], //force flashplayer for video
image: "yourvideothumbs/videothumb.jpg", //poster image
file: "videos/jourvideo.mp4", //video file
height: "693", //set height in px
width: "388" //set width in px
});
And in setup you can set skin, controls, autostart anything you want:
http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player/

Can you embed a Facebook or Twitter feed in a html emailer? [duplicate]

I'm about to send out an email campaign to my clients. The email will be sent in HTML format, and I wanted to embed a twitter feed in my email, similar to the twitter widgets you see embedded in blogs and websites everywhere. When I copy and paste the code generated through the twitter website, my email doesn't render anything :(
Any ideas if this is possible? Thanks! Here's the code twitter generated:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'faves',
rpp: 5,
interval: 6000,
title: 'The best of Twitter according to',
subject: 'My Tweets',
width: 250,
height: 300,
theme: {
shell: {
background: '#8540c2',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#43c43f'
}
},
features: {
scrollbar: true,
loop: false,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
behavior: 'all'
}
}).render().setUser('maryamKE').start();
</script>
There is no standard for HTML email, and most email clients sensibly reject JavaScript. I recommend you link to a page on your web site.
There is no good way to accomplish this with the embeds provided directly from Twitter.
This was a need I also had and created a service that makes it extremely easy: https://www.widgmail.com/

Twitter Search Widget over SSL

I am trying get the twitter search widget to work on my SSL pages, without the browser throwing a warning about not encrypted. I have been searching a while now but cant find a solution. Any ideas?
I have tried the following:
Including Twitter Widgets.js via HTTPS
my code is as follows
<script charset="utf-8" src="https://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: 'Search term',
interval: 30000,
title: 'Twitter feed',
subject: 'WHatever',
width: 295,
height: 300,
theme: {
shell: {
background: 'transparent',
color: '#88afcc'
},
tweets: {
background: 'transparent',
color: '#cccccc',
links: '#1868e0'
}
},
features: {
scrollbar: false,
loop: true,
live: true,
behavior: 'default'
}
}).render().start();
</script>
I have tried saving widget.js to my server and calling it with https that way but to no avail, also I tried changing all occurences of 'http' to 'https' in widget.js again to no avail.
Any ideas? I really want to keep this on the SSL pages but not at the cost of users thinking the connection between us and them is insecure.
Copy the widget.js file to your https file directory and change your src to point to it.
The error is occurring because ANY file outside your https directory is not going to be encrypted by SSL.

Categories