Does jwplayer support playlist including youtube videos on mobile? - youtube-api

Ethan JWPlayer (https://stackoverflow.com/users/1645000/ethan-jwplayer) mentioned (here: jwplayer playlist is not working in mobile) that playlists are not supported with youtube videos on mobile, but it would be supported in the future.
Is it supported yet? If not what's the plan (ETA)?

Have you tried this code ?
<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://gdata.youtube.com/feeds/api/playlists/PL895D164BB097AA0F",
flashplayer: "http://player.longtailvideo.com/player.swf",
volume: 80,
width: 465,
stretching: 'fill'
});
</script>
</body>
</html>
The playlist url must be in this format:
http://gdata.youtube.com/feeds/api/playlists/PL895D164BB097AA0F

Related

JW Player 6.11 Skin Not Working in IE

I am working on a site that uses JW Player to skin YouTube videos. It works fine in Chrome and FireFox but just doesn't load the skin in IE. The video plays using the YouTube player but it just doesn't have any controls.
Even in the most basic of setups it will still not work, example below. I am using a Pro account and the full version of JW Player is 6.11.4923.
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="http://jwpsrv.com/library/127baEpAEeSLmSIAC0WXxA.js"></script>
</head>
<body>
<div id='video'></div>
<script type='text/javascript'>
jwplayer('video').setup({
file: '//www.youtube.com/watch?v=aqz-KE-bpKQ',
skin: 'beelden'
});
</script>
</body>
</html>
I am also getting an error in the console, screenshot below:
> Error handling "jwplayerMediaLevelChanged" event listener [0]:
> TypeError: Cannot read property 'length' of undefined function
Any help would be great, thanks.

I can't load the JQuery in phoneGap in ios uiwebview

I embedded phoneGap in my UIWebView, referenced to this doc:
http://docs.phonegap.com/en/2.2.0/guide_cordova-webview_ios.md.html#Embedding%20Cordova%20WebView%20on%20iOS
And in the index.html, I write this sample code:
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
alert(“jquery loaded”);
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
after the webview loaded, the "body" can be shown, but the alert can't be pop out. So the jquery.js is not loaded? Or something else is wrong?
Edit:
I added "http:" to the src, but not work.
Thanks!
change
alert(“jquery loaded”);
to
alert("jquery loaded");
or
alert('jquery loaded');
Add http or https to your code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
The above should work for you.
Did you add the Cordova file?
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="./cordova-2.3.0.js"></script>
<script>
$(document).ready(function() {
alert(“jquery loaded”);
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>
Also as much as phonegap uses HTML 5 it still requires a bit different style of writing your code. Everypage you make should all be in the same index page because Cordova loads at startup in your project. If you navigate away from the page Cordova needs to reload.
Did you copy jquery file at www forder (www/jquery.js). I use jquery too, mine is www/js/jquery.js
Try this!!!

Saving a PNG or JPG image to Photos in iOS via PhoneGap

I am new to PhoneGap and would like to know how to save an in-App image to Photos in iOS.
While I was able to use
navigator.camera.getPicture
with options
quality:50, destinationType:Camera.DestinationType.DATA_URL,saveToPhotoAlbum: true
to save a picture taken with the camera to Photos, I am now trying to find out how to save an in-App image to Photos.
Consider the following PhoneGap - Cordova page where the element myPhoto holds imagedata such as "data:image/jpeg;base64,"...
<html>
<head>
<title>Save Image</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.1.0.js"></script>
<script type="text/javascript" charset="utf-8">
function savePicture(){
//this is where the magic would happen
//how can I save myPhoto to Photos?
//output imageData to a jpg or png file which would show up in Photos?
}
</script>
</head>
<body>
<button onclick="savePicture();">Save Photo</button> <br>
<input type="hidden" name="myPhoto" id="myPhoto" value="">
</body>
</html>
Question:
What should savePicture() do to save the imagedata from myPhoto to Photos in iOS via Phonegap?
Maybe you could try the plugin I wrote for IOS (If you want to save a canvas element to photogallery, you could get the dataURI of the canvas the use the downloadWithUrl method below). Hope it works for you.
here is the git link: https://github.com/Nomia/ImgDownloader
Short Example:
document.addEventListener("deviceready",onDeviceReady);
//google logo url
url = 'https://www.google.com/images/srpr/logo11w.png';
onDeviceReady = function(){
cordova.plugins.imgDownloader.downloadWithUrl(url,function(){
alert("success");
},function(){
alert("error");
});
}
//also you can try dataUri like: 1px gif
//url = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
you can also save a local file to image gallery use the download method
I recently came across the following Phonegap plugin for saving Canvas images to Photos in iOS:
https://github.com/devgeeks/Canvas2ImagePlugin
Follow the readme instructions for importing the plugin and then you can use it the following way:
<html>
<head>
<title>Save Image</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="../Canvas2Image/Canvas2ImagePlugin.js"></script>
<script type="text/javascript" charset="utf-8">
var canvas2ImagePlugin; //devgeeks plugin for saving canvas images to photo gallery
function onDeviceReady() {
canvas2ImagePlugin = window.plugins.canvas2ImagePlugin;
}
function savePicture(){
canvas2ImagePlugin.saveImageDataToLibrary(function(msg){console.log(msg);},function(err){console.log(err);},'mycanvas');
}
</script>
</head>
<body>
<canvas id="myCanvas" width="500px" height="300px"> <strong>[Your browser can not show this example.]</strong> </canvas>
<button onclick="savePicture();">Save Photo</button> <br>
</body>
</html>

Ooyala player version 2 or 3 not running in IE 10 metro mode

Ooyala player version 2 or 3 not running in IE 10 metro mode
Only in metro mode of IE 10 below code is not running.
Pls help.
below is the code used.
<!DOCTYPE html>
<html>
<head>
<title>Untitled Page</title>
</head>
<script type="text/javascript" src="http://player.ooyala.com/player.js?width=750&height=312&embedCode=4yb2NyNToSgl-L6mEJvDW4NaqxRYQvnN">
</script>
<head>
<!-- Load Ooyala Player -->
<script src='http://player.ooyala.com/v3/4yb2NyNToSgl-L6mEJvDW4NaqxRYQvnN'></script>
</head>
<body>
<!-- Player Placement -->
<div id='playerwrapper' style='width:750px;height:312px;'></div>
<script>
var videoPlayer = OO.Player.create('playerwrapper', '4yb2NyNToSgl-L6mEJvDW4NaqxRYQvnN');
videoPlayer.play();
</script>
</body>
</html>
You are not seeing playback in IE10 metro for a couple of reasons- you are not embedding player v3 correctly, so the v2 player is the only one thats being loaded. V2 does not support metro in IE10 unless your site is whitelisted for Flash.
I've fixed up your test page for you, please insert an embed code and your player branding id as provided by your Account Manager.
<!DOCTYPE html>
<html>
<head>
<title>Untitled Page</title>
<script type="text/javascript" src='http://player.ooyala.com/v3/{PLAYER BRANDING ID}'></script>
</head>
<body>
<!-- Player Placement -->
<div id='playerwrapper' style='width:750px;height:312px;'></div>
<script>
OO.ready(function() {
var videoPlayer = OO.Player.create('playerwrapper', '{EMBED CODE}');
videoPlayer.play();
});
</script>
</body>
</html>

Phone Gap with Jquery Mobile won't open internal links

I have a phone gap application with jquery mobile and I can get external links to work and single page navigation working but I cannot open another file in my application. All the files are located in the www folder. The error message is "Failed to load webpage with error: The requested URL was not found on this server. If i comment out the jquery-1.6.4.min.js file it will work but that's not a good solution. I've tried rel="external" and several other things I've seen by googling but nothing seems to work
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no;" />
<meta charset="utf-8">
<link rel="stylesheet" href="include/jquery.mobile-1.0.min.css" />
<script src="include/jquery-1.6.4.min.js"></script>
<script src="include/jquery.mobile-1.0.min.js"></script>
<script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
<script type="text/javascript">
function onBodyLoad()
{
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady()
{
//do something
}
</script>
</head>
<body onload="onBodyLoad()">
<div data-role="page" id="manage">
<div data-role="content" id="inputs">
About
</div>
</div>
</body>
</html>
Make sure that you update your PhoneGap manifest. Look for PhoneGap.plist, open it and look for ExternalHosts. You need to add the urls one by one, or you can simply add "*". This will allow the use of all urls within the application. PhoneGap blocks all urls by default.

Resources